The ntohl function converts a u_long from TCP/IP network order to host byte order (which is little-endian on Intel processors).
u_long ntohl( u_long netlong );
int ntohl(int netlong) => _ntohl(netlong);