diff options
Diffstat (limited to 'include/uapi/linux/in6.h')
-rw-r--r-- | include/uapi/linux/in6.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index 53b1d56a6e7f..440d5c479145 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h | |||
@@ -22,22 +22,30 @@ | |||
22 | #define _UAPI_LINUX_IN6_H | 22 | #define _UAPI_LINUX_IN6_H |
23 | 23 | ||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/libc-compat.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * IPv6 address structure | 28 | * IPv6 address structure |
28 | */ | 29 | */ |
29 | 30 | ||
31 | #if __UAPI_DEF_IN6_ADDR | ||
30 | struct in6_addr { | 32 | struct in6_addr { |
31 | union { | 33 | union { |
32 | __u8 u6_addr8[16]; | 34 | __u8 u6_addr8[16]; |
35 | #if __UAPI_DEF_IN6_ADDR_ALT | ||
33 | __be16 u6_addr16[8]; | 36 | __be16 u6_addr16[8]; |
34 | __be32 u6_addr32[4]; | 37 | __be32 u6_addr32[4]; |
38 | #endif | ||
35 | } in6_u; | 39 | } in6_u; |
36 | #define s6_addr in6_u.u6_addr8 | 40 | #define s6_addr in6_u.u6_addr8 |
41 | #if __UAPI_DEF_IN6_ADDR_ALT | ||
37 | #define s6_addr16 in6_u.u6_addr16 | 42 | #define s6_addr16 in6_u.u6_addr16 |
38 | #define s6_addr32 in6_u.u6_addr32 | 43 | #define s6_addr32 in6_u.u6_addr32 |
44 | #endif | ||
39 | }; | 45 | }; |
46 | #endif /* __UAPI_DEF_IN6_ADDR */ | ||
40 | 47 | ||
48 | #if __UAPI_DEF_SOCKADDR_IN6 | ||
41 | struct sockaddr_in6 { | 49 | struct sockaddr_in6 { |
42 | unsigned short int sin6_family; /* AF_INET6 */ | 50 | unsigned short int sin6_family; /* AF_INET6 */ |
43 | __be16 sin6_port; /* Transport layer port # */ | 51 | __be16 sin6_port; /* Transport layer port # */ |
@@ -45,7 +53,9 @@ struct sockaddr_in6 { | |||
45 | struct in6_addr sin6_addr; /* IPv6 address */ | 53 | struct in6_addr sin6_addr; /* IPv6 address */ |
46 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ | 54 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ |
47 | }; | 55 | }; |
56 | #endif /* __UAPI_DEF_SOCKADDR_IN6 */ | ||
48 | 57 | ||
58 | #if __UAPI_DEF_IPV6_MREQ | ||
49 | struct ipv6_mreq { | 59 | struct ipv6_mreq { |
50 | /* IPv6 multicast address of group */ | 60 | /* IPv6 multicast address of group */ |
51 | struct in6_addr ipv6mr_multiaddr; | 61 | struct in6_addr ipv6mr_multiaddr; |
@@ -53,6 +63,7 @@ struct ipv6_mreq { | |||
53 | /* local IPv6 address of interface */ | 63 | /* local IPv6 address of interface */ |
54 | int ipv6mr_ifindex; | 64 | int ipv6mr_ifindex; |
55 | }; | 65 | }; |
66 | #endif /* __UAPI_DEF_IVP6_MREQ */ | ||
56 | 67 | ||
57 | #define ipv6mr_acaddr ipv6mr_multiaddr | 68 | #define ipv6mr_acaddr ipv6mr_multiaddr |
58 | 69 | ||
@@ -114,13 +125,24 @@ struct in6_flowlabel_req { | |||
114 | /* | 125 | /* |
115 | * IPV6 extension headers | 126 | * IPV6 extension headers |
116 | */ | 127 | */ |
117 | #define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ | 128 | #if __UAPI_DEF_IPPROTO_V6 |
118 | #define IPPROTO_ROUTING 43 /* IPv6 routing header */ | 129 | enum { |
119 | #define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ | 130 | IPPROTO_HOPOPTS = 0, /* IPv6 hop-by-hop options */ |
120 | #define IPPROTO_ICMPV6 58 /* ICMPv6 */ | 131 | #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS |
121 | #define IPPROTO_NONE 59 /* IPv6 no next header */ | 132 | IPPROTO_ROUTING = 43, /* IPv6 routing header */ |
122 | #define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ | 133 | #define IPPROTO_ROUTING IPPROTO_ROUTING |
123 | #define IPPROTO_MH 135 /* IPv6 mobility header */ | 134 | IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */ |
135 | #define IPPROTO_FRAGMENT IPPROTO_FRAGMENT | ||
136 | IPPROTO_ICMPV6 = 58, /* ICMPv6 */ | ||
137 | #define IPPROTO_ICMPV6 IPPROTO_ICMPV6 | ||
138 | IPPROTO_NONE = 59, /* IPv6 no next header */ | ||
139 | #define IPPROTO_NONE IPPROTO_NONE | ||
140 | IPPROTO_DSTOPTS = 60, /* IPv6 destination options */ | ||
141 | #define IPPROTO_DSTOPTS IPPROTO_DSTOPTS | ||
142 | IPPROTO_MH = 135, /* IPv6 mobility header */ | ||
143 | #define IPPROTO_MH IPPROTO_MH | ||
144 | }; | ||
145 | #endif /* __UAPI_DEF_IPPROTO_V6 */ | ||
124 | 146 | ||
125 | /* | 147 | /* |
126 | * IPv6 TLV options. | 148 | * IPv6 TLV options. |