FD.io VPP  v21.10.1-2-g0a485f517
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 20 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 23 of file wireguard_handoff.c.

◆ wg_handoff_mode_t

Enumerator
WG_HANDOFF_HANDSHAKE 
WG_HANDOFF_INP_DATA 
WG_HANDOFF_OUT_TUN 

Definition at line 37 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 51 of file wireguard_handoff.c.

◆ 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 63 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 132 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 142 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 152 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)
}

Definition at line 31 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 = format_wg_handoff_trace,
.error_strings = wg_handoff_error_strings,
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (wg_handshake_handoff)

Definition at line 163 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 = format_wg_handoff_trace,
.error_strings = wg_handoff_error_strings,
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (wg_input_data_handoff)

Definition at line 177 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 = format_wg_handoff_trace,
.error_strings = wg_handoff_error_strings,
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (wg_output_tun_handoff)

Definition at line 191 of file wireguard_handoff.c.

VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
foreach_wg_handoff_error
#define foreach_wg_handoff_error
Definition: wireguard_handoff.c:20
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
u32
unsigned int u32
Definition: types.h:88
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
wg_handoff_error_strings
static char * wg_handoff_error_strings[]
Definition: wireguard_handoff.c:31
format_wg_handoff_trace
static u8 * format_wg_handoff_trace(u8 *s, va_list *args)
Definition: wireguard_handoff.c:51