17 #ifndef __included_wg_peer_h__ 18 #define __included_wg_peer_h__ 141 return ((thread_id) ? thread_id
147 #endif // __included_wg_peer_h__ wg_peer_allowed_ip_t * allowed_ips
index_t wg_peer_walk(wg_peer_walk_cb_t fn, void *data)
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)
u16 persistent_keepalive_interval
u8 * format_ip4_udp_header(u8 *s, va_list *va)
int wg_peer_remove(u32 peer_index)
tw_timer_wheel_16t_2w_512sl_t * timer_wheel
walk_rc_t(* wg_peer_walk_cb_t)(index_t peeri, void *arg)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
walk_rc_t wg_peer_if_table_change(wg_if_t *wgi, index_t peeri, void *data)
struct wg_peer_allowed_ip_t_ wg_peer_allowed_ip_t
struct wg_peer_endpoint_t_ wg_peer_endpoint_t
enum walk_rc_t_ walk_rc_t
Walk return code.
walk_rc_t wg_peer_if_admin_state_change(wg_if_t *wgi, index_t peeri, void *data)
static index_t wg_peer_get_by_adj_index(index_t ai)
vl_api_prefix_t allowed_ips[n_allowed_ips]
Aggregate type for a prefix.
index_t * wg_peer_by_adj_index
#define NOISE_PUBLIC_KEY_LEN
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vl_api_address_t endpoint
u32 new_handshake_interval_tick
struct wg_peer_table_bind_ctx_t_ wg_peer_table_bind_ctx_t
u32 fib_node_index_t
A typedef of a node index.
static u64 unix_time_now_nsec(void)
cookie_maker_t cookie_maker
u32 adj_index_t
An index for adjacencies.
fib_node_index_t fib_entry_index
u8 * format_wg_peer(u8 *s, va_list *va)
bool timer_need_another_keepalive
enum ip_address_family_t_ ip_address_family_t
u32 rehandshake_interval_tick
static u32 wg_peer_assign_thread(u32 thread_id)
static u32 vlib_num_workers()
struct ip4_udp_header_t_ ip4_udp_header_t
static wg_peer_t * wg_peer_get(index_t peeri)
u32 timer_handshake_attempts