Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
htonl(3) OSS Library Calls Reference Manual
NAME
htonl - Converts a 32-bit integer from host byte order to Internet network byte order
LIBRARY
G-series native OSS processes: /G/system/sysnn/zinetsrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zinetdll |
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yinetdll |
SYNOPSIS
#include <arpa/inet.h>
in_addr_t htonl(
in_addr_t hostlong);
PARAMETERS
hostlong Specifies a 32-bit integer in host byte order.
DESCRIPTION
The htonl( ) (host-to-network long) function converts a 32-bit integer from host byte order to
Internet network byte order. The htonl( ) function is provided for compatibility with the XPG4
specification.
The htonl( ) function is most often used to convert values returned by gethostent( ) and getser-
vent( ).
RETURN VALUES
The htonl( ) function returns a 32-bit long integer in Internet network byte order.
ERRORS
The htonl( ) function does not set errno.
RELATED INFORMATION
Functions: htons(3), ntohl(3), ntohs(3).
3−200 Hewlett-Packard Company 527187-017