August 2011
Intermediate to advanced
552 pages
23h 48m
English
There are two fundamental forms for IP addresses. The first is a human-readable “presentation” form, such as the IPv4 dotted-quad or the IPv6 colon-delimited hex address. The other is a binary format “network” form that can be used by the sockets API to actually send data across the network. The presentation address is what the user interacts with, and the network form is used by the program’s code.
The inet_pton() function converts from an address in presentation format to one in network format, hence the “P to N” in the function name.
int inet_pton (int addressFamily, const char *sourceBuffer, void *destinationAddress); ...
Read now
Unlock full access