Provided by: manpages-pt-br-dev_4.27.0-1_all bug

NOME

       htonl, htons, ntohl, ntohs - muda a ordem dos bytes para a ordem do 'host' ou a da rede

BIBLIOTECA

       Biblioteca C Padrão (libc, -lc)

SINOPSE

       #include <arpa/inet.h>

       uint32_t htonl(uint32_t hostlong);
       uint16_t htons(uint16_t hostshort);

       uint32_t ntohl(uint32_t netlong);
       uint16_t ntohs(uint16_t netshort);

DESCRIÇÃO

       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 começa com o byte menos significativo, e, na rede (por exemplo na
       internet), o byte mais significativo vem primeiro.

ATRIBUTOS

       Para uma explicação dos termos usados nesta seção, consulte attributes(7).
       ┌─────────────────────────────────────────────────────────────────────────────┬───────────────┬─────────┐
       │ InterfaceAtributoValor   │
       ├─────────────────────────────────────────────────────────────────────────────┼───────────────┼─────────┤
       │ htonl(), htons(), ntohl(), ntohs()                                          │ Thread safety │ MT-Safe │
       └─────────────────────────────────────────────────────────────────────────────┴───────────────┴─────────┘

PADRÕES

       POSIX.1-2008.

HISTÓRICO

       POSIX.1-2001.

VEJA TAMBÉM

       bswap(3), endian(3), gethostbyname(3), getservent(3)

TRADUÇÃO

       A tradução para português brasileiro desta página man foi criada por Paulo César Mendes <drpc@ism.com.br>
       e André Luiz Fassone <lonely_wolf@ig.com.br>

       Esta tradução é uma documentação livre; leia a Licença Pública Geral GNU Versão 3 ou  posterior  para  as
       condições de direitos autorais.  Nenhuma responsabilidade é aceita.

       Se  você  encontrar  algum  erro  na  tradução  desta  página  de manual, envie um e-mail para a lista de
       discussão de tradutores.

Linux man-pages 6.9.1                              2 maio 2024                                      BYTEORDER(3)