BYTEORDER(3) Library Functions Manual BYTEORDER(3) htonl, htons, ntohl, ntohs - C (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 , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . BYTEORDER(3)