DESCRIPTION top
inet_aton() converts the Internet host address cp from the IPv4
numbers-and-dots notation into binary form (in network byte order)
and stores it in the structure that inp points to. inet_aton()
returns nonzero if the address is valid, zero if not. The address
supplied in cp can have one of the following forms:
a.b.c.d Each of the four numeric parts specifies a byte of the
address; the bytes are assigned in left-to-right order to
produce the binary address.
a.b.c Parts a and b specify the first two bytes of the binary
address. Part c is interpreted as a 16-bit value that
defines the rightmost two bytes of the binary address.
This notation is suitable for specifying (outmoded) Class B
network addresses.
a.b Part a specifies the first byte of the binary address.
Part b is interpreted as a 24-bit value that defines the
rightmost three bytes of the binary address. This notation
is suitable for specifying (outmoded) Class A network
addresses.
a The value a is interpreted as a 32-bit value that is stored
directly into the binary address without any byte
rearrangement.