+typedef walk_rc_t (*punt_client_walk_cb_t) (const punt_client_t * pc,
+ void *ctx);
+extern void punt_client_walk (punt_type_t pt,
+ punt_client_walk_cb_t cb, void *ctx);
+
+/*
+ * inlines for the data-plane
+ */
+static_always_inline u32
+punt_client_l4_mk_key (ip_address_family_t af, u16 port)
+{
+ return (af << BITS (port) | port);
+}
+
+static_always_inline punt_client_t *
+punt_client_l4_get (ip_address_family_t af, u16 port)
+{
+ punt_main_t *pm = &punt_main;
+ uword *p;
+
+ p = hash_get (pm->db.clients_by_l4_port, punt_client_l4_mk_key (af, port));
+
+ if (p)
+ return (pool_elt_at_index (pm->punt_client_pool, p[0]));
+
+ return (NULL);
+}
+
+static_always_inline u32
+punt_client_ip_proto_mk_key (ip_address_family_t af, ip_protocol_t proto)
+{
+ return (af << 16 | proto);
+}
+
+static_always_inline punt_client_t *
+punt_client_ip_proto_get (ip_address_family_t af, ip_protocol_t proto)
+{
+ punt_main_t *pm = &punt_main;
+ uword *p;
+
+ p =
+ hash_get (pm->db.clients_by_ip_proto,
+ punt_client_ip_proto_mk_key (af, proto));
+
+ if (p)
+ return (pool_elt_at_index (pm->punt_client_pool, p[0]));
+
+ return (NULL);
+}
+
+static_always_inline punt_client_t *
+punt_client_exception_get (vlib_punt_reason_t reason)
+{
+ punt_main_t *pm = &punt_main;
+ u32 pci;
+
+ if (reason >= vec_len (pm->db.clients_by_exception))
+ return (NULL);
+
+ pci = pm->db.clients_by_exception[reason];
+
+ if (~0 != pci)
+ return (pool_elt_at_index (pm->punt_client_pool, pci));
+
+ return (NULL);
+}
+
+extern vlib_node_registration_t udp4_punt_node;
+extern vlib_node_registration_t udp6_punt_node;
+extern vlib_node_registration_t udp4_punt_socket_node;
+extern vlib_node_registration_t udp6_punt_socket_node;
+extern vlib_node_registration_t ip4_proto_punt_socket_node;
+extern vlib_node_registration_t ip6_proto_punt_socket_node;
+extern vlib_node_registration_t punt_socket_rx_node;
+