|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
28 u32 lookup_node_index =
91 peer->timer_handshake_attempts = 0;
100 packet.unencrypted_ephemeral,
102 packet.encrypted_timestamp))
104 packet.header.type = MESSAGE_HANDSHAKE_INITIATION;
146 .peer_idx = peer_idx,
147 .is_retry = is_retry,
151 (
u8 *) &
a,
sizeof (
a));
166 if (!
peer->remote.r_current)
188 packet->header.type = MESSAGE_DATA;
214 packet.unencrypted_ephemeral,
215 packet.encrypted_nothing))
217 packet.header.type = MESSAGE_HANDSHAKE_RESPONSE;
vlib_node_registration_t ip4_lookup_node
(constructor) VLIB_REGISTER_NODE (ip4_lookup_node)
void wg_timers_session_derived(wg_peer_t *peer)
void wg_send_handshake_from_mt(u32 peer_idx, bool is_retry)
#define clib_memcpy(d, s, n)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
bool wg_send_handshake(vlib_main_t *vm, wg_peer_t *peer, bool is_retry)
static bool wg_create_buffer(vlib_main_t *vm, const wg_peer_t *peer, const u8 *packet, u32 packet_len, u32 *bi)
static void ip4_header_set_len_w_chksum(ip4_header_t *ip4, u16 len)
static bool wg_birthdate_has_expired(f64 birthday_seconds, f64 expiration_seconds)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static int ip46_enqueue_packet(vlib_main_t *vm, u32 bi0, int is_ip6)
description malformed packet
vl_api_dhcp_client_state_t state
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
vlib_node_registration_t ip6_lookup_node
(constructor) VLIB_REGISTER_NODE (ip6_lookup_node)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
wg_per_thread_data_t * per_thread_data
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
void wg_timers_handshake_initiated(wg_peer_t *peer)
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
bool wg_send_handshake_response(vlib_main_t *vm, wg_peer_t *peer)
static void * wg_send_handshake_thread_fn(void *arg)
enum noise_state_crypt noise_remote_encrypt(vlib_main_t *vm, noise_remote_t *r, uint32_t *r_idx, uint64_t *nonce, uint8_t *src, size_t srclen, uint8_t *dst)
u16 current_length
Nbytes between current data and the end of this buffer.
bool noise_create_initiation(vlib_main_t *vm, noise_remote_t *r, uint32_t *s_idx, uint8_t ue[NOISE_PUBLIC_KEY_LEN], uint8_t es[NOISE_PUBLIC_KEY_LEN+NOISE_AUTHTAG_LEN], uint8_t ets[NOISE_TIMESTAMP_LEN+NOISE_AUTHTAG_LEN])
void cookie_maker_mac(cookie_maker_t *cp, message_macs_t *cm, void *buf, size_t len)
#define message_data_len(plain_len)
bool wg_send_keepalive(vlib_main_t *vm, wg_peer_t *peer)
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
bool noise_create_response(vlib_main_t *vm, noise_remote_t *r, uint32_t *s_idx, uint32_t *r_idx, uint8_t ue[NOISE_PUBLIC_KEY_LEN], uint8_t en[0+NOISE_AUTHTAG_LEN])
u8 data[WG_DEFAULT_DATA_SIZE]
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
void wg_timers_any_authenticated_packet_sent(wg_peer_t *peer)
static wg_peer_t * wg_peer_get(index_t peeri)
static f64 vlib_time_now(vlib_main_t *vm)
bool noise_remote_begin_session(vlib_main_t *vm, noise_remote_t *r)
static void wg_buffer_prepend_rewrite(vlib_buffer_t *b0, const wg_peer_t *peer)
VLIB buffer representation.
void wg_timers_any_authenticated_packet_traversal(wg_peer_t *peer)