summaryrefslogtreecommitdiff
path: root/include/linux/ipv6.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r--include/linux/ipv6.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index aa2b67f..f16349d 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -1,6 +1,8 @@
#ifndef _IPV6_H
#define _IPV6_H
+#include <asm/byteorder.h>
+
/* The latest drafts declared increase in minimal mtu up to 1280. */
#define IPV6_MIN_MTU 1280
@@ -12,12 +14,6 @@
*/
-struct in6_ifreq {
- struct in6_addr ifr6_addr;
- __u32 ifr6_prefixlen;
- int ifr6_ifindex;
-};
-
#define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */
#define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */
#define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */
@@ -49,6 +45,7 @@ struct ipv6_opt_hdr {
#define ipv6_destopt_hdr ipv6_opt_hdr
#define ipv6_hopopt_hdr ipv6_opt_hdr
+
/*
* routing header type 0 (used in cmsghdr struct)
*/
@@ -83,6 +80,34 @@ struct ipv6_destopt_hao {
struct in6_addr addr;
} __attribute__((packed));
+/*
+ * IPv6 fixed header
+ *
+ * BEWARE, it is incorrect. The first 4 bits of flow_lbl
+ * are glued to priority now, forming "class".
+ */
+
+struct ipv6hdr {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 priority:4,
+ version:4;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 version:4,
+ priority:4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 flow_lbl[3];
+
+ __be16 payload_len;
+ __u8 nexthdr;
+ __u8 hop_limit;
+
+ struct in6_addr saddr;
+ struct in6_addr daddr;
+};
+
+
/* index values for the variables in ipv6_devconf */
enum {
DEVCONF_FORWARDING = 0,
@@ -117,4 +142,5 @@ enum {
DEVCONF_MAX
};
+
#endif /* _IPV6_H */