0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef _UAPI_LINUX_IN6_H
0023 #define _UAPI_LINUX_IN6_H
0024
0025 #include <linux/types.h>
0026 #include <linux/libc-compat.h>
0027
0028
0029
0030
0031
0032 #if __UAPI_DEF_IN6_ADDR
0033 struct in6_addr {
0034 union {
0035 __u8 u6_addr8[16];
0036 #if __UAPI_DEF_IN6_ADDR_ALT
0037 __be16 u6_addr16[8];
0038 __be32 u6_addr32[4];
0039 #endif
0040 } in6_u;
0041 #define s6_addr in6_u.u6_addr8
0042 #if __UAPI_DEF_IN6_ADDR_ALT
0043 #define s6_addr16 in6_u.u6_addr16
0044 #define s6_addr32 in6_u.u6_addr32
0045 #endif
0046 };
0047 #endif
0048
0049 #if __UAPI_DEF_SOCKADDR_IN6
0050 struct sockaddr_in6 {
0051 unsigned short int sin6_family;
0052 __be16 sin6_port;
0053 __be32 sin6_flowinfo;
0054 struct in6_addr sin6_addr;
0055 __u32 sin6_scope_id;
0056 };
0057 #endif
0058
0059 #if __UAPI_DEF_IPV6_MREQ
0060 struct ipv6_mreq {
0061
0062 struct in6_addr ipv6mr_multiaddr;
0063
0064
0065 int ipv6mr_ifindex;
0066 };
0067 #endif
0068
0069 #define ipv6mr_acaddr ipv6mr_multiaddr
0070
0071 struct in6_flowlabel_req {
0072 struct in6_addr flr_dst;
0073 __be32 flr_label;
0074 __u8 flr_action;
0075 __u8 flr_share;
0076 __u16 flr_flags;
0077 __u16 flr_expires;
0078 __u16 flr_linger;
0079 __u32 __flr_pad;
0080
0081 };
0082
0083 #define IPV6_FL_A_GET 0
0084 #define IPV6_FL_A_PUT 1
0085 #define IPV6_FL_A_RENEW 2
0086
0087 #define IPV6_FL_F_CREATE 1
0088 #define IPV6_FL_F_EXCL 2
0089 #define IPV6_FL_F_REFLECT 4
0090 #define IPV6_FL_F_REMOTE 8
0091
0092 #define IPV6_FL_S_NONE 0
0093 #define IPV6_FL_S_EXCL 1
0094 #define IPV6_FL_S_PROCESS 2
0095 #define IPV6_FL_S_USER 3
0096 #define IPV6_FL_S_ANY 255
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107 #define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
0108 #define IPV6_FLOWINFO_PRIORITY 0x0ff00000
0109
0110
0111 #define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
0112 #define IPV6_PRIORITY_FILLER 0x0100
0113 #define IPV6_PRIORITY_UNATTENDED 0x0200
0114 #define IPV6_PRIORITY_RESERVED1 0x0300
0115 #define IPV6_PRIORITY_BULK 0x0400
0116 #define IPV6_PRIORITY_RESERVED2 0x0500
0117 #define IPV6_PRIORITY_INTERACTIVE 0x0600
0118 #define IPV6_PRIORITY_CONTROL 0x0700
0119 #define IPV6_PRIORITY_8 0x0800
0120 #define IPV6_PRIORITY_9 0x0900
0121 #define IPV6_PRIORITY_10 0x0a00
0122 #define IPV6_PRIORITY_11 0x0b00
0123 #define IPV6_PRIORITY_12 0x0c00
0124 #define IPV6_PRIORITY_13 0x0d00
0125 #define IPV6_PRIORITY_14 0x0e00
0126 #define IPV6_PRIORITY_15 0x0f00
0127
0128
0129
0130
0131 #if __UAPI_DEF_IPPROTO_V6
0132 #define IPPROTO_HOPOPTS 0
0133 #define IPPROTO_ROUTING 43
0134 #define IPPROTO_FRAGMENT 44
0135 #define IPPROTO_ICMPV6 58
0136 #define IPPROTO_NONE 59
0137 #define IPPROTO_DSTOPTS 60
0138 #define IPPROTO_MH 135
0139 #endif
0140
0141
0142
0143
0144 #define IPV6_TLV_PAD1 0
0145 #define IPV6_TLV_PADN 1
0146 #define IPV6_TLV_ROUTERALERT 5
0147 #define IPV6_TLV_CALIPSO 7
0148 #define IPV6_TLV_IOAM 49
0149 #define IPV6_TLV_JUMBO 194
0150 #define IPV6_TLV_HAO 201
0151
0152
0153
0154
0155 #if __UAPI_DEF_IPV6_OPTIONS
0156 #define IPV6_ADDRFORM 1
0157 #define IPV6_2292PKTINFO 2
0158 #define IPV6_2292HOPOPTS 3
0159 #define IPV6_2292DSTOPTS 4
0160 #define IPV6_2292RTHDR 5
0161 #define IPV6_2292PKTOPTIONS 6
0162 #define IPV6_CHECKSUM 7
0163 #define IPV6_2292HOPLIMIT 8
0164 #define IPV6_NEXTHOP 9
0165 #define IPV6_AUTHHDR 10
0166 #define IPV6_FLOWINFO 11
0167
0168 #define IPV6_UNICAST_HOPS 16
0169 #define IPV6_MULTICAST_IF 17
0170 #define IPV6_MULTICAST_HOPS 18
0171 #define IPV6_MULTICAST_LOOP 19
0172 #define IPV6_ADD_MEMBERSHIP 20
0173 #define IPV6_DROP_MEMBERSHIP 21
0174 #define IPV6_ROUTER_ALERT 22
0175 #define IPV6_MTU_DISCOVER 23
0176 #define IPV6_MTU 24
0177 #define IPV6_RECVERR 25
0178 #define IPV6_V6ONLY 26
0179 #define IPV6_JOIN_ANYCAST 27
0180 #define IPV6_LEAVE_ANYCAST 28
0181 #define IPV6_MULTICAST_ALL 29
0182 #define IPV6_ROUTER_ALERT_ISOLATE 30
0183 #define IPV6_RECVERR_RFC4884 31
0184
0185
0186 #define IPV6_PMTUDISC_DONT 0
0187 #define IPV6_PMTUDISC_WANT 1
0188 #define IPV6_PMTUDISC_DO 2
0189 #define IPV6_PMTUDISC_PROBE 3
0190
0191
0192
0193 #define IPV6_PMTUDISC_INTERFACE 4
0194
0195
0196
0197 #define IPV6_PMTUDISC_OMIT 5
0198
0199
0200 #define IPV6_FLOWLABEL_MGR 32
0201 #define IPV6_FLOWINFO_SEND 33
0202
0203 #define IPV6_IPSEC_POLICY 34
0204 #define IPV6_XFRM_POLICY 35
0205 #define IPV6_HDRINCL 36
0206 #endif
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0227 #define IPV6_RECVPKTINFO 49
0228 #define IPV6_PKTINFO 50
0229 #define IPV6_RECVHOPLIMIT 51
0230 #define IPV6_HOPLIMIT 52
0231 #define IPV6_RECVHOPOPTS 53
0232 #define IPV6_HOPOPTS 54
0233 #define IPV6_RTHDRDSTOPTS 55
0234 #define IPV6_RECVRTHDR 56
0235 #define IPV6_RTHDR 57
0236 #define IPV6_RECVDSTOPTS 58
0237 #define IPV6_DSTOPTS 59
0238 #define IPV6_RECVPATHMTU 60
0239 #define IPV6_PATHMTU 61
0240 #define IPV6_DONTFRAG 62
0241 #if 0
0242 #define IPV6_USE_MIN_MTU 63
0243 #endif
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258 #define IPV6_RECVTCLASS 66
0259 #define IPV6_TCLASS 67
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272 #define IPV6_AUTOFLOWLABEL 70
0273
0274 #define IPV6_ADDR_PREFERENCES 72
0275
0276 #define IPV6_PREFER_SRC_TMP 0x0001
0277 #define IPV6_PREFER_SRC_PUBLIC 0x0002
0278 #define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
0279 #define IPV6_PREFER_SRC_COA 0x0004
0280 #define IPV6_PREFER_SRC_HOME 0x0400
0281 #define IPV6_PREFER_SRC_CGA 0x0008
0282 #define IPV6_PREFER_SRC_NONCGA 0x0800
0283
0284
0285 #define IPV6_MINHOPCOUNT 73
0286
0287 #define IPV6_ORIGDSTADDR 74
0288 #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
0289 #define IPV6_TRANSPARENT 75
0290 #define IPV6_UNICAST_IF 76
0291 #define IPV6_RECVFRAGSIZE 77
0292 #define IPV6_FREEBIND 78
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302 #endif