Group: Windows Sockets 2 (Winsock) - Library: ws2_32
The ntohs function converts a u_short from TCP/IP network byte order to host byte order (which is little-endian on Intel processors).
Winsock: changing the byte ordering
Retrieving the User Datagram Protocol (UDP) listener table
u_short ntohs(
u_short netshort
);
DECLARE INTEGER ntohs IN ws2_32;
INTEGER netshort
netshort [in] 16-bit number in TCP/IP network byte order.
The ntohs function returns the value in host byte order. If the netshort parameter was already in host byte order, then no operation is performed.