Linux Man Page for BYTEORDER (3) Linux Manual Pages Web Software Development Pegasus InfoCorp
    Pegasus InfoCorp: Web site design and web software development company
    Home About Us Services Solutions Clientele Contact Us

    BYTEORDER (3)

    convert values between host and network

    byte order

    SYNOPSIS

      #include <netinet/in.h>
        unsigned long int htonl(unsigned long int  hostlong );  
        unsigned short int htons(unsigned short int  hostshort );  
        unsigned long int ntohl(unsigned long int  netlong );  
        unsigned short int ntohs(unsigned short int  netshort );  
      

    DESCRIPTION

      The htonl() function converts the long integer hostlong from host byte order to network byte order.

      The htons() function converts the short integer hostshort from host byte order to network byte order.

      The ntohl() function converts the long integer netlong from network byte order to host byte order.

      The ntohs() function converts the short integer netshort from network byte order to host byte order.

      On the i80x86 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.

    CONFORMING TO

      BSD 4.3

    SEE ALSO

      - gethostbyname (3) - - getservent (3) -

    Linux Man Section 0 Linux Man Section 1 Linux Man Section 2 Linux Man Section 3 Linux Man Section 4
    Linux Man Section 5 Linux Man Section 6 Linux Man Section 7 Linux Man Section 8 Section 9 Section N
    Home About Us Services Solutions Clientele
    Contact Us Directory Links Web Development Knowledgebase - Linux Manual Man Pages Web Development Knowledgebase - Linux Dictionary