diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/prefix.h | 6 |
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); |