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:

committed by
David S. Miller

parent
3e4e4c1f2d
commit
6502ca527f
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user