summaryrefslogtreecommitdiffstats
path: root/lib/ipv6.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-04-28 00:39:57 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-04-28 00:39:57 +0200
commitba321706578de8402d50214a9e79a65835cdd821 (patch)
treea76b5e241ed7f7c698890f2f9fd26a3c35ed07b2 /lib/ipv6.h
parent48b0814ace2d05f9fef093d9f309bfa186a6f365 (diff)
downloadbird-ba321706578de8402d50214a9e79a65835cdd821.tar
bird-ba321706578de8402d50214a9e79a65835cdd821.zip
Better support for /31 networks.
Diffstat (limited to 'lib/ipv6.h')
-rw-r--r--lib/ipv6.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ipv6.h b/lib/ipv6.h
index e15c57a..6f8e7b3 100644
--- a/lib/ipv6.h
+++ b/lib/ipv6.h
@@ -62,7 +62,9 @@ typedef struct ipv6_addr {
#define ipa_ntoh(x) ipv6_ntoh(&(x))
#define ipa_classify(x) ipv6_classify(&(x))
#define ipa_has_link_scope(x) ipv6_has_link_scope(&(x))
-/* ipa_opposite and ipa_class_mask don't make sense with IPv6 */
+#define ipa_opposite_m1(x) ({ ip_addr _a=(x); _MI(_I0(_a),_I1(_a),_I2(_a),_I3(_a) ^ 1); })
+#define ipa_opposite_m2(x) ({ ip_addr _a=(x); _MI(_I0(_a),_I1(_a),_I2(_a),_I3(_a) ^ 3); })
+/* ipa_class_mask don't make sense with IPv6 */
/* ipa_from_u32 and ipa_to_u32 replaced by ipa_build */
#define ipa_build(a,b,c,d) _MI(a,b,c,d)
#define ipa_compare(x,y) ipv6_compare(x,y)