1#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
2type in_port_t
3type in_addr_t
4
5type sa_family_t
6
7type {struct in_addr}
8
9element {struct in_addr} in_addr_t s_addr
10
11type {struct sockaddr_in}
12
13element {struct sockaddr_in} sa_family_t sin_family
14element {struct sockaddr_in} in_port_t sin_port
15element {struct sockaddr_in} {struct in_addr} sin_addr
16element {struct sockaddr_in} {unsigned char} sin_zero [8]
17
18type {struct in6_addr}
19
20element {struct in6_addr} uint8_t s6_addr [16]
21
22type {struct sockaddr_in6}
23
24element {struct sockaddr_in6} sa_family_t sin6_family
25element {struct sockaddr_in6} in_port_t sin6_port
26element {struct sockaddr_in6} uint32_t sin6_flowinfo
27element {struct sockaddr_in6} {struct in6_addr} sin6_addr
28element {struct sockaddr_in6} uint32_t sin6_scope_id
29
30variable {const struct in6_addr} in6addr_any
31
32// constant IN6ADDR_ANY_INIT
33macro IN6ADDR_ANY_INIT
34
35variable {const struct in6_addr} in6addr_loopback
36
37// constant IN6ADDR_LOOPBACK_INIT
38macro IN6ADDR_LOOPBACK_INIT
39
40type {struct ipv6_mreq}
41
42element {struct ipv6_mreq} {struct in6_addr} ipv6mr_multiaddr
43element {struct ipv6_mreq} {unsigned int} ipv6mr_interface
44
45macro IPPROTO_IP
46macro IPPROTO_IPV6
47macro IPPROTO_ICMP
48macro IPPROTO_TCP
49macro IPPROTO_UDP
50
51macro INADDR_ANY
52macro INADDR_BROADCAST
53
54constant INET_ADDRSTRLEN == 16
55
56function uint32_t htonl (uint32_t)
57function uint16_t htons (uint16_t)
58function uint32_t ntohl (uint32_t)
59function uint16_t ntohs (uint16_t)
60
61allow-header inttypes.h
62allow-header sys/socket.h
63
64constant INET6_ADDRSTRLEN == 46
65
66macro IPV6_JOIN_GROUP
67macro IPV6_LEAVE_GROUP
68macro IPV6_MULTICAST_HOPS
69macro IPV6_MULTICAST_IF
70macro IPV6_MULTICAST_LOOP
71macro IPV6_UNICAST_HOPS
72
73macro IN6_IS_ADDR_UNSPECIFIED
74macro IN6_IS_ADDR_LOOPBACK
75macro IN6_IS_ADDR_MULTICAST
76macro IN6_IS_ADDR_LINKLOCAL
77macro IN6_IS_ADDR_SITELOCAL
78macro IN6_IS_ADDR_V4MAPPED
79macro IN6_IS_ADDR_V4COMPAT
80macro IN6_IS_ADDR_MC_NODELOCAL
81macro IN6_IS_ADDR_MC_LINKLOCAL
82macro IN6_IS_ADDR_MC_SITELOCAL
83macro IN6_IS_ADDR_MC_ORGLOCAL
84macro IN6_IS_ADDR_MC_GLOBAL
85
86allow IMPLINK_*
87allow IN_*
88allow IN6_*
89allow INADDR_*
90allow IP_*
91allow IPV6_*
92allow IPPORT_*
93allow IPPROTO_*
94allow SOCK_*
95allow sin_*
96allow sin6_*
97#endif
98