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:
|
||||||
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.
Example of use:
|