+/* Punting reason flags bitfield
+ * (position, length, value, name, string)
+ */
+#define foreach_vnet_punt_reason_flag \
+ _ (0, 1, 0, IP4_PACKET, "ip4-packet") \
+ _ (0, 1, 1, IP6_PACKET, "ip6-packet")
+
+typedef enum vnet_punt_reason_flag_t_
+{
+#define _(pos, len, value, name, str) \
+ VNET_PUNT_REASON_F_##name = ((value) << (pos)),
+ foreach_vnet_punt_reason_flag
+#undef _
+} __clib_packed vnet_punt_reason_flag_t;
+
+enum vnet_punt_reason_flag_mask_t_
+{
+#define _(pos, len, value, name, str) \
+ VNET_PUNT_REASON_F_MASK_##name = (((1 << (len)) - 1) << (pos)),
+ foreach_vnet_punt_reason_flag
+#undef _
+};
+
+/* predicates associated with vlib_punt_reason_flag_t*/
+#define _(pos, len, value, name, str) \
+ static_always_inline int vnet_punt_reason_flag_is_##name ( \
+ vnet_punt_reason_flag_t f) \
+ { \
+ return (f & VNET_PUNT_REASON_F_MASK_##name) == VNET_PUNT_REASON_F_##name; \
+ }
+foreach_vnet_punt_reason_flag
+#undef _
+
+#define foreach_punt_type \
+ _(L4, "l4") \
+ _(EXCEPTION, "exception") \
+ _(IP_PROTO, "ip-proto")
+
+ typedef enum punt_type_t_ {
+#define _(v, s) PUNT_TYPE_##v,
+ foreach_punt_type
+#undef _
+ } punt_type_t;
+
+typedef struct punt_l4_t_
+{
+ ip_address_family_t af;
+ ip_protocol_t protocol;
+ u16 port;
+} punt_l4_t;
+
+typedef struct punt_ip_proto_t_
+{
+ ip_address_family_t af;
+ ip_protocol_t protocol;
+} punt_ip_proto_t;
+
+typedef struct punt_exception_t_
+{
+ vlib_punt_reason_t reason;
+} punt_exception_t;
+
+typedef struct punt_union_t_
+{
+ punt_exception_t exception;
+ punt_l4_t l4;
+ punt_ip_proto_t ip_proto;
+} punt_union_t;
+
+typedef struct punt_reg_t_