aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2013-01-20 12:38:38 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-20 22:29:24 -0500
commitb27b28cb445975dc02d2e7d9437d23af76a51571 (patch)
treee8052e453f2a6cfe1b288b1ee16a5c9c48ee5180 /include/net/addrconf.h
parentad327910c4686f0ad17a771d71e5e38638f71173 (diff)
ipv6: Make ipv6_addr_is_XXX() return boolean.
ipv6_addr_is_{multicast,ll_all_nodes,ll_all_routers,isatap}() return boolean. 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, 4 insertions, 4 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 7cd14c007fc5..c6a44213fc74 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -281,26 +281,26 @@ static inline void addrconf_addr_solict_mult(const struct in6_addr *addr,
281 htonl(0xFF000000) | addr->s6_addr32[3]); 281 htonl(0xFF000000) | addr->s6_addr32[3]);
282} 282}
283 283
284static inline int ipv6_addr_is_multicast(const struct in6_addr *addr) 284static inline bool ipv6_addr_is_multicast(const struct in6_addr *addr)
285{ 285{
286 return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000); 286 return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000);
287} 287}
288 288
289static inline int ipv6_addr_is_ll_all_nodes(const struct in6_addr *addr) 289static inline bool ipv6_addr_is_ll_all_nodes(const struct in6_addr *addr)
290{ 290{
291 return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | 291 return ((addr->s6_addr32[0] ^ htonl(0xff020000)) |
292 addr->s6_addr32[1] | addr->s6_addr32[2] | 292 addr->s6_addr32[1] | addr->s6_addr32[2] |
293 (addr->s6_addr32[3] ^ htonl(0x00000001))) == 0; 293 (addr->s6_addr32[3] ^ htonl(0x00000001))) == 0;
294} 294}
295 295
296static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr) 296static inline bool ipv6_addr_is_ll_all_routers(const struct in6_addr *addr)
297{ 297{
298 return ((addr->s6_addr32[0] ^ htonl(0xff020000)) | 298 return ((addr->s6_addr32[0] ^ htonl(0xff020000)) |
299 addr->s6_addr32[1] | addr->s6_addr32[2] | 299 addr->s6_addr32[1] | addr->s6_addr32[2] |
300 (addr->s6_addr32[3] ^ htonl(0x00000002))) == 0; 300 (addr->s6_addr32[3] ^ htonl(0x00000002))) == 0;
301} 301}
302 302
303static inline int ipv6_addr_is_isatap(const struct in6_addr *addr) 303static inline bool ipv6_addr_is_isatap(const struct in6_addr *addr)
304{ 304{
305 return (addr->s6_addr32[2] | htonl(0x02000000)) == htonl(0x02005EFE); 305 return (addr->s6_addr32[2] | htonl(0x02000000)) == htonl(0x02005EFE);
306} 306}