diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2013-01-13 05:01:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-13 20:17:13 -0500 |
commit | 6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511 (patch) | |
tree | ac76c5941e5ec45ab6ee8b0aa26db67eb67930f6 /include/net/ipv6.h | |
parent | 3e4e4c1f2da66b29ee9379ca29f8dd620c2b5a1f (diff) | |
download | linux-3.10-6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511.tar.gz linux-3.10-6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511.tar.bz2 linux-3.10-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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index fcbc6464b01..ed672080c69 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 */ |