diff options
author | Martin Mares <mj@ucw.cz> | 1998-05-15 07:56:13 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-05-15 07:56:13 +0000 |
commit | 25697773b529d80278679978b7416ca9c87e15e9 (patch) | |
tree | 8ca875571e57475a15e978abae76aeda58d82149 /lib/ipv4.h | |
parent | 62aa008abd627c6862310daf65ffd337a920bdbb (diff) |
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.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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? */ |