[Previous] [Contents] [Index] [Next]

ntohl()

Convert a 32-bit value from network-byte order to host-byte order

Synopsis:

#include <netinet/in.h>

in_addr_t ntohl( in_addr_t netlong );

Library:

socket3r.lib, socket3s.lib

Description:

The ntohl() function converts a 32-bit value from network-byte order to host-byte order. If a machine's byte order is the same as the network order, routines are defined as null macros.

This routine is most often used in conjunction with internet addresses and ports returned by gethostbyname() and getservent().

Returns:

The value in host-byte order.

Classification:

Standard Unix, POSIX 1003.1g (draft)

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

gethostbyname(), getservent(), htonl(), htons(), ntohs()


[Previous] [Contents] [Index] [Next]