FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
punt.h File Reference

Definitions for punt infrastructure. More...

+ Include dependency graph for punt.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  punt_l4_t_
 
struct  punt_ip_proto_t_
 
struct  punt_exception_t_
 
struct  punt_union_t_
 
struct  punt_reg_t_
 A registration, by a client, to direct punted traffic to a given node. More...
 
struct  punt_packetdesc_t
 
struct  punt_client_t
 
struct  punt_client_db_t_
 
struct  punt_thread_data_t_
 
struct  punt_main_t
 

Macros

#define foreach_vnet_punt_reason_flag
 
#define foreach_punt_type
 
#define PUNT_PACKETDESC_VERSION   1
 

Typedefs

typedef enum vnet_punt_reason_flag_t_ vnet_punt_reason_flag_t
 
typedef enum punt_type_t_ punt_type_t
 
typedef struct punt_l4_t_ punt_l4_t
 
typedef struct punt_ip_proto_t_ punt_ip_proto_t
 
typedef struct punt_exception_t_ punt_exception_t
 
typedef struct punt_union_t_ punt_union_t
 
typedef struct punt_reg_t_ punt_reg_t
 
typedef struct punt_client_db_t_ punt_client_db_t
 
typedef struct punt_thread_data_t_ punt_thread_data_t
 
typedef walk_rc_t(* punt_client_walk_cb_t) (const punt_client_t *pc, void *ctx)
 

Enumerations

enum  vnet_punt_reason_flag_t_ { foreach_vnet_punt_reason_flag }
 
enum  vnet_punt_reason_flag_mask_t_ { foreach_vnet_punt_reason_flag }
 
enum  punt_type_t_ { foreach_punt_type }
 
enum  punt_action_e { PUNT_L2 = 0, PUNT_IP4_ROUTED, PUNT_IP6_ROUTED }
 

Functions

clib_error_tvnet_punt_add_del (vlib_main_t *vm, const punt_reg_t *pr, bool is_add)
 
clib_error_tvnet_punt_socket_add (vlib_main_t *vm, u32 header_version, const punt_reg_t *pr, char *client_pathname)
 
clib_error_tvnet_punt_socket_del (vlib_main_t *vm, const punt_reg_t *pr)
 
char * vnet_punt_get_server_pathname (void)
 
void punt_client_walk (punt_type_t pt, punt_client_walk_cb_t cb, void *ctx)
 
u8format_vnet_punt_reason_flags (u8 *s, va_list *args)
 
static_always_inline u32 punt_client_l4_mk_key (ip_address_family_t af, u16 port)
 
static_always_inline punt_client_tpunt_client_l4_get (ip_address_family_t af, u16 port)
 
static_always_inline u32 punt_client_ip_proto_mk_key (ip_address_family_t af, ip_protocol_t proto)
 
static_always_inline punt_client_tpunt_client_ip_proto_get (ip_address_family_t af, ip_protocol_t proto)
 
static_always_inline punt_client_tpunt_client_exception_get (vlib_punt_reason_t reason)
 

Variables

punt_main_t punt_main
 
vlib_node_registration_t udp4_punt_node
 (constructor) VLIB_REGISTER_NODE (udp4_punt_node) More...
 
vlib_node_registration_t udp6_punt_node
 (constructor) VLIB_REGISTER_NODE (udp6_punt_node) More...
 
vlib_node_registration_t udp4_punt_socket_node
 (constructor) VLIB_REGISTER_NODE (udp4_punt_socket_node) More...
 
vlib_node_registration_t udp6_punt_socket_node
 (constructor) VLIB_REGISTER_NODE (udp6_punt_socket_node) More...
 
vlib_node_registration_t ip4_proto_punt_socket_node
 (constructor) VLIB_REGISTER_NODE (ip4_proto_punt_socket_node) More...
 
vlib_node_registration_t ip6_proto_punt_socket_node
 (constructor) VLIB_REGISTER_NODE (ip6_proto_punt_socket_node) More...
 
vlib_node_registration_t punt_socket_rx_node
 (constructor) VLIB_REGISTER_NODE (punt_socket_rx_node) More...
 

Detailed Description

Definitions for punt infrastructure.

Definition in file punt.h.

Macro Definition Documentation

◆ foreach_punt_type

#define foreach_punt_type
Value:
_(L4, "l4") \
_(EXCEPTION, "exception") \
_(IP_PROTO, "ip-proto")

Definition at line 60 of file punt.h.

◆ foreach_vnet_punt_reason_flag

foreach_vnet_punt_reason_flag
Value:
_ (0, 1, 0, IP4_PACKET, "ip4-packet") \
_ (0, 1, 1, IP6_PACKET, "ip6-packet")

Definition at line 30 of file punt.h.

◆ PUNT_PACKETDESC_VERSION

#define PUNT_PACKETDESC_VERSION   1

Definition at line 123 of file punt.h.

Typedef Documentation

◆ punt_client_db_t

◆ punt_client_walk_cb_t

typedef walk_rc_t(* punt_client_walk_cb_t) (const punt_client_t *pc, void *ctx)

