4 #include <linux/config.h>
6 #include <asm/byteorder.h>
8 /* The latest drafts declared increase in minimal mtu up to 1280. */
10 #define IPV6_MIN_MTU 1280
14 * source interface/address selection, source routing, etc...
15 * *under construction*
20 struct in6_addr ipi6_addr;
26 struct in6_addr ifr6_addr;
31 #define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */
32 #define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */
45 * variable length field
54 * TLV encoded option data follows.
58 #define ipv6_destopt_hdr ipv6_opt_hdr
59 #define ipv6_hopopt_hdr ipv6_opt_hdr
62 #define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
66 * routing header type 0 (used in cmsghdr struct)
70 struct ipv6_rt_hdr rt_hdr;
71 __u32 bitmap; /* strict/loose bit map */
72 struct in6_addr addr[0];
74 #define rt0_type rt_hdr.type;
77 struct ipv6_auth_hdr {
79 __u8 hdrlen; /* This one is measured in 32 bit units! */
82 __u32 seq_no; /* Sequence number */
83 __u8 auth_data[0]; /* Length variable but >=4. Mind the 64 bit alignment! */
88 __u32 seq_no; /* Sequence number */
89 __u8 enc_data[0]; /* Length variable but >=8. Mind the 64 bit alignment! */
92 struct ipv6_comp_hdr {
101 * BEWARE, it is incorrect. The first 4 bits of flow_lbl
102 * are glued to priority now, forming "class".
106 #if defined(__LITTLE_ENDIAN_BITFIELD)
109 #elif defined(__BIG_ENDIAN_BITFIELD)
113 #error "Please fix <asm/byteorder.h>"
121 struct in6_addr saddr;
122 struct in6_addr daddr;
126 #include <linux/in6.h> /* struct sockaddr_in6 */
127 #include <linux/icmpv6.h>
128 #include <net/if_inet6.h> /* struct ipv6_mc_socklist */
129 #include <linux/tcp.h>
130 #include <linux/udp.h>
133 This structure contains results of exthdrs parsing
134 as offsets from skb->nh.
137 struct inet6_skb_parm
149 struct in6_addr saddr;
150 struct in6_addr rcv_saddr;
151 struct in6_addr daddr;
152 struct in6_addr *daddr_cache;
160 /* pktoption flags */
181 struct ipv6_mc_socklist *ipv6_mc_list;
182 struct ipv6_ac_socklist *ipv6_ac_list;
183 struct ipv6_fl_socklist *ipv6_fl_list;
186 struct ipv6_txoptions *opt;
187 struct sk_buff *pktoptions;
189 struct ipv6_txoptions *opt;
196 __u32 checksum; /* perform checksum */
197 __u32 offset; /* checksum offset */
199 struct icmp6_filter filter;
202 /* WARNING: don't change the layout of the members in {raw,udp,tcp}6_sock! */
205 struct ipv6_pinfo *pinet6;
206 struct inet_opt inet;
207 struct raw6_opt raw6;
208 struct ipv6_pinfo inet6;
213 struct ipv6_pinfo *pinet6;
214 struct inet_opt inet;
216 struct ipv6_pinfo inet6;
221 struct ipv6_pinfo *pinet6;
222 struct inet_opt inet;
224 struct ipv6_pinfo inet6;
227 #define inet6_sk(__sk) ((struct raw6_sock *)__sk)->pinet6
228 #define raw6_sk(__sk) (&((struct raw6_sock *)__sk)->raw6)
230 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
231 #define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only)
232 #define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk))
234 #define __ipv6_only_sock(sk) 0
235 #define ipv6_only_sock(sk) 0