aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-05-15 02:13:37 -0700
committerOle Trøan <otroan@employees.org>2019-05-28 13:30:44 +0000
commit50f0ac0f097e5495da1f2b1816106e3d420ff34b (patch)
treed10ae0385fc10b7da97b2a24f8dea3882f6d702d /src/vnet/ip/ip.h
parent9080096f7c548415fc4d5354c7e582a3eda1a5ed (diff)
Punt: socket register for exception dispatched/punted packets based on reason
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip.h')
-rw-r--r--src/vnet/ip/ip.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.h b/src/vnet/ip/ip.h
index b114fcbaaf6..7a82dcf8f2b 100644
--- a/src/vnet/ip/ip.h
+++ b/src/vnet/ip/ip.h
@@ -65,6 +65,19 @@
#include <vnet/ip/icmp6.h>
#include <vnet/classify/vnet_classify.h>
+typedef enum ip_address_family_t_
+{
+ AF_IP4,
+ AF_IP6,
+} ip_address_family_t;
+
+extern uword unformat_ip_address_family (unformat_input_t * input,
+ va_list * args);
+extern u8 *format_ip_address_family (u8 * s, va_list * args);
+
+#define FOR_EACH_IP_ADDRESS_FAMILY(_af) \
+ for (_af = AF_IP4; _af <= AF_IP6; _af++)
+
#define u8_ptr_add(ptr, index) (((u8 *)ptr) + index)
#define u16_net_add(u, val) clib_host_to_net_u16(clib_net_to_host_u16(u) + (val))