summaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-01-20 08:39:00 +0100
committerDavid S. Miller <davem@davemloft.net>2013-01-21 04:29:49 +0100
commitca97a644d752b46e5e08526e36705c3b0dd03f5f (patch)
tree2c36826f1f6e843a5bd5c0d20831290649bbca56 /include/net/addrconf.h
parentipv6: Make ipv6_addr_is_XXX() return boolean. (diff)
downloadlinux-ca97a644d752b46e5e08526e36705c3b0dd03f5f.tar.xz
linux-ca97a644d752b46e5e08526e36705c3b0dd03f5f.zip
ipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast Addresses.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index c6a44213fc74..3a3eeb407f4b 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);