|
ginnOS
The reference: libc, the libraries and the kernel
|
IPv4 addresses and ports, and the IP protocols. More...
Go to the source code of this file.
Data Structures | |
| struct | in_addr |
| struct | sockaddr_in |
| struct | in6_addr |
| struct | sockaddr_in6 |
Macros | |
| #define | IN6ADDR_ANY_INIT {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} |
| #define | IN6ADDR_LOOPBACK_INIT {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}} |
| #define | IPPROTO_IP 0 |
| #define | IPPROTO_ICMP 1 |
| #define | IPPROTO_TCP 6 |
| #define | IPPROTO_UDP 17 |
| #define | IPPROTO_IPV6 41 |
| #define | IPV6_V6ONLY 26 |
| #define | INADDR_ANY ((in_addr_t)0x00000000) |
| #define | INADDR_BROADCAST ((in_addr_t)0xFFFFFFFF) |
| #define | INADDR_NONE ((in_addr_t)0xFFFFFFFF) |
| #define | INADDR_LOOPBACK ((in_addr_t)0x7F000001) |
| #define | INET_ADDRSTRLEN 16 |
| #define | INET6_ADDRSTRLEN 46 |
Typedefs | |
| typedef uint32_t | in_addr_t |
| typedef uint16_t | in_port_t |
Variables | |
| const struct in6_addr | in6addr_any |
| const struct in6_addr | in6addr_loopback |
IPv4 addresses and ports, and the IP protocols.
the IPv6 types are here for programs that know both families. there is no IPv6 network: socket(AF_INET6, ...) gives EAFNOSUPPORT, and programs then use IPv4.
addresses and ports in the structs are in network byte order (big endian); htons, htonl, ntohs and ntohl change between it and the CPU's.
| #define IN6ADDR_ANY_INIT {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} |
| #define IN6ADDR_LOOPBACK_INIT {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}} |
| #define IPPROTO_IP 0 |
| #define IPPROTO_ICMP 1 |
| #define IPPROTO_TCP 6 |
| #define IPPROTO_UDP 17 |
| #define IPPROTO_IPV6 41 |
| #define IPV6_V6ONLY 26 |
| #define INADDR_ANY ((in_addr_t)0x00000000) |
| #define INADDR_BROADCAST ((in_addr_t)0xFFFFFFFF) |
| #define INADDR_NONE ((in_addr_t)0xFFFFFFFF) |
| #define INADDR_LOOPBACK ((in_addr_t)0x7F000001) |
| #define INET_ADDRSTRLEN 16 |
| #define INET6_ADDRSTRLEN 46 |
|
extern |
|
extern |