summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-12-10 16:13:09 +0300
committerDenis Ovsienko <infrastation@yandex.ru>2009-12-10 16:13:09 +0300
commit813f6a0064e76fdc8d509ddfbd4d3870d7027850 (patch)
treeeed75fc5da5c0a4dd5dcd20bc8c7c2523b6fd32d /lib
parent5eb9d11bf6bbe99ce47f929a14ac03351f21fe27 (diff)
ospf6d: fix warnings from recent prefix bit commit
* lib/prefix.h * prefix6_bit(): add IPv6 wrapper for prefix_bit() * ospf6d/ospf6_lsdb.c * ospf6_lsdb_type_router_head(): employ prefix6_bit() * ospf6_lsdb_type_head(): idem
Diffstat (limited to 'lib')
-rw-r--r--lib/prefix.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index d3707209..a7598b7e 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -137,6 +137,12 @@ prefix_bit (const u_char *prefix, const u_char prefixlen)
return (prefix[offset] >> shift) & 1;
}
+static inline unsigned int
+prefix6_bit (const struct in6_addr *prefix, const u_char prefixlen)
+{
+ return prefix_bit((const u_char *) &prefix->s6_addr, prefixlen);
+}
+
/* Prototypes. */
extern int afi2family (int);
extern int family2afi (int);