1. inet_ntop/inet_ntoa
network ip to presentation ( int -> 192.168.0.1)
2. inet_pton/inet_aton
presentatioin ip to network
3. htonl, htons, ntohl, ntohs (convert byte order)
htons : host to network short
htonl : host to network long
ntohs : network to host short
ntohl : network to host long
4. struct sockaddr_in
{
short sin_family; //AF_INET
unsigned short sin_port; //htons
struct in_addr sin_addr;
char sin_zero[8];
}
struct in_addr
{
unsigned long s_addr; //inet_atonl
}