From 6502ca527f8ed2c3bb327d9db8e7e6e7dcbef511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?YOSHIFUJI=20Hideaki=20/=20=E5=90=89=E8=97=A4=E8=8B=B1?= =?UTF-8?q?=E6=98=8E?= Date: Sun, 13 Jan 2013 05:01:51 +0000 Subject: ipv6: Introduce ip6_flowinfo() to extract flowinfo (tclass + flowlabel). Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- include/net/ipv6.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/net/ipv6.h') 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 */ -- cgit v1.2.3