Converts 32-bit quantities from host to network byte order.
#include <sys/byteorder.h>
unsigned long htonl (
unsigned long hostlong);
(IN) Specifies a 32-bit quantity in host byte order.
Returns the value converted from host to network byte order.
The htonl function is frequently used to convert Internet addresses from host byte order to network byte order for socket calls requiring an Internet address as a parameter.
NOTE:Network data order places the most significant byte at the lower memory address, while host data order places the least significant byte at the lower address.