[IPV6]: Support IPV6_{RECV,}TCLASS socket options / ancillary data.
Based on patch from David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
diff --git a/include/linux/in6.h b/include/linux/in6.h
index c11022f..bd32b79 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -219,9 +219,7 @@
#define IPV6_DSTOPTS 63
#define IPV6_RECVHOPLIMIT 64
#define IPV6_HOPLIMIT 65
-#if 0
#define IPV6_RECVTCLASS 66
#define IPV6_TCLASS 67
-#endif
#endif
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 2581f1c..6c5f7b3 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -245,7 +245,8 @@
ohopopts:1,
dstopts:1,
odstopts:1,
- rxflow:1;
+ rxflow:1,
+ rxtclass:1;
} bits;
__u16 all;
} rxopt;
@@ -256,6 +257,7 @@
sndflow:1,
pmtudisc:2,
ipv6only:1;
+ __u8 tclass;
__u32 dst_cookie;
@@ -269,6 +271,7 @@
struct ipv6_txoptions *opt;
struct rt6_info *rt;
int hop_limit;
+ int tclass;
} cork;
};
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 8a9fe94..65ec866 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -377,6 +377,7 @@
int length,
int transhdrlen,
int hlimit,
+ int tclass,
struct ipv6_txoptions *opt,
struct flowi *fl,
struct rt6_info *rt,
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index 8b075ab..4e86f2d 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -37,7 +37,7 @@
extern int datagram_send_ctl(struct msghdr *msg,
struct flowi *fl,
struct ipv6_txoptions *opt,
- int *hlimit);
+ int *hlimit, int *tclass);
#define LOOPBACK4_IPV6 __constant_htonl(0x7f000006)