summaryrefslogtreecommitdiff
path: root/lib/ipv4.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipv4.h')
-rw-r--r--lib/ipv4.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ipv4.h b/lib/ipv4.h
index fa8a27b5..de9f4e57 100644
--- a/lib/ipv4.h
+++ b/lib/ipv4.h
@@ -25,7 +25,7 @@ typedef struct ipv4_addr {
} ip_addr;
#define _I(x) (x).addr
-#define _MI(x) ((struct ip_addr) { x })
+#define _MI(x) ((struct ipv4_addr) { x })
#else
@@ -36,6 +36,8 @@ typedef u32 ip_addr;
#endif
+#define BITS_PER_IP_ADDRESS 32
+
#define IPA_NONE (_MI(0))
#define ipa_equal(x,y) (_I(x) == _I(y))
@@ -50,8 +52,6 @@ typedef u32 ip_addr;
#define ipa_ntoh(x) x = _MI(ntohl(_I(x)))
#define ipa_classify(x) ipv4_classify(_I(x))
-unsigned ipv4_mklen(u32);
-u32 ipv4_mkmask(unsigned);
int ipv4_classify(u32);
/* FIXME: Is this hash function uniformly distributed over standard routing tables? */