From ca97a644d752b46e5e08526e36705c3b0dd03f5f 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, 20 Jan 2013 07:39:00 +0000 Subject: ipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast Addresses. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- include/net/addrconf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/net/addrconf.h') diff --git a/include/net/addrconf.h b/include/net/addrconf.h index c6a4421..3a3eeb4 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -305,6 +305,14 @@ static inline bool ipv6_addr_is_isatap(const struct in6_addr *addr) return (addr->s6_addr32[2] | htonl(0x02000000)) == htonl(0x02005EFE); } +static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr) +{ + return (addr->s6_addr32[0] == htonl(0xff020000) && + addr->s6_addr32[1] == htonl(0x00000000) && + addr->s6_addr32[2] == htonl(0x00000001) && + addr->s6_addr[12] == 0xff); +} + #ifdef CONFIG_PROC_FS extern int if6_proc_init(void); extern void if6_proc_exit(void); -- cgit v1.1