sunos man page for htonl

Query: htonl

OS: sunos

Section: 3xnet

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

htonl(3XNET)					   X/Open Networking Services Library Functions 				      htonl(3XNET)

NAME
htonl, htons, ntohl, ntohs - convert values between host and network byte order
SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ] #include <arpa/inet.h> uint32_t htonl(uint32_t hostlong); uint16_t htons(uint16_t hostshort); uint32_t ntohl(uint32_t netlong); uint16_t ntohs(uint16_t netshort);
DESCRIPTION
These functions convert 16-bit and 32-bit quantities between network byte order and host byte order. The uint32_t and uint16_t types are made available by inclusion of <inttypes.h>.
USAGE
These functions are most often used in conjunction with Internet addresses and ports as returned by gethostent(3XNET) and getser- vent(3XNET). On some architectures these functions are defined as macros that expand to the value of their argument.
RETURN VALUES
The htonl() and htons() functions return the argument value converted from host to network byte order. The ntohl() and ntohs() functions return the argument value converted from network to host byte order.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+
SEE ALSO
endhostent(3XNET), endservent(3XNET), attributes(5), standards(5) SunOS 5.10 10 Jun 2002 htonl(3XNET)
Related Man Pages
byteorder(3) - v7
byteorder(3) - php
htonl(3) - php
ntohl(3) - xfree86
ntohs(3) - minix
Similar Topics in the Unix Linux Community
Help needed in my client/server app - Delay in displaying messages from clients.
Getting error address already in use in socket programming
Socket dual client/server Linux
Warning: pointer type mismatch