BYTEORDER(3) Library Functions Manual BYTEORDER(3) htonl, htons, ntohl, ntohs - LIBRARY Standard C library (libc, -lc) #include uint32_t htonl(uint32_t hostlong); uint16_t htons(uint16_t hostshort); uint32_t ntohl(uint32_t netlong); uint16_t ntohs(uint16_t netshort); htonl() hostlong . htons() hostshort . ntohl() netlong . ntohs() netshort . i386 -- (Least Significant Byte), , , Most Significant Byte ( ). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |htonl(), htons(), ntohl(), | | MT-Safe | |ntohs() | | | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. POSIX.1-2001. . bswap(3), endian(3), gethostbyname(3), getservent(3) Artyom Kunyov , Azamat Hackimov , Dmitriy Ovchinnikov , Dmitry Bolkhovskikh , ITriskTI , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . BYTEORDER(3)