From d8e181cbcf3b017d1cc97e4b85f2d3204a1cbc43 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 2 Feb 2010 20:16:35 +0100 Subject: lib: prefix2sockunion, prefix_common_bits helper functions prefix2sockunion converts a struct prefix* to a union sockunion *; prefix_common_bits counts the number of common bits in the prefix's address part. --- lib/prefix.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/prefix.h') diff --git a/lib/prefix.h b/lib/prefix.h index a7598b7e..f6259dee 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -156,12 +156,14 @@ extern int prefix2str (const struct prefix *, char *, int); extern int prefix_match (const struct prefix *, const struct prefix *); extern int prefix_same (const struct prefix *, const struct prefix *); extern int prefix_cmp (const struct prefix *, const struct prefix *); +extern int prefix_common_bits (const struct prefix *, const struct prefix *); extern void prefix_copy (struct prefix *dest, const struct prefix *src); extern void apply_mask (struct prefix *); extern struct prefix *sockunion2prefix (const union sockunion *dest, const union sockunion *mask); extern struct prefix *sockunion2hostprefix (const union sockunion *); +extern void prefix2sockunion (const struct prefix *, union sockunion *); extern struct prefix_ipv4 *prefix_ipv4_new (void); extern void prefix_ipv4_free (struct prefix_ipv4 *); -- cgit v1.2.3