Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

htonl(3) [osf1 man page]

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)
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to connect to the Internet Using RH 7.2 i.e configuration plz Hlp

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)
Discussion started by: atiato
1 Replies

2. Shell Programming and Scripting

open unix file in windows

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)
Discussion started by: ganesh
3 Replies

3. Linux

Internet dying in Debian?

(1 Reply)
Discussion started by: riwa
1 Replies

4. UNIX for Dummies Questions & Answers

How to determine if a host is connected to the Internet in Unix?

How to determine if a host is connected to the Internet in Unix ? (1 Reply)
Discussion started by: shuhang2
1 Replies

5. Linux

Internet Problem

(3 Replies)
Discussion started by: krabu
3 Replies

6. Infrastructure Monitoring

SF4800 SC not accessible thru network

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)
Discussion started by: honmin
4 Replies

7. UNIX for Dummies Questions & Answers

I have files that are locked up...

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)
Discussion started by: SentinelX
2 Replies

8. News, Links, Events and Announcements

Airlines industry

Hi, I want to move to unix admin from support. Which unix can i learn to get into airlines industry projects? Thanks in advance. (1 Reply)
Discussion started by: sam_bd
1 Replies