FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
punt.c File Reference

Local TCP/IP stack punt infrastructure. More...

+ Include dependency graph for punt.c:

Go to the source code of this file.

Functions

char * vnet_punt_get_server_pathname (void)
 
static void punt_client_l4_db_add (ip_address_family_t af, u16 port, u32 index)
 
static u32 punt_client_l4_db_remove (ip_address_family_t af, u16 port)
 
static void punt_client_ip_proto_db_add (ip_address_family_t af, ip_protocol_t proto, u32 index)
 
static u32 punt_client_ip_proto_db_remove (ip_address_family_t af, ip_protocol_t proto)
 
static void punt_client_exception_db_add (vlib_punt_reason_t reason, u32 pci)
 
static u32 punt_client_exception_db_remove (vlib_punt_reason_t reason)
 
static clib_error_tpunt_socket_read_ready (clib_file_t *uf)
 
static clib_error_tpunt_socket_register_l4 (vlib_main_t *vm, ip_address_family_t af, u8 protocol, u16 port, char *client_pathname)
 
static clib_error_tpunt_socket_register_ip_proto (vlib_main_t *vm, ip_address_family_t af, ip_protocol_t proto, char *client_pathname)
 
static clib_error_tpunt_socket_register_exception (vlib_main_t *vm, vlib_punt_reason_t reason, char *client_pathname)
 
static clib_error_tpunt_socket_unregister_l4 (ip_address_family_t af, ip_protocol_t protocol, u16 port)
 
static clib_error_tpunt_socket_unregister_ip_proto (ip_address_family_t af, ip_protocol_t proto)
 
static clib_error_tpunt_socket_unregister_exception (vlib_punt_reason_t reason)
 
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)
 
static clib_error_tpunt_l4_add_del (vlib_main_t *vm, ip_address_family_t af, ip_protocol_t protocol, u16 port, bool is_add)
 Request IP L4 traffic punt to the local TCP/IP stack. More...
 
static clib_error_tpunt_exception_add_del (vlib_punt_reason_t reason, bool is_add)
 Request exception traffic punt. More...
 
clib_error_tvnet_punt_add_del (vlib_main_t *vm, const punt_reg_t *pr, bool is_add)
 
