summaryrefslogtreecommitdiff
path: root/lib/ip.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ip.h')
-rw-r--r--lib/ip.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ip.h b/lib/ip.h
index e33adc6e..5389c44a 100644
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -15,8 +15,11 @@
#include "lib/unaligned.h"
+#define IP4_ALL_NODES ipa_build4(224, 0, 0, 1)
+#define IP4_ALL_ROUTERS ipa_build4(224, 0, 0, 2)
#define IP4_OSPF_ALL_ROUTERS ipa_build4(224, 0, 0, 5)
#define IP4_OSPF_DES_ROUTERS ipa_build4(224, 0, 0, 6)
+#define IP4_RIP_ROUTERS ipa_build4(224, 0, 0, 9)
#define IP6_ALL_NODES ipa_build6(0xFF020000, 0, 0, 1)
#define IP6_ALL_ROUTERS ipa_build6(0xFF020000, 0, 0, 2)
@@ -32,6 +35,10 @@
#define IP_PREC_INTERNET_CONTROL 0xc0
+#define IP4_HEADER_LENGTH 20
+#define IP6_HEADER_LENGTH 40
+#define UDP_HEADER_LENGTH 8
+
#ifdef IPV6
#define MAX_PREFIX_LENGTH 128