summaryrefslogtreecommitdiff
path: root/lib/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ip.h')
-rw-r--r--lib/ip.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ip.h b/lib/ip.h
index 87cd3aa9..5bf56fc3 100644
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -15,6 +15,8 @@
#include "ipv6.h"
#endif
+#define ipa_in_net(x,n,p) (!ipa_nonzero(ipa_and(ipa_xor((n),(x)),ipa_mkmask(p))))
+
/*
* ip_classify() returns either a negative number for invalid addresses
* or scope OR'ed together with address type.