|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
21 #include <vpp/app/version.h>
55 #define _(sym,string) string,
75 s =
format (s,
"sw_if_index %u next-index %u",
89 s =
format (s,
"sw_if_index %u next-index %u",
103 s =
format (s,
"sw_if_index %u next-input %u len %u",
121 error = IGMP_ERROR_NONE;
154 if (
ip->protocol != IP_PROTOCOL_IGMP)
156 error = IGMP_ERROR_INVALID_PROTOCOL;
168 clib_net_to_host_u16 (
ip->length) -
172 if (checksum != csum)
174 error = IGMP_ERROR_BAD_CHECKSUM;
180 error = IGMP_ERROR_NOT_ENABLED;
188 case IGMP_TYPE_membership_query:
191 case IGMP_TYPE_membership_report_v3:
195 error = IGMP_ERROR_UNKNOWN_TYPE;
214 n_left_to_next, bi,
next);
219 return frame->n_vectors;
226 .name =
"igmp-input",
227 .vector_size =
sizeof (
u32),
308 (
u8 *) args,
sizeof (*args) +
len);
316 b->
error =
node->errors[IGMP_ERROR_BAD_LENGTH];
320 n_left_to_next, bi,
next);
325 return frame->n_vectors;
332 .name =
"igmp-parse-query",
333 .vector_size =
sizeof (
u32),
386 error = IGMP_ERROR_NONE;
419 (
u8 *) args,
sizeof (*args) +
len);
427 b->
error =
node->errors[IGMP_ERROR_BAD_LENGTH];
431 n_left_to_next, bi,
next);
436 return frame->n_vectors;
443 .name =
"igmp-parse-report",
444 .vector_size =
sizeof (
u32),
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
nat44_ei_hairpin_src_next_t next_index
A copy of the report message sent from the worker to the main thread.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u32 igmp_membership_report_v3_length(const igmp_membership_report_v3_t *r)
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void ip4_register_protocol(u32 protocol, u32 node_index)
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
vlib_error_t * errors
Vector of errors for this node.
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define foreach_igmp_error
#define VLIB_NODE_FLAG_TRACE
static ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
void igmp_handle_report(const igmp_report_args_t *args)
static u32 igmp_membership_query_v3_length(const igmp_membership_query_v3_t *q)
struct _vlib_node_registration vlib_node_registration_t
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
void igmp_handle_query(const igmp_query_args_t *args)
Called from the main thread on reception of a Query message.
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
#define VLIB_INIT_FUNCTION(x)
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static int ip4_header_bytes(const ip4_header_t *i)
A copy of the query message sent from the worker to the main thread.
vl_api_interface_index_t sw_if_index
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
static u16 ip_csum_fold(ip_csum_t c)
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)