]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Added function for converting of IP addresses to printable form.
authorMartin Mares <mj@ucw.cz>
Wed, 17 Jun 1998 14:26:30 +0000 (14:26 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 17 Jun 1998 14:26:30 +0000 (14:26 +0000)
lib/ip.h
lib/ipv4.h
lib/ipv6.h

index 5bf56fc33f02065c0e807bfb271fb645194c6b74..2e9c8a5d2c7106c4053565617406508f1a523693 100644 (file)
--- a/lib/ip.h
+++ b/lib/ip.h
 
 #define ip_is_prefix(a,l) (!ipa_nonzero(ipa_and(a, ipa_not(ipa_mkmask(l)))))
 
+/*
+ *     Conversions between internal and string representation
+ */
+
+char *ip_ntop(ip_addr a, char *);
+char *ip_ntox(ip_addr a, char *);
+
 #endif
index af2194ca71d686c08922777338616a0f92e6e836..e38dce6b27ed65d871ff92b21669ca0037592836 100644 (file)
@@ -37,6 +37,7 @@ typedef u32 ip_addr;
 #endif
 
 #define BITS_PER_IP_ADDRESS 32
+#define STD_ADDRESS_P_LENGTH 15
 
 #define IPA_NONE (_MI(0))
 
index 3f775d4c12e441887bc54f6bd462d724a705a1b7..1cf52a935c928fbab1366958df930858552773f8 100644 (file)
@@ -23,6 +23,7 @@ typedef struct ipv4_addr {
 #define _I3(a) ((a).addr[3])
 
 #define BITS_PER_IP_ADDRESS 128
+#define STD_ADDRESS_P_LENGTH 39
 
 #define IPA_NONE _MI(0,0,0,0)