static clib_error_tpunt_cli (vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
 
static clib_error_tpunt_socket_register_cmd (vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
 
static clib_error_tpunt_socket_deregister_cmd (vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
 
void punt_client_walk (punt_type_t pt, punt_client_walk_cb_t cb, void *ctx)
 
static u8format_punt_client (u8 *s, va_list *args)
 
static walk_rc_t punt_client_show_one (const punt_client_t *pc, void *ctx)
 
static clib_error_tpunt_socket_show_cmd (vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
 
clib_error_tip_punt_init (vlib_main_t *vm)
 
u8format_vnet_punt_reason_flags (u8 *s, va_list *args)
 
static clib_error_tpunt_config (vlib_main_t *vm, unformat_input_t *input)
 

Variables

punt_main_t punt_main
 
static vlib_cli_command_t punt_command
 (constructor) VLIB_CLI_COMMAND (punt_command) More...
 
static vlib_cli_command_t punt_socket_register_command
 (constructor) VLIB_CLI_COMMAND (punt_socket_register_command) More...
 
static vlib_cli_command_t punt_socket_deregister_command
 (constructor) VLIB_CLI_COMMAND (punt_socket_deregister_command) More...
 
static vlib_cli_command_t show_punt_socket_registration_command
 (constructor) VLIB_CLI_COMMAND (show_punt_socket_registration_command) More...
 

Detailed Description

Local TCP/IP stack punt infrastructure.

Provides a set of VPP nodes together with the relevant APIs and CLI commands in order to adjust and dispatch packets from the VPP data plane to the local TCP/IP stack

Definition in file punt.c.

Function Documentation

◆ format_punt_client()

static u8* format_punt_client ( u8 s,
va_list *  args 
)
static

Definition at line 737 of file punt.c.

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

◆ 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:

◆ ip_punt_init()

clib_error_t* ip_punt_init ( vlib_main_t vm)

Definition at line 827 of file punt.c.

+ Here is the call graph for this function:

◆ punt_cli()

static clib_error_t* punt_cli ( vlib_main_t vm,
unformat_input_t input__,
vlib_cli_command_t cmd 
)
static

Definition at line 452 of file punt.c.

+ Here is the call graph for this function:

◆ punt_client_exception_db_add()

static void punt_client_exception_db_add ( vlib_punt_reason_t  reason,
u32  pci 
)
static

Definition at line 106 of file punt.c.

+ Here is the caller graph for this function:

◆ punt_client_exception_db_remove()

static u32 punt_client_exception_db_remove ( vlib_punt_reason_t  reason)
static

Definition at line 116 of file punt.c.

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

◆ punt_client_ip_proto_db_add()

static void punt_client_ip_proto_db_add ( ip_address_family_t  af,
ip_protocol_t  proto,
u32  index 
)
static

Definition at line 76 of file punt.c.

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

◆ punt_client_ip_proto_db_remove()

static u32 punt_client_ip_proto_db_remove ( ip_address_family_t  af,
ip_protocol_t  proto 
)
static

Definition at line 88 of file punt.c.

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

◆ punt_client_l4_db_add()

static void punt_client_l4_db_add ( ip_address_family_t  af,
u16  port,
u32  index 
)
static

Definition at line 48 of file punt.c.

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

◆ punt_client_l4_db_remove()

static u32 punt_client_l4_db_remove ( ip_address_family_t  af,
u16  port 
)
static

Definition at line 58 of file punt.c.

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

◆ punt_client_show_one()

static walk_rc_t punt_client_show_one ( const punt_client_t pc,
void *  ctx 
)
static

Definition at line 768 of file punt.c.

+ Here is the call graph for this function:
+ 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:

◆ punt_config()

static clib_error_t* punt_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 864 of file punt.c.

+ Here is the call graph for this function:

◆ punt_exception_add_del()

static clib_error_t* punt_exception_add_del ( vlib_punt_reason_t  reason,
bool  is_add 
)
static

Request exception traffic punt.

Parameters
reasonPunting reason
Returns
0 on success, non-zero value otherwise

Definition at line 416 of file punt.c.

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

◆ punt_l4_add_del()

static clib_error_t* punt_l4_add_del ( vlib_main_t vm,
ip_address_family_t  af,
ip_protocol_t  protocol,
u16  port,
bool  is_add 
)
static

Request IP L4 traffic punt to the local TCP/IP stack.

Note

  • UDP is the only protocol supported in the current implementation
Parameters
vmvlib_main_t corresponding to the current thread
afIP address family.
protocol8-bits L4 protocol value UDP is 17 TCP is 1
port16-bits L4 (TCP/IP) port number when applicable (UDP only)
Returns
0 on success, non-zero value otherwise

Definition at line 368 of file punt.c.

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

◆ punt_socket_deregister_cmd()

static clib_error_t* punt_socket_deregister_cmd ( vlib_main_t vm,
unformat_input_t input__,
vlib_cli_command_t cmd 
)
static

Definition at line 622 of file punt.c.

+ Here is the call graph for this function:

◆ punt_socket_read_ready()

static clib_error_t* punt_socket_read_ready ( clib_file_t uf)
static

Schedule the rx node

Definition at line 131 of file punt.c.

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

◆ punt_socket_register_cmd()

static clib_error_t* punt_socket_register_cmd ( vlib_main_t vm,
unformat_input_t input__,
vlib_cli_command_t cmd 
)
static

Definition at line 545 of file punt.c.

+ Here is the call graph for this function:

◆ punt_socket_register_exception()

static clib_error_t* punt_socket_register_exception ( vlib_main_t vm,
vlib_punt_reason_t  reason,
char *  client_pathname 
)
static

Definition at line 215 of file punt.c.

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

◆ punt_socket_register_ip_proto()

static clib_error_t* punt_socket_register_ip_proto ( vlib_main_t vm,
ip_address_family_t  af,
ip_protocol_t  proto,
char *  client_pathname 
)
static

Definition at line 185 of file punt.c.

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

◆ punt_socket_register_l4()

static clib_error_t* punt_socket_register_l4 ( vlib_main_t vm,
ip_address_family_t  af,
u8  protocol,
u16  port,
char *  client_pathname 
)
static

Definition at line 144 of file punt.c.

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

◆ punt_socket_show_cmd()

static clib_error_t* punt_socket_show_cmd ( vlib_main_t vm,
unformat_input_t input__,
vlib_cli_command_t cmd 
)
static

Definition at line 776 of file punt.c.

+ Here is the call graph for this function:

◆ punt_socket_unregister_exception()

static clib_error_t* punt_socket_unregister_exception ( vlib_punt_reason_t  reason)
static

Definition at line 276 of file punt.c.

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

◆ punt_socket_unregister_ip_proto()

static clib_error_t* punt_socket_unregister_ip_proto ( ip_address_family_t  af,
ip_protocol_t  proto 
)
static

Definition at line 258 of file punt.c.

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

◆ punt_socket_unregister_l4()

static clib_error_t* punt_socket_unregister_l4 ( ip_address_family_t  af,
ip_protocol_t  protocol,
u16  port 
)
static

Definition at line 242 of file punt.c.

+ Here is the call graph for this function:
+ 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

◆ punt_command

vlib_cli_command_t punt_command
static
Initial value:
= {
.path = "set punt",
.short_help = "set punt [IPV4|ip6|ipv6] [UDP|tcp] [del] [ALL|<port-num>]",
.function = punt_cli,
}

(constructor) VLIB_CLI_COMMAND (punt_command)

Definition at line 537 of file punt.c.

◆ punt_main

punt_main_t punt_main

Definition at line 38 of file punt.c.

◆ punt_socket_deregister_command

vlib_cli_command_t punt_socket_deregister_command
static
Initial value:
=
{
.path = "punt socket deregister",
.short_help = "punt socket deregister [IPV4|ipv6] [UDP|tcp] [ALL|<port-num>]",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (punt_socket_deregister_command)

Definition at line 681 of file punt.c.

◆ punt_socket_register_command

vlib_cli_command_t punt_socket_register_command
static
Initial value:
=
{
.path = "punt socket register",
.short_help = "punt socket register [IPV4|ipv6] [UDP|tcp] [ALL|<port-num>] socket <socket>",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (punt_socket_register_command)

Definition at line 612 of file punt.c.

◆ show_punt_socket_registration_command

vlib_cli_command_t show_punt_socket_registration_command
static
Initial value:
=
{
.path = "show punt socket registrations",
.function = punt_socket_show_cmd,
.short_help = "show punt socket registrations [l4|exception]",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (show_punt_socket_registration_command)

Definition at line 817 of file punt.c.

punt_socket_deregister_cmd
static clib_error_t * punt_socket_deregister_cmd(vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
Definition: punt.c:622
punt_cli
static clib_error_t * punt_cli(vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
Definition: punt.c:452
punt_socket_register_cmd
static clib_error_t * punt_socket_register_cmd(vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
Definition: punt.c:545
punt_socket_show_cmd
static clib_error_t * punt_socket_show_cmd(vlib_main_t *vm, unformat_input_t *input__, vlib_cli_command_t *cmd)
Definition: punt.c:776