|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 #define foreach_wg_output_error \
26 _(PEER, "Peer error") \
27 _(KEYPAIR, "Keypair error") \
28 _(TOO_BIG, "packet too big") \
32 #define _(sym,str) WG_OUTPUT_ERROR_##sym,
39 #define _(sym,string) string,
119 b[0]->
error =
node->errors[WG_OUTPUT_ERROR_PEER];
141 b[0]->
error =
node->errors[WG_OUTPUT_ERROR_KEYPAIR];
154 b[0]->
error =
node->errors[WG_OUTPUT_ERROR_TOO_BIG];
166 &encrypted_packet->
counter, plain_data,
185 clib_memcpy (plain_data, (
u8 *) encrypted_packet, encrypted_packet_len);
187 hdr->
udp.
length = clib_host_to_net_u16 (encrypted_packet_len +
192 (&hdr->
ip4, clib_host_to_net_u16 (
b[0]->current_length));
200 && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)))
214 return frame->n_vectors;
220 .name =
"wg-output-tun",
221 .vector_size =
sizeof (
u32),
struct ip4_udp_header_t_ ip4_udp_header_t
vlib_node_registration_t wg_output_tun_node
(constructor) VLIB_REGISTER_NODE (wg_output_tun_node)
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
void wg_send_handshake_from_mt(u32 peer_idx, bool is_retry)
static char * wg_output_error_strings[]
#define clib_memcpy(d, s, n)
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
static u32 wg_peer_assign_thread(u32 thread_id)
vlib_main_t vlib_node_runtime_t * node
static void ip4_header_set_len_w_chksum(ip4_header_t *ip4, u16 len)
static index_t wg_peer_get_by_adj_index(index_t ai)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_dhcp_client_state_t state
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
static u8 * format_wg_output_tun_trace(u8 *s, va_list *args)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
void wg_timers_data_sent(wg_peer_t *peer)
#define VLIB_NODE_FLAG_TRACE
wg_per_thread_data_t * per_thread_data
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
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)
struct _vlib_node_registration vlib_node_registration_t
u16 current_length
Nbytes between current data and the end of this buffer.
#define message_data_len(plain_len)
u8 * format_ip4_udp_header(u8 *s, va_list *args)
description fragment has unexpected format
static_always_inline u32 vlib_buffer_get_default_data_size(vlib_main_t *vm)
#define clib_atomic_cmp_and_swap(addr, old, new)
@ WG_OUTPUT_NEXT_INTERFACE_OUTPUT
#define foreach_wg_output_error
u8 data[WG_DEFAULT_DATA_SIZE]
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define 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)
u16 nexts[VLIB_FRAME_SIZE]
vl_api_fib_path_type_t type
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
void wg_timers_any_authenticated_packet_traversal(wg_peer_t *peer)