FD.io VPP  v21.01.1
Vector Packet Processing
wireguard_peer.h File Reference
+ Include dependency graph for wireguard_peer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip4_udp_header_t_
 
struct  wg_peer_allowed_ip_t_
 
struct  wg_peer_endpoint_t_
 
struct  wg_peer
 
struct  wg_peer_table_bind_ctx_t_
 

Typedefs

typedef struct ip4_udp_header_t_ ip4_udp_header_t
 
typedef struct wg_peer_allowed_ip_t_ wg_peer_allowed_ip_t
 
typedef struct wg_peer_endpoint_t_ wg_peer_endpoint_t
 
typedef struct wg_peer wg_peer_t
 
typedef struct wg_peer_table_bind_ctx_t_ wg_peer_table_bind_ctx_t
 
typedef walk_rc_t(* wg_peer_walk_cb_t) (index_t peeri, void *arg)
 

Functions

u8format_ip4_udp_header (u8 *s, va_list *va)
 
int wg_peer_add (u32 tun_sw_if_index, const u8 public_key_64[NOISE_PUBLIC_KEY_LEN], u32 table_id, const ip46_address_t *endpoint, const fib_prefix_t *allowed_ips, u16 port, u16 persistent_keepalive, index_t *peer_index)
 
int wg_peer_remove (u32 peer_index)
 
index_t wg_peer_walk (wg_peer_walk_cb_t fn, void *data)
 
u8format_wg_peer (u8 *s, va_list *va)
 
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 wg_peer_twg_peer_get (index_t peeri)
 
static index_t wg_peer_get_by_adj_index (index_t ai)
 
static u32 wg_peer_assign_thread (u32 thread_id)
 

Variables

index_twg_peer_by_adj_index
 
wg_peer_twg_peer_pool
 

Typedef Documentation

◆ ip4_udp_header_t

◆ wg_peer_allowed_ip_t

◆ wg_peer_endpoint_t

◆ wg_peer_t

typedef struct wg_peer wg_peer_t

◆ wg_peer_table_bind_ctx_t

◆ wg_peer_walk_cb_t

typedef walk_rc_t(* wg_peer_walk_cb_t) (index_t peeri, void *arg)

Definition at line 108 of file wireguard_peer.h.

Function Documentation

◆ format_ip4_udp_header()

u8* format_ip4_udp_header ( u8 s,
va_list *  va 
)

Definition at line 59 of file wireguard_output_tun.c.

+ Here is the caller graph for this function:

◆ format_wg_peer()

u8* format_wg_peer ( u8 s,
va_list *  va 
)

Definition at line 386 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_64[NOISE_PUBLIC_KEY_LEN],
u32  table_id,
const ip46_address_t *  endpoint,
const fib_prefix_t allowed_ips,
u16  port,
u16  persistent_keepalive,
index_t peer_index 
)

Definition at line 272 of file wireguard_peer.c.

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

◆ wg_peer_assign_thread()

static u32 wg_peer_assign_thread ( u32  thread_id)
inlinestatic

Definition at line 139 of file wireguard_peer.h.

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

◆ wg_peer_get()

static wg_peer_t* wg_peer_get ( index_t  peeri)
inlinestatic

Definition at line 124 of file wireguard_peer.h.

+ Here is the caller graph for this function:

◆ wg_peer_get_by_adj_index()

static index_t wg_peer_get_by_adj_index ( index_t  ai)
inlinestatic

Definition at line 130 of file wireguard_peer.h.

+ 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 185 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 193 of file wireguard_peer.c.

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

◆ wg_peer_remove()

int wg_peer_remove ( u32  peer_index)

Definition at line 335 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 360 of file wireguard_peer.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ wg_peer_by_adj_index

index_t* wg_peer_by_adj_index

Definition at line 29 of file wireguard_peer.c.

◆ wg_peer_pool

wg_peer_t* wg_peer_pool

Definition at line 27 of file wireguard_peer.c.