Definition at line 169 of file punt.h.

◆ punt_exception_t

◆ punt_ip_proto_t

◆ punt_l4_t

typedef struct punt_l4_t_ punt_l4_t

◆ punt_reg_t

typedef struct punt_reg_t_ punt_reg_t

◆ punt_thread_data_t

◆ punt_type_t

typedef enum punt_type_t_ punt_type_t

◆ punt_union_t

typedef struct punt_union_t_ punt_union_t

◆ vnet_punt_reason_flag_t

Enumeration Type Documentation

◆ punt_action_e

Enumerator
PUNT_L2 
PUNT_IP4_ROUTED 
PUNT_IP6_ROUTED 

Definition at line 112 of file punt.h.

◆ punt_type_t_

Enumerator
foreach_punt_type 

Definition at line 65 of file punt.h.

◆ vnet_punt_reason_flag_mask_t_

Enumerator
foreach_vnet_punt_reason_flag 

Definition at line 42 of file punt.h.

◆ vnet_punt_reason_flag_t_

Enumerator
foreach_vnet_punt_reason_flag 

Definition at line 34 of file punt.h.

Function Documentation

◆ format_vnet_punt_reason_flags()

u8* format_vnet_punt_reason_flags ( u8 s,
va_list *  args 
)

Definition at line 849 of file punt.c.

+ Here is the caller graph for this function:

◆ punt_client_exception_get()

static_always_inline punt_client_t* punt_client_exception_get ( vlib_punt_reason_t  reason)

Definition at line 222 of file punt.h.

+ Here is the caller graph for this function:

◆ punt_client_ip_proto_get()

static_always_inline punt_client_t* punt_client_ip_proto_get ( ip_address_family_t  af,
ip_protocol_t  proto 
)

Definition at line 206 of file punt.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ punt_client_ip_proto_mk_key()

static_always_inline u32 punt_client_ip_proto_mk_key ( ip_address_family_t  af,
ip_protocol_t  proto 
)

Definition at line 200 of file punt.h.

+ Here is the caller graph for this function:

◆ punt_client_l4_get()

static_always_inline punt_client_t* punt_client_l4_get ( ip_address_family_t  af,
u16  port 
)

Definition at line 186 of file punt.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ punt_client_l4_mk_key()

static_always_inline u32 punt_client_l4_mk_key ( ip_address_family_t  af,
u16  port 
)

Definition at line 180 of file punt.h.

+ Here is the caller graph for this function:

◆ punt_client_walk()

void punt_client_walk ( punt_type_t  pt,
punt_client_walk_cb_t  cb,
void *  ctx 
)

Definition at line 691 of file punt.c.

+ Here is the caller graph for this function:

◆ vnet_punt_add_del()

clib_error_t* vnet_punt_add_del ( vlib_main_t vm,
const punt_reg_t pr,
bool  is_add 
)

Definition at line 435 of file punt.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_punt_get_server_pathname()

char* vnet_punt_get_server_pathname ( void  )

Definition at line 41 of file punt.c.

+ Here is the caller graph for this function:

◆ vnet_punt_socket_add()

clib_error_t* vnet_punt_socket_add ( vlib_main_t vm,
u32  header_version,
const punt_reg_t pr,
char *  client_pathname 
)

Definition at line 289 of file punt.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_punt_socket_del()

clib_error_t* vnet_punt_socket_del ( vlib_main_t vm,
const punt_reg_t pr 
)

Definition at line 329 of file punt.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_proto_punt_socket_node

vlib_node_registration_t ip4_proto_punt_socket_node

(constructor) VLIB_REGISTER_NODE (ip4_proto_punt_socket_node)

Definition at line 458 of file punt_node.c.

◆ ip6_proto_punt_socket_node

vlib_node_registration_t ip6_proto_punt_socket_node

(constructor) VLIB_REGISTER_NODE (ip6_proto_punt_socket_node)

Definition at line 468 of file punt_node.c.

◆ punt_main

punt_main_t punt_main

Definition at line 38 of file punt.c.

◆ punt_socket_rx_node

vlib_node_registration_t punt_socket_rx_node

(constructor) VLIB_REGISTER_NODE (punt_socket_rx_node)

Definition at line 618 of file punt_node.c.

◆ udp4_punt_node

vlib_node_registration_t udp4_punt_node

(constructor) VLIB_REGISTER_NODE (udp4_punt_node)

Definition at line 186 of file punt_node.c.

◆ udp4_punt_socket_node

vlib_node_registration_t udp4_punt_socket_node

(constructor) VLIB_REGISTER_NODE (udp4_punt_socket_node)

Definition at line 439 of file punt_node.c.

◆ udp6_punt_node

vlib_node_registration_t udp6_punt_node

(constructor) VLIB_REGISTER_NODE (udp6_punt_node)

Definition at line 202 of file punt_node.c.

◆ udp6_punt_socket_node

vlib_node_registration_t udp6_punt_socket_node

(constructor) VLIB_REGISTER_NODE (udp6_punt_socket_node)

Definition at line 449 of file punt_node.c.