|
@@ -239,6 +239,7 @@ struct ip6_flowlabel {
|
|
#define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF)
|
|
#define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF)
|
|
#define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF)
|
|
#define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF)
|
|
#define IPV6_TCLASS_MASK (IPV6_FLOWINFO_MASK & ~IPV6_FLOWLABEL_MASK)
|
|
#define IPV6_TCLASS_MASK (IPV6_FLOWINFO_MASK & ~IPV6_FLOWLABEL_MASK)
|
|
|
|
+#define IPV6_TCLASS_SHIFT 20
|
|
|
|
|
|
struct ipv6_fl_socklist {
|
|
struct ipv6_fl_socklist {
|
|
struct ipv6_fl_socklist __rcu *next;
|
|
struct ipv6_fl_socklist __rcu *next;
|
|
@@ -681,6 +682,10 @@ static inline __be32 ip6_flowlabel(const struct ipv6hdr *hdr)
|
|
return *(__be32 *)hdr & IPV6_FLOWLABEL_MASK;
|
|
return *(__be32 *)hdr & IPV6_FLOWLABEL_MASK;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline u8 ip6_tclass(__be32 flowinfo)
|
|
|
|
+{
|
|
|
|
+ return ntohl(flowinfo & IPV6_TCLASS_MASK) >> IPV6_TCLASS_SHIFT;
|
|
|
|
+}
|
|
/*
|
|
/*
|
|
* Prototypes exported by ipv6
|
|
* Prototypes exported by ipv6
|
|
*/
|
|
*/
|