summaryrefslogtreecommitdiff
path: root/lib/ip.h
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2015-12-18 11:57:38 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-20 13:47:39 +0100
commit7fd4143eadd5af6e1ad7825d7d7506ad021bf1ad (patch)
treeb16f93737a5bda12b6677a5ad3f45cf5b1c13c30 /lib/ip.h
parent9656dce72eead158e6da3ad560720bb0addfe7e2 (diff)
Integrated address print lengths
Minor changes by Ondrej Santiago Zajicek
Diffstat (limited to 'lib/ip.h')
-rw-r--r--lib/ip.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ip.h b/lib/ip.h
index 1834db4f..7a31dad0 100644
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -33,6 +33,10 @@
#define IP4_MAX_PREFIX_LENGTH 32
#define IP6_MAX_PREFIX_LENGTH 128
+#define IP4_MAX_TEXT_LENGTH 15 /* "255.255.255.255" */
+#define IP6_MAX_TEXT_LENGTH 39 /* "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" */
+#define IPA_MAX_TEXT_LENGTH 39
+
#define IP4_MIN_MTU 576
#define IP6_MIN_MTU 1280
@@ -42,12 +46,6 @@
#define IP6_HEADER_LENGTH 40
#define UDP_HEADER_LENGTH 8
-#ifdef IPV6
-#define STD_ADDRESS_P_LENGTH 39
-#else
-#define STD_ADDRESS_P_LENGTH 15
-#endif
-
#ifdef DEBUGGING