64#define s6_addr __s6_addr.__s6_addr8
130#define INADDR_ANY 0x00000000
137#define INADDR_BROADCAST 0xFFFFFFFF
146#define INADDR_NONE 0xFFFFFFFF
154#define IN6ADDR_ANY_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, \
155 0, 0, 0, 0, 0, 0, 0, 0 }}}
163#define IN6ADDR_LOOPBACK_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, \
164 0, 0, 0, 0, 0, 0, 0, 1 }}}
183#define INET_ADDRSTRLEN 16
188#define INET6_ADDRSTRLEN 46
198#define IPPROTO_ICMP 1
208#define IPPROTO_UDP 17
213#define IPPROTO_IPV6 41
218#define IPPROTO_UDPLITE 136
262#define IPV6_JOIN_GROUP 17
263#define IPV6_LEAVE_GROUP 18
264#define IPV6_MULTICAST_HOPS 19
265#define IPV6_MULTICAST_IF 20
266#define IPV6_MULTICAST_LOOP 21
267#define IPV6_UNICAST_HOPS 22
268#define IPV6_V6ONLY 23
282#define IN6_IS_ADDR_UNSPECIFIED(a) \
283 ((a)->__s6_addr.__s6_addr32[0] == 0 && \
284 (a)->__s6_addr.__s6_addr32[1] == 0 && \
285 (a)->__s6_addr.__s6_addr32[2] == 0 && \
286 (a)->__s6_addr.__s6_addr32[3] == 0)
298#define IN6_IS_ADDR_LOOPBACK(a) \
299 ((a)->__s6_addr.__s6_addr32[0] == 0 && \
300 (a)->__s6_addr.__s6_addr32[1] == 0 && \
301 (a)->__s6_addr.__s6_addr32[2] == 0 && \
302 (a)->__s6_addr.__s6_addr16[6] == 0 && \
303 (a)->__s6_addr.__s6_addr8[14] == 0 && \
304 (a)->__s6_addr.__s6_addr8[15] == 1)
316#define IN6_IS_ADDR_V4MAPPED(a) \
317 ((a)->__s6_addr.__s6_addr32[0] == 0 && \
318 (a)->__s6_addr.__s6_addr32[1] == 0 && \
319 (a)->__s6_addr.__s6_addr16[4] == 0 && \
320 (a)->__s6_addr.__s6_addr16[5] == 0xFFFF)
332#define IN6_IS_ADDR_V4COMPAT(a) \
333 ((a)->__s6_addr.__s6_addr32[0] == 0 && \
334 (a)->__s6_addr.__s6_addr32[1] == 0 && \
335 (a)->__s6_addr.__s6_addr32[2] == 0 && \
336 (a)->__s6_addr.__s6_addr32[3] != 0 && \
337 (a)->__s6_addr.__s6_addr8[15] != 1)
349#define IN6_IS_ADDR_LINKLOCAL(a) \
350 (((a)->__s6_addr.__s6_addr8[0] == 0xFE) && \
351 (((a)->__s6_addr.__s6_addr8[1] & 0xC0) == 0x80))
363#define IN6_IS_ADDR_SITELOCAL(a) \
364 (((a)->__s6_addr.__s6_addr8[0] == 0xFE) && \
365 (((a)->__s6_addr.__s6_addr8[1] & 0xC0) == 0xC0))
377#define IN6_IS_ADDR_MULTICAST(a) \
378 ((a)->__s6_addr.__s6_addr8[0] == 0xFF)
391#define IN6_IS_ADDR_MC_NODELOCAL(a) \
392 (IN6_IS_ADDR_MULTICAST(a) && \
393 (((a)->__s6_addr.__s6_addr8[1] & 0x0F) == 0x01))
406#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
407 (IN6_IS_ADDR_MULTICAST(a) && \
408 (((a)->__s6_addr.__s6_addr8[1] & 0x0F) == 0x02))
421#define IN6_IS_ADDR_MC_SITELOCAL(a) \
422 (IN6_IS_ADDR_MULTICAST(a) && \
423 (((a)->__s6_addr.__s6_addr8[1] & 0x0F) == 0x05))
436#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
437 (IN6_IS_ADDR_MULTICAST(a) && \
438 (((a)->__s6_addr.__s6_addr8[1] & 0x0F) == 0x08))
451#define IN6_IS_ADDR_MC_GLOBAL(a) \
452 (IN6_IS_ADDR_MULTICAST(a) && \
453 (((a)->__s6_addr.__s6_addr8[1] & 0x0F) == 0x0E))
uint16_t in_port_t
16-bit type used to store a value for an internet port.
Definition in.h:38
uint32_t in_addr_t
32-bit value used to store an IPv4 address.
Definition in.h:43
const struct in6_addr in6addr_loopback
IPv6 loopback address.
const struct in6_addr in6addr_any
IPv6 local host address.
__uint8_t sa_family_t
Socket address family type.
Definition socket.h:42
Definitions for internet operations.
Structure used to store an IPv6 address.
Definition in.h:57
uint8_t __s6_addr8[16]
Definition in.h:59
uint16_t __s6_addr16[8]
Definition in.h:60
uint64_t __s6_addr64[2]
Definition in.h:62
union in6_addr::@0 __s6_addr
uint32_t __s6_addr32[4]
Definition in.h:61
Structure used to store an IPv4 address.
Definition in.h:49
in_addr_t s_addr
Definition in.h:50
Structure used to store an IPv6 address for a socket.
Definition in.h:107
in_port_t sin6_port
Port for the socket.
Definition in.h:112
struct in6_addr sin6_addr
Address for the socket.
Definition in.h:118
uint32_t sin6_flowinfo
Traffic class and flow information.
Definition in.h:115
uint32_t sin6_scope_id
Set of interfaces for a scope.
Definition in.h:121
sa_family_t sin6_family
Family for the socket.
Definition in.h:109
Structure used to store an IPv4 address for a socket.
Definition in.h:84
unsigned char sin_zero[8]
Empty space, ignored for all intents and purposes.
Definition in.h:95
struct in_addr sin_addr
Address for the socket.
Definition in.h:92
sa_family_t sin_family
Family for the socket.
Definition in.h:86
in_port_t sin_port
Port for the socket.
Definition in.h:89