summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-11-03 20:26:54 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-11-03 22:25:44 +0100
commit0edf0c8cd919a8b3fbf5bc036f27ea0b4ed0b91a (patch)
tree07ae1b48e392992e58ad0f1a230ea180739a29b3 /lib
parent08c4c9a30b7ed61be39ddc71aebd69a0fea6a55a (diff)
Support for address family constants
We already had them defined on BGP level, but they are more general.
Diffstat (limited to 'lib')
-rw-r--r--lib/ip.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ip.h b/lib/ip.h
index 945f2893..f3b1cc31 100644
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -48,6 +48,13 @@
#define UDP_HEADER_LENGTH 8
+/* IANA Address Family Numbers */
+/* https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml */
+/* Would use AF_ prefix, but that collides with POSIX address family numbers */
+#define AFI_IPV4 1
+#define AFI_IPV6 2
+
+
#ifdef DEBUGGING
typedef struct ip4_addr {