Skip to main content

Ntohs-Leer de Linux-opdracht

Leer fichero C, linux: open, read , close (Juni- 2026)

Leer fichero C, linux: open, read , close (Juni- 2026)
Anonim

Naam

htonl, htons, ntohl, ntohs - converteer waarden tussen host- en netwerkbytevolgorde

Korte inhoud

#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 );

Omschrijving

Dehtonl () function converteert het niet-ondertekende gehele getal hostlong van hostbytevolgorde naar netwerkbytevolgorde.

Dehtons () function converteert het niet-ondertekende korte gehele getal hostshort van hostbytevolgorde naar netwerkbytevolgorde.

Denthol () function converteert het niet-ondertekende gehele getal netlong van netwerk byte opdracht naar host bytevolgorde.

Dentohs () function converteert het niet-ondertekende korte gehele getal netshort van netwerk byte opdracht naar host bytevolgorde.

Op de i80x86 is de hostbytevolgorde eerst de minst significante byte, terwijl de bytevolgorde van het netwerk, zoals gebruikt op internet, als eerste de meest significante byte is.

Voldoen aan

BSD 4.3