inet_aton

Name

inet_aton -- Internet address manipulation routine

Synopsis

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int anet_iton(const char * cp, struct in_addr * inp);

Description

inet_aton() converts the Internet host address cp from the standard IPv4 numbers-and-dots notation into binary data and stores it in the structure that inp points to.

inet_aton() returns a nonzero value if the address is valid, 0 if not.

Note: Note that on some LSB architectures, the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.