FD.io VPP  v20.09-64-g4f7b92f0a
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 54 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 51 of file wireguard_if.h.

Function Documentation

◆ format_wg_if()

u8* format_wg_if ( u8 s,
va_list *  va 
)

Definition at line 30 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 224 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 300 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 65 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 67 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 77 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 329 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 339 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 363 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 349 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 20 of file wireguard_if.c.

◆ wg_if_pool

wg_if_t* wg_if_pool

Data-plane exposed functions.

Definition at line 11 of file wireguard_if.c.