20 #ifndef included_punt_h 21 #define included_punt_h 27 #define foreach_punt_type \ 29 _(EXCEPTION, "exception") \ 30 _(IP_PROTO, "ip-proto") 34 #define _(v, s) PUNT_TYPE_##v, 76 char *client_pathname);
91 #define PUNT_PACKETDESC_VERSION 1 92 typedef struct __attribute__ ((packed))
104 struct sockaddr_un caddr;
122 char sun_path[
sizeof (
struct sockaddr_un)];
147 return (af <<
BITS (port) | port);
167 return (af << 16 | proto);
vlib_node_t * interface_output_node
enum punt_type_t_ punt_type_t
A registration, by a client, to direct punted traffic to a given node.
vlib_node_registration_t udp6_punt_node
(constructor) VLIB_REGISTER_NODE (udp6_punt_node)
void punt_client_walk(punt_type_t pt, punt_client_walk_cb_t cb, void *ctx)
static_always_inline u32 punt_client_l4_mk_key(ip_address_family_t af, u16 port)
vlib_node_registration_t ip4_proto_punt_socket_node
(constructor) VLIB_REGISTER_NODE (ip4_proto_punt_socket_node)
#define foreach_punt_type
clib_error_t * vnet_punt_socket_del(vlib_main_t *vm, const punt_reg_t *pr)
static_always_inline punt_client_t * punt_client_l4_get(ip_address_family_t af, u16 port)
int vlib_punt_hdl_t
Typedef for a client handle.
vlib_node_registration_t udp4_punt_socket_node
(constructor) VLIB_REGISTER_NODE (udp4_punt_socket_node)
static_always_inline punt_client_t * punt_client_ip_proto_get(ip_address_family_t af, ip_protocol_t proto)
punt_thread_data_t * thread_data
enum walk_rc_t_ walk_rc_t
Walk return code.
#define static_always_inline
punt_client_t * punt_client_pool
clib_error_t * vnet_punt_add_del(vlib_main_t *vm, const punt_reg_t *pr, bool is_add)
static_always_inline punt_client_t * punt_client_exception_get(vlib_punt_reason_t reason)
struct punt_client_db_t_ punt_client_db_t
static_always_inline u32 punt_client_ip_proto_mk_key(ip_address_family_t af, ip_protocol_t proto)
enum ip_protocol ip_protocol_t
struct punt_thread_data_t_ punt_thread_data_t
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct punt_reg_t_ punt_reg_t
vlib_node_registration_t punt_socket_rx_node
(constructor) VLIB_REGISTER_NODE (punt_socket_rx_node)
punt_exception_t exception
vlib_node_registration_t udp6_punt_socket_node
(constructor) VLIB_REGISTER_NODE (udp6_punt_socket_node)
struct punt_ip_proto_t_ punt_ip_proto_t
walk_rc_t(* punt_client_walk_cb_t)(const punt_client_t *pc, void *ctx)
struct punt_client_t_ punt_client_t
A client using the punt serivce and its registrations.
struct punt_union_t_ punt_union_t
u32 * clients_by_exception
enum ip_address_family_t_ ip_address_family_t
struct _vlib_node_registration vlib_node_registration_t
struct punt_exception_t_ punt_exception_t
struct punt_l4_t_ punt_l4_t
void * clients_by_ip_proto
vl_api_mac_event_action_t action
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
char * vnet_punt_get_server_pathname(void)
vlib_node_registration_t ip6_proto_punt_socket_node
(constructor) VLIB_REGISTER_NODE (ip6_proto_punt_socket_node)
clib_error_t * vnet_punt_socket_add(vlib_main_t *vm, u32 header_version, const punt_reg_t *pr, char *client_pathname)
vlib_punt_reason_t reason
enum vlib_punt_reason_t_ vlib_punt_reason_t
The 'syatem' defined punt reasons.
void * clients_by_l4_port
vlib_node_registration_t udp4_punt_node
(constructor) VLIB_REGISTER_NODE (udp4_punt_node)