summaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-13 05:01:51 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-13 20:17:13 -0500
commit6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511 (patch)
treeac76c5941e5ec45ab6ee8b0aa26db67eb67930f6 /include/net/ipv6.h
parent3e4e4c1f2da66b29ee9379ca29f8dd620c2b5a1f (diff)
downloadlinux-6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511.tar.gz
linux-6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511.tar.bz2
linux-6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511.zip
ipv6: Introduce ip6_flowinfo() to extract flowinfo (tclass + flowlabel).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index fcbc6464b014..ed672080c690 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -555,6 +555,11 @@ static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
*(__be32 *)hdr = ntohl(0x60000000 | (tclass << 20)) | flowlabel;
}
+static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)
+{
+ return *(__be32 *)hdr & IPV6_FLOWINFO_MASK;
+}
+
/*
* Prototypes exported by ipv6
*/