htonl(3) Library Functions Manual htonl(3)NAME
htonl - Converts an unsigned 32-bit integer from host byte order to Internet network-byte order
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <arpa/inet.h> in_addr_t htonl ( in_addr_t hostint) ;
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
htonl(): XNS4.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies a 32-bit integer in host byte order.
DESCRIPTION
The htonl() (host-to-network long) function converts an unsigned 32-bit integer from host byte order to Internet network-byte order.
The Internet network requires address and port reference data in network-byte order. Use the htonl() function to convert address and port
integers from Internet host byte order to Internet network-byte ordered integers.
RETURN VALUES
Upon successful completion, the htonl() function returns a 32-bit integer in Internet network-byte order.
ERRORS
Current industry standards do not define error values for the htonl() function.
RELATED INFORMATION
Functions: endhostent(3), endservent(3), htons(3), ntohl(3), ntohs(3)
Standards: standards(5)
Network Programmer's Guide delim off
htonl(3)
Check Out this Related Man Page
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.11 10 Jun 2002 htonl(3XNET)
How to connect to the Internet Using RH 7.2 i.e configuration plz Hlp.....cause I want to accsses to the Internet to download Help and application in the Red hat OS???? (1 Reply)
Hi,
I have a text file in unix.
i am trying to give a link in Internet explorer to that file.
If i click on the link in Internet Explorer page then it should display the text from file in unix.
is that anyway possible....
i am trying it for past 2 days....if i find a way out i will... (3 Replies)
Hi All,
I have my SC setup as attached below but I am having problem accessing the port thru network. sc0 was accessible only after i failed over the configuratios to sc1 (now then sc1 was not pingable :(). Just wondering is there anything wrong with my sc settings? Appreciate your advice.
... (4 Replies)
Here's the story:
I had an LaCie Internet Space (1TB)... Recently the network (or software)
functions of the device just died... I tried to access it via different routers,
checking UTP, tried everything possible to rule out physical damage to
components.
Then i got the disk out of its... (2 Replies)