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>
This commit is contained in:
YOSHIFUJI Hideaki / 吉藤英明
2013-01-13 05:01:51 +00:00
committed by David S. Miller
parent 3e4e4c1f2d
commit 6502ca527f
3 changed files with 13 additions and 7 deletions

View File

@@ -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
*/