The htonl function converts a u_long from host to TCP/IP network byte order (which is big-endian).
u_long htonl( u_long hostlong );
int htonl(int hostlong) => _htonl(hostlong);