Please enable JavaScript to view this site.

This function converts from a string containing an IP address to an address represented as an integer.

Syntax

i32 str_to_ipaddr (string sAddr, u32 addr)

sAddr

Variable containing the string to be converted

addr

Variable in which the function writes the result

Result

Returns:

Value

Meaning

<> 0

Operation successfully completed

0

sAddr is not a valid address

Validity

Rule, Task

Note


The string has the format: "xxx.xxx.xxx.xxx."

The integer is of type u32 with format: u32 addr = 0xaabbccdd; aa, bb, cc and dd represent the 4 components of the IP address expressed in hexadecimal format.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC