+/* 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 _
+