Contents | Prev | Next

12.16.9 The ntohl function

Description

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

Declaration

The system include file WinSock2.inc contains the following declarations for the u_long type, and the ntohl function:

 u_long = word;

 function ntohl(netlong : u_long) : u_long;
  external dll='ws2_32.dll';

Arguments

The only argument passed to the ntohl function is the u_long value that you want to convert to host byte order.

Return Values

The ntohl function returns the u_long value in host byte order.

Reference Information

The authoritative source of information about the WinSock2 library is the Microsoft Developers Network (MSDN). You can access the MSDN on the Microsoft website at msdn.microsoft.com.

Contents | Prev | Next