ntohl

The Windows Sockets ntohl function converts a u_long from TCP/IP network order to host byte order (which is big-endian).

u_long ntohl (
  u_long netlong  
);
 

Parameters

netlong
[in] A 32-bit number in TCP/IP network byte order.

Remarks

The ntohl function takes a 32-bit number in TCP/IP network byte order and returns a 32-bit number in host byte order.

Return Values

The ntohl function always returns a value in host byte order. If the netlong parameter was already in host byte order, then no operation is performed.

QuickInfo

  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.

See Also

htonl, htons, ntohs, WSAHtonl, WSAHtons, WSANtohl, WSANtohs