summaryrefslogtreecommitdiffstats
path: root/lib/ipv4.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-05-15 09:56:13 +0200
committerMartin Mares <mj@ucw.cz>1998-05-15 09:56:13 +0200
commit25697773b529d80278679978b7416ca9c87e15e9 (patch)
tree8ca875571e57475a15e978abae76aeda58d82149 /lib/ipv4.h
parent62aa008abd627c6862310daf65ffd337a920bdbb (diff)
downloadbird-25697773b529d80278679978b7416ca9c87e15e9.tar
bird-25697773b529d80278679978b7416ca9c87e15e9.zip
The library is now glued together from generic and OS-dependent parts
by the `mergedirs' script. Few more IP address manipulation functions and some fixes.
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 fa8a27b..de9f4e5 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? */