From 25697773b529d80278679978b7416ca9c87e15e9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 15 May 1998 07:56:13 +0000 Subject: The library is now glued together from generic and OS-dependent parts by the `mergedirs' script. Few more IP address manipulation functions and some fixes. --- lib/ip.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ip.h') diff --git a/lib/ip.h b/lib/ip.h index c3683992..87cd3aa9 100644 --- a/lib/ip.h +++ b/lib/ip.h @@ -35,4 +35,10 @@ #define SCOPE_SITE 2 #define SCOPE_UNIVERSE 3 +/* + * Is it a valid network prefix? + */ + +#define ip_is_prefix(a,l) (!ipa_nonzero(ipa_and(a, ipa_not(ipa_mkmask(l))))) + #endif -- cgit v1.2.3