Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ipv6.h
Go to the documentation of this file.
1 #ifndef _UAPI_IPV6_H
2 #define _UAPI_IPV6_H
3 
4 #include <linux/types.h>
5 #include <linux/in6.h>
6 #include <asm/byteorder.h>
7 
8 /* The latest drafts declared increase in minimal mtu up to 1280. */
9 
10 #define IPV6_MIN_MTU 1280
11 
12 /*
13  * Advanced API
14  * source interface/address selection, source routing, etc...
15  * *under construction*
16  */
17 
18 
19 struct in6_pktinfo {
22 };
23 
24 struct ip6_mtuinfo {
27 };
28 
29 struct in6_ifreq {
33 };
34 
35 #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */
36 #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */
37 #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */
38 
39 /*
40  * routing header
41  */
42 struct ipv6_rt_hdr {
47 
48  /*
49  * type specific data
50  * variable length field
51  */
52 };
53 
54 
55 struct ipv6_opt_hdr {
58  /*
59  * TLV encoded option data follows.
60  */
61 } __attribute__((packed)); /* required for some archs */
62 
63 #define ipv6_destopt_hdr ipv6_opt_hdr
64 #define ipv6_hopopt_hdr ipv6_opt_hdr
65 
66 
67 /*
68  * routing header type 0 (used in cmsghdr struct)
69  */
70 
71 struct rt0_hdr {
74  struct in6_addr addr[0];
75 
76 #define rt0_type rt_hdr.type
77 };
78 
79 /*
80  * routing header type 2
81  */
82 
83 struct rt2_hdr {
86  struct in6_addr addr;
87 
88 #define rt2_type rt_hdr.type
89 };
90 
91 /*
92  * home address option in destination options header
93  */
94 
98  struct in6_addr addr;
99 } __attribute__((packed));
101 /*
102  * IPv6 fixed header
103  *
104  * BEWARE, it is incorrect. The first 4 bits of flow_lbl
105  * are glued to priority now, forming "class".
106  */
107 
108 struct ipv6hdr {
109 #if defined(__LITTLE_ENDIAN_BITFIELD)
110  __u8 priority:4,
111  version:4;
112 #elif defined(__BIG_ENDIAN_BITFIELD)
113  __u8 version:4,
114  priority:4;
115 #else
116 #error "Please fix <asm/byteorder.h>"
117 #endif
119 
123 
124  struct in6_addr saddr;
125  struct in6_addr daddr;
126 };
127 
128 
129 /* index values for the variables in ipv6_devconf */
130 enum {
161 };
162 
163 
164 #endif /* _UAPI_IPV6_H */