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

Go to the source code of this file.

Functions

static void wg_peer_endpoint_reset (wg_peer_endpoint_t *ep)
 
static void wg_peer_endpoint_init (wg_peer_endpoint_t *ep, const ip46_address_t *addr, u16 port)
 
static void wg_peer_fib_flush (wg_peer_t *peer)
 
static void wg_peer_fib_populate (wg_peer_t *peer, u32 fib_index)
 
static void wg_peer_clear (vlib_main_t *vm, wg_peer_t *peer)
 
static void wg_peer_init (vlib_main_t *vm, wg_peer_t *peer)
 
static u8wg_peer_build_rewrite (const wg_peer_t *peer)
 
static void wg_peer_adj_stack (wg_peer_t *peer)
 
walk_rc_t wg_peer_if_admin_state_change (wg_if_t *wgi, index_t peeri, void *data)
 
walk_rc_t wg_peer_if_table_change (wg_if_t *wgi, index_t peeri, void *data)
 
static int wg_peer_fill (vlib_main_t *vm, wg_peer_t *peer, u32 table_id, const ip46_address_t *dst, u16 port, u16 persistent_keepalive_interval, const fib_prefix_t *allowed_ips, u32 wg_sw_if_index)
 
int wg_peer_add (u32 tun_sw_if_index, const u8 public_key[NOISE_PUBLIC_KEY_LEN], u32 table_id, const ip46_address_t *endpoint, const fib_prefix_t *allowed_ips, u16 port, u16 persistent_keepalive, u32 *peer_index)
 
int wg_peer_remove (index_t peeri)
 
index_t wg_peer_walk (wg_peer_walk_cb_t fn, void *data)
 
static u8format_wg_peer_endpoint (u8 *s, va_list *args)
 
u8format_wg_peer (u8 *s, va_list *va)
 
static clib_error_twg_peer_module_init (vlib_main_t *vm)
 

Variables

static fib_source_t wg_fib_source
 
wg_peer_twg_peer_pool
 
index_twg_peer_by_adj_index
 

Function Documentation

◆ format_wg_peer()

u8* format_wg_peer ( u8 s,
va_list *  va 
)

Definition at line 385 of file wireguard_peer.c.

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

◆ format_wg_peer_endpoint()

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

Definition at line 374 of file wireguard_peer.c.

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

◆ wg_peer_add()

int wg_peer_add ( u32  tun_sw_if_index,
const u8  public_key[NOISE_PUBLIC_KEY_LEN],
u32  table_id,
const ip46_address_t *  endpoint,
const fib_prefix_t allowed_ips,
u16  port,
u16  persistent_keepalive,
u32 peer_index 
)

Definition at line 271 of file wireguard_peer.c.

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

◆ wg_peer_adj_stack()

static void wg_peer_adj_stack ( wg_peer_t peer)
static

Definition at line 148 of file wireguard_peer.c.

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

◆ wg_peer_build_rewrite()

static u8* wg_peer_build_rewrite ( const wg_peer_t peer)
static

Definition at line 124 of file wireguard_peer.c.

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

◆ wg_peer_clear()

static void wg_peer_clear ( vlib_main_t vm,
wg_peer_t peer 
)
static

Definition at line 77 of file wireguard_peer.c.

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

◆ wg_peer_endpoint_init()

static void wg_peer_endpoint_init ( wg_peer_endpoint_t ep,
const ip46_address_t *  addr,
u16  port 
)
static

Definition at line 38 of file wireguard_peer.c.

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

◆ wg_peer_endpoint_reset()

static void wg_peer_endpoint_reset ( wg_peer_endpoint_t ep)
static

Definition at line 31 of file wireguard_peer.c.

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

◆ wg_peer_fib_flush()

static void wg_peer_fib_flush ( wg_peer_t peer)
static

Definition at line 46 of file wireguard_peer.c.

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

◆ wg_peer_fib_populate()

static void wg_peer_fib_populate ( wg_peer_t peer,
u32  fib_index 
)
static

Definition at line 58 of file wireguard_peer.c.

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

◆ wg_peer_fill()

static int wg_peer_fill ( vlib_main_t vm,
wg_peer_t peer,
u32  table_id,
const ip46_address_t *  dst,
u16  port,
u16  persistent_keepalive_interval,
const fib_prefix_t allowed_ips,
u32  wg_sw_if_index 
)
static

Definition at line 206 of file wireguard_peer.c.

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

◆ wg_peer_if_admin_state_change()

walk_rc_t wg_peer_if_admin_state_change ( wg_if_t wgi,
index_t  peeri,
void *  data 
)

Definition at line 184 of file wireguard_peer.c.

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

◆ wg_peer_if_table_change()

walk_rc_t wg_peer_if_table_change ( wg_if_t wgi,
index_t  peeri,
void *  data 
)

Definition at line 192 of file wireguard_peer.c.

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

◆ wg_peer_init()

static void wg_peer_init ( vlib_main_t vm,
wg_peer_t peer 
)
static

Definition at line 117 of file wireguard_peer.c.

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

◆ wg_peer_module_init()

static clib_error_t* wg_peer_module_init ( vlib_main_t vm)
static

Definition at line 415 of file wireguard_peer.c.

+ Here is the call graph for this function:

◆ wg_peer_remove()

int wg_peer_remove ( index_t  peeri)

Definition at line 334 of file wireguard_peer.c.

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

◆ wg_peer_walk()

index_t wg_peer_walk ( wg_peer_walk_cb_t  fn,
void *  data 
)

Definition at line 359 of file wireguard_peer.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ wg_fib_source

fib_source_t wg_fib_source
static

Definition at line 25 of file wireguard_peer.c.

◆ wg_peer_by_adj_index

index_t* wg_peer_by_adj_index

Definition at line 28 of file wireguard_peer.c.

◆ wg_peer_pool

wg_peer_t* wg_peer_pool

Definition at line 26 of file wireguard_peer.c.