Developer

API Reference

std_inet_aton()

Brew Release
Brew MP 1.0.2
See Also
std_inet_ntoa() std_inet_ntop() std_inet_pton()
Description

A helper function that parses an IPv4 numeric internet address from a string. The following formats are supported:
       8.8.8.8  : four 8-bit numbers
       8.8.16   : three numers, the last of which is 16-bits
       8.24     : two numbers (the last 24-bits)
       32       : one 32-bit number

Each number must be unsigned, must not overflow its bounds, and can be specified as decimal, hexadecimal (if it begins with "0x" or "0X"), or octal (initial "0" without an "x").
Valid terminating characters are ASCII null, space, tab, newline, carriage return, and the following punctuation characters:
          '/', ':', ',', '#', '?', and '%'

Any other terminating character is considered an error.
Parameters
  • cpsz
    []:
    A NULL-terminated string representation. The std_inet_aton helper function also stops parsing at any character other than "." or numeric characters.
  • pulAddr
    [out]:
    Where to place the parsed address, in network-byte order.
Prototype
   boolean std_inet_aton(const char *cpsz, unsigned long *pulAddr);
Return
TRUE if the string could be parsed, FALSE otherwise
Side Effect
None
Comment
The address is placed in the pulAddr parameter in network-byte order.
  • Follow