FD.io VPP  v20.05.1-6-gf53edbc3b
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...
 
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)
 
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 686 of file punt.c.

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

◆ ip_punt_init()

clib_error_t* ip_punt_init ( vlib_main_t vm)

Definition at line 771 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 426 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 107 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 117 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 77 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 89 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 49 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 59 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 717 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 640 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 795 of file punt.c.

+ Here is the call 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 369 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 579 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 132 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 511 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 216 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 186 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 145 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 725 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 277 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 259 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 243 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 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

◆ 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,
}
static clib_error_t * punt_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: punt.c:426

(constructor) VLIB_CLI_COMMAND (punt_command)

Definition at line 503 of file punt.c.

◆ punt_main

punt_main_t punt_main

Definition at line 39 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,
}
static clib_error_t * punt_socket_deregister_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: punt.c:579

(constructor) VLIB_CLI_COMMAND (punt_socket_deregister_command)

Definition at line 630 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,
}
static clib_error_t * punt_socket_register_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: punt.c:511

(constructor) VLIB_CLI_COMMAND (punt_socket_register_command)

Definition at line 569 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,
}
static clib_error_t * punt_socket_show_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: punt.c:725

(constructor) VLIB_CLI_COMMAND (show_punt_socket_registration_command)

Definition at line 761 of file punt.c.