FD.io VPP  v18.10-34-gcce845e
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_main_t
 

Macros

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

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)
 

Variables

punt_main_t punt_main
 

Detailed Description

Definitions for punt infrastructure.

Definition in file punt.h.

Macro Definition Documentation

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

Definition at line 28 of file punt.h.

#define PUNT_PACKETDESC_VERSION   1

Definition at line 55 of file punt.h.

Enumeration Type Documentation

Enumerator
PUNT_L2 
PUNT_IP4_ROUTED 
PUNT_IP6_ROUTED 

Definition at line 44 of file punt.h.

Enumerator
PUNT_N_ERROR 

Definition at line 26 of file punt.h.

Function Documentation

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 689 of file punt.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* vnet_punt_get_server_pathname ( void  )

Definition at line 74 of file punt.c.

+ Here is the caller graph for this function:

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 626 of file punt.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_punt_socket_del ( vlib_main_t vm,
bool  is_ip4,
u8  l4_protocol,
u16  port 
)

Definition at line 659 of file punt.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

punt_main_t punt_main

Definition at line 71 of file punt.c.