Open System Services Library Calls Reference Manual (G06.27+, H06.04+)

ntohl(3) OSS Library Calls Reference Manual
NAME
ntohl - Converts a 32-bit integer from Internet network byte order to host byte order
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
H-series OSS processes: /G/system/zdllnnn/zinetdll
SYNOPSIS
#include <arpa/inet.h>
in_addr_t ntohl(
in_addr_t netlong);
PARAMETERS
netlong Species a 32-bit integer in network byte order.
DESCRIPTION
The ntohl() (network-to-host long) function converts a 32-bit integer from Internet network byte
order to host byte order. This function is provided for compatibility with the XPG4 speci
cation.
The ntohl() function is most often used to convert values returned by the gethostent() and get-
servent() functions.
RETURN VALUES
The ntohl() function returns a 32-bit long integer in host byte order.
ERRORS
The ntohl() function does not set errno.
RELATED INFORMATION
Functions: ntohs(3), htonl(3), htons(3).
512 Hewlett-Packard Company 527187-004