* ntohl linux
* ntohl socket
* network to host long long
* network to host byte order
unsigned long ntohl(unsigned long netlong);
The value adr_inet is defined using the structure sockaddr_in (line 1). The address adr_inet is zeroed by calling memset(3) in line 4. (This is optional.) The address family is established by assigning the value AF_INET to adr_inet.sin_family (line 6) A wild port number is specified in line 7. Notice the use of the function ntohs(3). The value zero indicates a wild port number. A wild IP number is assigned in line 8. Again, note the use of the ntohl(3) function to perform the endian conversion. The size of the address is simply computed as the size of the structure adr_inet (line 9).