C standard library :: inet
INET6_ADDRSTRLEN • INET_ADDRSTRLEN
htonl • htons • ntohl • ntohs • inet_nsap_ntoa • inet_ntoa
#include <arpa/inet.h>
Standard library (bibliotek) for Internet adresse familie.
Macro
Navn | Beskrivelse |
---|---|
INET_ADDRSTRLEN | IPv4 strenglængde. |
INET6_ADDRSTRLEN | IPv6 strenglængde. |
Type
Navn | Beskrivelse |
---|---|
in_addr | Struktur |
Function
Navn | Beskrivelse |
---|---|
uint32_t htonl (uint32_t hostlong) | Konverter host byte order til network byte order 32-bit |
uint16_t htons (uint16_t hostshort) | Konverter host byte order til network byte order 16-bit |
uint32_t ntohl (uint32_t netlong) | Konverter network byte order til host byte order 32-bit |
uint16_t ntohs (uint16_t netshort) | Konverter network byte order til host byte order 16-bit |
char *inet_nsap_ntoa (int len, const unsigned char *cp, char *buf) | Konverter binær ip til ascii |
char *inet_ntoa (struct in_addr in) | Konverter binær ip i in til ascii |