The Windows Sockets htonl function converts a u_long from host to TCP/IP network byte order (which is big-endian).
u_long htonl (
  u_long hostlong  
);
 The htonl function takes a 32-bit number in host byte order and returns a 32-bit number in the network byte order used in TCP/IP networks.
The htonl function returns the value in TCP/IP's network byte order.
  Windows NT:  Yes
  Windows: Yes
  Windows CE:  Use version 1.0 and later.
  Header: Declared in winsock2.h.
  Import Library: Link with ws2_32.lib.
htons, ntohl, ntohs, WSAHtonl, WSAHtons, WSANtohl, WSANtohs