FD.io VPP  v19.01.3-6-g70449b9b9
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_packetdesc_t
 
struct  punt_client_t
 
struct  punt_thread_data_t_
 
struct  punt_main_t
 
struct  punt_socket_detail_t_
 

Macros

#define punt_error(n, s)   PUNT_ERROR_##n,
 
#define PUNT_PACKETDESC_VERSION   1
 

Typedefs

typedef struct punt_thread_data_t_ punt_thread_data_t
 
typedef struct punt_socket_detail_t_ punt_socket_detail_t
 

Enumerations

enum  punt_error_t { PUNT_N_ERROR }
 
enum  punt_action_e { PUNT_L2 = 0, PUNT_IP4_ROUTED, PUNT_IP6_ROUTED }
 

Functions

clib_error_tvnet_punt_add_del (vlib_main_t *vm, u8 ipv, u8 protocol, u16 port, bool is_add)
 Request IP traffic punt to the local TCP/IP stack. More...
 
clib_error_tvnet_punt_socket_add (vlib_main_t *vm, u32 header_version, bool is_ip4, u8 protocol, u16 port, char *client_pathname)
 
clib_error_tvnet_punt_socket_del (vlib_main_t *vm, bool is_ip4, u8 l4_protocol, u16 port)
 
char * vnet_punt_get_server_pathname (void)
 
punt_socket_detail_tpunt_socket_entries (u8 ipv)
 

Variables

punt_main_t punt_main
 

Detailed Description

Definitions for punt infrastructure.

Definition in file punt.h.

Macro Definition Documentation

◆ punt_error

#define punt_error (   n,
 
)    PUNT_ERROR_##n,

Definition at line 28 of file punt.h.

◆ PUNT_PACKETDESC_VERSION

#define PUNT_PACKETDESC_VERSION   1

Definition at line 55 of file punt.h.

Typedef Documentation

◆ punt_socket_detail_t

◆ punt_thread_data_t

Enumeration Type Documentation

◆ punt_action_e

Enumerator
PUNT_L2 
PUNT_IP4_ROUTED 
PUNT_IP6_ROUTED 

Definition at line 44 of file punt.h.

◆ punt_error_t

Enumerator
PUNT_N_ERROR 

Definition at line 26 of file punt.h.

Function Documentation

◆ punt_socket_entries()

punt_socket_detail_t* punt_socket_entries ( u8  ipv)

Definition at line 958 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,
u8  ipv,
u8  protocol,
u16  port,
bool  is_add 
)

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

Note

  • UDP and TCP are the only protocols supported in the current implementation
Parameters
vmvlib_main_t corresponding to the current thread
ipvIP protcol version. 4 - IPv4, 6 - IPv6, ~0 for both IPv6 and IPv4
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 707 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 72 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,
bool  is_ip4,
u8  protocol,
u16  port,
char *  client_pathname 
)

Definition at line 641 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,
bool  is_ip4,
u8  l4_protocol,
u16  port 
)

Definition at line 677 of file punt.c.

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

Variable Documentation

◆ punt_main

punt_main_t punt_main

Definition at line 69 of file punt.c.