|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
20 #ifndef included_punt_h
21 #define included_punt_h
30 #define foreach_vnet_punt_reason_flag \
31 _ (0, 1, 0, IP4_PACKET, "ip4-packet") \
32 _ (0, 1, 1, IP6_PACKET, "ip6-packet")
36 #define _(pos, len, value, name, str) \
37 VNET_PUNT_REASON_F_##name = ((value) << (pos)),
44 #define _(pos, len, value, name, str) \
45 VNET_PUNT_REASON_F_MASK_##name = (((1 << (len)) - 1) << (pos)),
51 #define _(pos, len, value, name, str) \
52 static_always_inline int vnet_punt_reason_flag_is_##name ( \
53 vnet_punt_reason_flag_t f) \
55 return (f & VNET_PUNT_REASON_F_MASK_##name) == VNET_PUNT_REASON_F_##name; \
60 #define foreach_punt_type \
62 _(EXCEPTION, "exception") \
63 _(IP_PROTO, "ip-proto")
66 #define _(v, s) PUNT_TYPE_##v,
108 char *client_pathname);
123 #define PUNT_PACKETDESC_VERSION 1
124 typedef struct __attribute__ ((packed))
136 struct sockaddr_un caddr;
154 char sun_path[
sizeof (
struct sockaddr_un)];
enum vlib_punt_reason_t_ vlib_punt_reason_t
The 'syatem' defined punt reasons.
vlib_node_registration_t udp4_punt_node
(constructor) VLIB_REGISTER_NODE (udp4_punt_node)
void punt_client_walk(punt_type_t pt, punt_client_walk_cb_t cb, void *ctx)
struct punt_union_t_ punt_union_t
A registration, by a client, to direct punted traffic to a given node.
punt_client_t * punt_client_pool
#define foreach_punt_type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_node_t * interface_output_node
struct punt_exception_t_ punt_exception_t
struct punt_client_t_ punt_client_t
A client using the punt serivce and its registrations.
vnet_punt_reason_flag_mask_t_
clib_error_t * vnet_punt_socket_add(vlib_main_t *vm, u32 header_version, const punt_reg_t *pr, char *client_pathname)
static_always_inline punt_client_t * punt_client_exception_get(vlib_punt_reason_t reason)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
clib_error_t * vnet_punt_add_del(vlib_main_t *vm, const punt_reg_t *pr, bool is_add)
void * clients_by_ip_proto
static_always_inline u32 punt_client_l4_mk_key(ip_address_family_t af, u16 port)
struct punt_client_db_t_ punt_client_db_t
static_always_inline punt_client_t * punt_client_ip_proto_get(ip_address_family_t af, ip_protocol_t proto)
clib_error_t * vnet_punt_socket_del(vlib_main_t *vm, const punt_reg_t *pr)
u32 * clients_by_exception
u8 * format_vnet_punt_reason_flags(u8 *s, va_list *args)
static_always_inline punt_client_t * punt_client_l4_get(ip_address_family_t af, u16 port)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
punt_exception_t exception
void * clients_by_l4_port
vlib_node_registration_t udp4_punt_socket_node
(constructor) VLIB_REGISTER_NODE (udp4_punt_socket_node)
#define static_always_inline
walk_rc_t(* punt_client_walk_cb_t)(const punt_client_t *pc, void *ctx)
#define foreach_vnet_punt_reason_flag
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t punt_socket_rx_node
(constructor) VLIB_REGISTER_NODE (punt_socket_rx_node)
static_always_inline u32 punt_client_ip_proto_mk_key(ip_address_family_t af, ip_protocol_t proto)
struct punt_ip_proto_t_ punt_ip_proto_t
struct punt_reg_t_ punt_reg_t
char * vnet_punt_get_server_pathname(void)
vl_api_address_family_t af
vlib_node_registration_t ip6_proto_punt_socket_node
(constructor) VLIB_REGISTER_NODE (ip6_proto_punt_socket_node)
vlib_node_registration_t udp6_punt_socket_node
(constructor) VLIB_REGISTER_NODE (udp6_punt_socket_node)
vlib_punt_reason_t reason
int vlib_punt_hdl_t
Typedef for a client handle.
enum punt_type_t_ punt_type_t
enum ip_protocol ip_protocol_t
punt_thread_data_t * thread_data
struct punt_thread_data_t_ punt_thread_data_t
enum vnet_punt_reason_flag_t_ vnet_punt_reason_flag_t
vl_api_mac_event_action_t action
enum walk_rc_t_ walk_rc_t
Walk return code.
vlib_node_registration_t ip4_proto_punt_socket_node
(constructor) VLIB_REGISTER_NODE (ip4_proto_punt_socket_node)
vlib_node_registration_t udp6_punt_node
(constructor) VLIB_REGISTER_NODE (udp6_punt_node)
enum ip_address_family_t_ ip_address_family_t
struct punt_l4_t_ punt_l4_t