*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> htons (9r)              
Title
Content
Arch
Section
 

htonl(9r)

Contents


NAME    [Toc]    [Back]

       htonl,  htons  - General: Convert word and longword values
       from host-to-network byte order

SYNOPSIS    [Toc]    [Back]

       #include <sys/param.h>

       unsigned int htonl(
               unsigned int longword ); unsigned short htons(
               unsigned short word );

ARGUMENTS    [Toc]    [Back]

       Specifies a 32-bit value to be conditionally byte swapped.
       Specifies a 16-bit value to be conditionally byte swapped.

DESCRIPTION    [Toc]    [Back]

       The htonl routine converts the  specified  longword  value
       from  host-to-network  byte  order. The htons routine converts
 the specified word value from  host-to-network  byte
       order.

       The  TCP/IP  protocols  specify the canonical network byte
       order, which is big endian (meaning that the most significant
 byte is leftmost in memory).

RETURN VALUES    [Toc]    [Back]

       Upon  successful completion, the htonl routine returns the
       converted longword value in network byte order. Similarly,
       upon successful completion, the htons routine converts the
       specified word value in network byte order.

SEE ALSO    [Toc]    [Back]

      
      
       Routines: ntohl(9r)



                                                        htonl(9r)
[ Back ]
 Similar pages
Name OS Title
ntohs Tru64 General: Convert longword and word values
ntohl Tru64 General: Convert longword and word values
suword Tru64 General: Writes a word into user address space
fuiword Tru64 General: Returns a word from user instruction address space
fuword Tru64 General: Returns a word from user instruction address space
suiword Tru64 General: Writes a word into user instruction address space
htole32 OpenBSD convert values between different byte orderings
htole64 OpenBSD convert values between different byte orderings
htonl OpenBSD convert values between different byte orderings
betoh16 OpenBSD convert values between different byte orderings
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service