summaryrefslogtreecommitdiff
path: root/lib/ip.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-06-01 21:36:58 +0000
committerMartin Mares <mj@ucw.cz>1998-06-01 21:36:58 +0000
commit0fe3b28b68f10a32f3fe43e8221559a72be5ca28 (patch)
tree3ad21f20008709e91afdd2c50420732c3f24fc31 /lib/ip.h
parentaf847acc27978cf48721aafbacab70e48f42ede7 (diff)
Added ipa_xor() and ipa_in_net().
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.