diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-28 00:39:57 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-28 00:39:57 +0200 |
commit | ba321706578de8402d50214a9e79a65835cdd821 (patch) | |
tree | a76b5e241ed7f7c698890f2f9fd26a3c35ed07b2 /lib/ipv4.h | |
parent | 48b0814ace2d05f9fef093d9f309bfa186a6f365 (diff) |
Better support for /31 networks.
Diffstat (limited to 'lib/ipv4.h')
-rw-r--r-- | lib/ipv4.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -56,7 +56,8 @@ typedef u32 ip_addr; #define ipa_ntoh(x) x = _MI(ntohl(_I(x))) #define ipa_classify(x) ipv4_classify(_I(x)) #define ipa_has_link_scope(x) ipv4_has_link_scope(_I(x)) -#define ipa_opposite(x,len) _MI(_I(x) ^ (len == 30 ? 3 : 1)) +#define ipa_opposite_m1(x) _MI(_I(x) ^ 1) +#define ipa_opposite_m2(x) _MI(_I(x) ^ 3) #define ipa_class_mask(x) _MI(ipv4_class_mask(_I(x))) #define ipa_from_u32(x) _MI(x) #define ipa_to_u32(x) _I(x) |