FD.io VPP  v19.08.3-2-gbabecb413
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_punt_type
 
#define PUNT_PACKETDESC_VERSION   1
 

Typedefs

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  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)
 
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 27 of file punt.h.

◆ PUNT_PACKETDESC_VERSION

#define PUNT_PACKETDESC_VERSION   1

Definition at line 91 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 136 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

Enumeration Type Documentation

◆ punt_action_e

Enumerator
PUNT_L2 
PUNT_IP4_ROUTED 
PUNT_IP6_ROUTED 

Definition at line 80 of file punt.h.

◆ punt_type_t_

Enumerator
foreach_punt_type 

Definition at line 32 of file punt.h.

Function Documentation

◆ punt_client_exception_get()

static_always_inline punt_client_t* punt_client_exception_get ( vlib_punt_reason_t  reason)

Definition at line 187 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 171 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 165 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 151 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 145 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 656 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 410 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 42 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 290 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 330 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 461 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 471 of file punt_node.c.

◆ punt_main

punt_main_t punt_main

Definition at line 39 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 621 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 189 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 442 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 205 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 452 of file punt_node.c.