BYTEORDER(3) Library Functions Manual BYTEORDER(3) NOME htonl, htons, ntohl, ntohs - muda a ordem dos bytes para a ordem do 'host' ou a da rede BIBLIOTECA Biblioteca C Padrao (libc, -lc) SINOPSE #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); DESCRICAO The htonl() function converts the unsigned integer hostlong from host byte order to network byte order. The htons() function converts the unsigned short integer hostshort from host byte order to network byte order. The ntohl() function converts the unsigned integer netlong from network byte order to host byte order. The ntohs() function converts the unsigned short integer netshort from network byte order to host byte order. A ordem de bytes na arquitetura i386 comeca com o byte menos significativo, e, na rede (por exemplo na internet), o byte mais significativo vem primeiro. ATRIBUTOS Para uma explicacao dos termos usados nesta secao, consulte attributes(7). +--------------------------------------------+---------------+---------+ |Interface | Atributo | Valor | +--------------------------------------------+---------------+---------+ |htonl(), htons(), ntohl(), ntohs() | Thread safety | MT-Safe | +--------------------------------------------+---------------+---------+ PADROES POSIX.1-2008. HISTORICO POSIX.1-2001. VEJA TAMBEM bswap(3), endian(3), gethostbyname(3), getservent(3) TRADUCAO A traducao para portugues brasileiro desta pagina man foi criada por Paulo Cesar Mendes e Andre Luiz Fassone Esta traducao e uma documentacao livre; leia a Licenca Publica Geral GNU Versao 3 ou posterior para as condicoes de direitos autorais. Nenhuma responsabilidade e aceita. Se voce encontrar algum erro na traducao desta pagina de manual, envie um e-mail para a lista de discussao de tradutores . Linux man-pages 6.06 31 outubro 2023 BYTEORDER(3)