HTONL(3n,L) AIX Technical Reference HTONL(3n,L) ------------------------------------------------------------------------------- htonl, htons, ntohl, ntohs PURPOSE Converts values between host and Internet network byte order. LIBRARY Internet Library (libc.a) SYNTAX #include #include unsigned long htonl (hostlong) unsigned long ntohl (netlong) unsigned long hostlong; unsigned long netlong; unsigned short htons (hostshort) unsigned short ntohs (netshort) unsigned short hostshort; unsigned short netshort; DESCRIPTION These subroutines convert 16- and 32-bit quantities between network byte order and host byte order. On machines already in network byte order (such as the IBM System/370) these routines are defined as null macros in the include file netinet/in.h. These subroutines are often used in conjunction with Internet addresses and ports as returned by the gethostent and getservent subroutines. RELATED INFORMATION In this book: "gethostbyaddr, gethostbyname, sethostent, endhostent" and "getservent, getservbyname, getservbyport, setservent, endservent." Processed July 12, 1991 HTONL(3n,L) 1