FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
wireguard_handoff.c File Reference
+ Include dependency graph for wireguard_handoff.c:

Go to the source code of this file.

Data Structures

struct  wg_handoff_trace_t_
 

Macros

#define foreach_wg_handoff_error   _(CONGESTION_DROP, "congestion drop")
 

Typedefs

typedef struct wg_handoff_trace_t_ wg_handoff_trace_t
 

Enumerations

enum  ipsec_handoff_error_t { HANDOFF_N_ERROR, NAT44_HANDOFF_N_ERROR }
 
enum  wg_handoff_mode_t { WG_HANDOFF_HANDSHAKE, WG_HANDOFF_INP_DATA, WG_HANDOFF_OUT_TUN }
 

Functions

static u8format_wg_handoff_trace (u8 *s, va_list *args)
 
static_always_inline uword wg_handoff (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 fq_index, wg_handoff_mode_t mode)
 
VLIB_NODE_FN() wg_handshake_handoff (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() wg_input_data_handoff (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() wg_output_tun_handoff (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

static char * wg_handoff_error_strings []
 
vlib_node_registration_t wg_handshake_handoff
 (constructor) VLIB_REGISTER_NODE (wg_handshake_handoff) More...
 
vlib_node_registration_t wg_input_data_handoff
 (constructor) VLIB_REGISTER_NODE (wg_input_data_handoff) More...
 
vlib_node_registration_t wg_output_tun_handoff
 (constructor) VLIB_REGISTER_NODE (wg_output_tun_handoff) More...
 

Macro Definition Documentation

◆ foreach_wg_handoff_error

#define foreach_wg_handoff_error   _(CONGESTION_DROP, "congestion drop")

Definition at line 19 of file wireguard_handoff.c.

Typedef Documentation

◆ wg_handoff_trace_t

Enumeration Type Documentation

◆ ipsec_handoff_error_t

Enumerator
HANDOFF_N_ERROR 
NAT44_HANDOFF_N_ERROR 

Definition at line 22 of file wireguard_handoff.c.

◆ wg_handoff_mode_t

Enumerator
WG_HANDOFF_HANDSHAKE 
WG_HANDOFF_INP_DATA 
WG_HANDOFF_OUT_TUN 

Definition at line 36 of file wireguard_handoff.c.

Function Documentation

◆ format_wg_handoff_trace()

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

Definition at line 50 of file wireguard_handoff.c.

+ Here is the call graph for this function:

◆ wg_handoff()

static_always_inline uword wg_handoff ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u32  fq_index,
wg_handoff_mode_t  mode 
)

Definition at line 62 of file wireguard_handoff.c.

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

◆ wg_handshake_handoff()

VLIB_NODE_FN() wg_handshake_handoff ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 131 of file wireguard_handoff.c.

+ Here is the call graph for this function:

◆ wg_input_data_handoff()

VLIB_NODE_FN() wg_input_data_handoff ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 141 of file wireguard_handoff.c.

+ Here is the call graph for this function:

◆ wg_output_tun_handoff()

VLIB_NODE_FN() wg_output_tun_handoff ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 151 of file wireguard_handoff.c.

+ Here is the call graph for this function:

Variable Documentation

◆ wg_handoff_error_strings

char* wg_handoff_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_wg_handoff_error

Definition at line 30 of file wireguard_handoff.c.

◆ wg_handshake_handoff

vlib_node_registration_t wg_handshake_handoff
Initial value:
=
{
.name = "wg-handshake-handoff",.vector_size = sizeof (u32),.format_trace =
wg_handoff_error_strings,.n_next_nodes = 1,.next_nodes =
{
[0] = "error-drop",}
,}
static u8 * format_wg_handoff_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:67
static char * wg_handoff_error_strings[]

(constructor) VLIB_REGISTER_NODE (wg_handshake_handoff)

Definition at line 161 of file wireguard_handoff.c.

◆ wg_input_data_handoff

vlib_node_registration_t wg_input_data_handoff
Initial value:
=
{
.name = "wg-input-data-handoff",.vector_size = sizeof (u32),.format_trace =
wg_handoff_error_strings,.n_next_nodes = 1,.next_nodes =
{
[0] = "error-drop",}
,}
static u8 * format_wg_handoff_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:67
static char * wg_handoff_error_strings[]

(constructor) VLIB_REGISTER_NODE (wg_input_data_handoff)

Definition at line 171 of file wireguard_handoff.c.

◆ wg_output_tun_handoff

vlib_node_registration_t wg_output_tun_handoff
Initial value:
=
{
.name = "wg-output-tun-handoff",.vector_size = sizeof (u32),.format_trace =
wg_handoff_error_strings,.n_next_nodes = 1,.next_nodes =
{
[0] = "error-drop",}
,}
static u8 * format_wg_handoff_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:67
static char * wg_handoff_error_strings[]

(constructor) VLIB_REGISTER_NODE (wg_output_tun_handoff)

Definition at line 181 of file wireguard_handoff.c.