FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
wireguard_if.h File Reference
+ Include dependency graph for wireguard_if.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wg_if_t_
 

Typedefs

typedef struct wg_if_t_ wg_if_t
 
typedef walk_rc_t(* wg_if_walk_cb_t) (index_t wgi, void *data)
 
typedef walk_rc_t(* wg_if_peer_walk_cb_t) (wg_if_t *wgi, index_t peeri, void *data)
 

Functions

int wg_if_create (u32 user_instance, const u8 private_key_64[NOISE_PUBLIC_KEY_LEN], u16 port, const ip_address_t *src_ip, u32 *sw_if_indexp)
 
int wg_if_delete (u32 sw_if_index)
 
index_t wg_if_find_by_sw_if_index (u32 sw_if_index)
 
u8format_wg_if (u8 *s, va_list *va)
 
void wg_if_walk (wg_if_walk_cb_t fn, void *data)
 
index_t wg_if_peer_walk (wg_if_t *wgi, wg_if_peer_walk_cb_t fn, void *data)
 
void wg_if_peer_add (wg_if_t *wgi, index_t peeri)
 
void wg_if_peer_remove (wg_if_t *wgi, index_t peeri)
 
static_always_inline wg_if_twg_if_get (index_t wgii)
 
static_always_inline wg_if_twg_if_get_by_port (u16 port)
 

Variables

wg_if_twg_if_pool
 Data-plane exposed functions. More...
 
index_twg_if_index_by_port
 

Typedef Documentation

◆ wg_if_peer_walk_cb_t

typedef walk_rc_t(* wg_if_peer_walk_cb_t) (wg_if_t *wgi, index_t peeri, void *data)

Definition at line 55 of file wireguard_if.h.

◆ wg_if_t

typedef struct wg_if_t_ wg_if_t

◆ wg_if_walk_cb_t

typedef walk_rc_t(* wg_if_walk_cb_t) (index_t wgi, void *data)

Definition at line 52 of file wireguard_if.h.

Function Documentation

◆ format_wg_if()

u8* format_wg_if ( u8 s,
va_list *  va 
)

Definition at line 45 of file wireguard_if.c.

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

◆ wg_if_create()

int wg_if_create ( u32  user_instance,
const u8  private_key_64[NOISE_PUBLIC_KEY_LEN],
u16  port,
const ip_address_t src_ip,
u32 sw_if_indexp 
)

Definition at line 239 of file wireguard_if.c.

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

◆ wg_if_delete()

int wg_if_delete ( u32  sw_if_index)

Definition at line 322 of file wireguard_if.c.

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

◆ wg_if_find_by_sw_if_index()

index_t wg_if_find_by_sw_if_index ( u32  sw_if_index)

Definition at line 80 of file wireguard_if.c.

+ Here is the caller graph for this function:

◆ wg_if_get()

static_always_inline wg_if_t* wg_if_get ( index_t  wgii)

Definition at line 68 of file wireguard_if.h.

+ Here is the caller graph for this function:

◆ wg_if_get_by_port()

static_always_inline wg_if_t* wg_if_get_by_port ( u16  port)

Definition at line 78 of file wireguard_if.h.

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

◆ wg_if_peer_add()

void wg_if_peer_add ( wg_if_t wgi,
index_t  peeri 
)

Definition at line 351 of file wireguard_if.c.

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

◆ wg_if_peer_remove()

void wg_if_peer_remove ( wg_if_t wgi,
index_t  peeri 
)

Definition at line 361 of file wireguard_if.c.

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

◆ wg_if_peer_walk()

index_t wg_if_peer_walk ( wg_if_t wgi,
wg_if_peer_walk_cb_t  fn,
void *  data 
)

Definition at line 385 of file wireguard_if.c.

+ Here is the caller graph for this function:

◆ wg_if_walk()

void wg_if_walk ( wg_if_walk_cb_t  fn,
void *  data 
)

Definition at line 371 of file wireguard_if.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ wg_if_index_by_port

index_t* wg_if_index_by_port

Definition at line 35 of file wireguard_if.c.

◆ wg_if_pool

wg_if_t* wg_if_pool

Data-plane exposed functions.

Definition at line 26 of file wireguard_if.c.