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",
117 u32 n_left_from, *from, *to_next;
121 error = IGMP_ERROR_NONE;
128 while (n_left_from > 0)
134 while (n_left_from > 0 && n_left_to_next > 0)
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);
226 .name =
"igmp-input",
227 .vector_size =
sizeof (
u32),
248 u32 n_left_from, *from, *to_next;
255 while (n_left_from > 0)
261 while (n_left_from > 0 && n_left_to_next > 0)
308 (
u8 *) args,
sizeof (*args) + len);
320 n_left_to_next, bi, next);
332 .name =
"igmp-parse-query",
333 .vector_size =
sizeof (
u32),
352 u32 n_left_from, *from, *to_next;
362 while (n_left_from > 0)
368 while (n_left_from > 0 && n_left_to_next > 0)
386 error = IGMP_ERROR_NONE;
419 (
u8 *) args,
sizeof (*args) + len);
431 n_left_to_next, bi, next);
443 .name =
"igmp-parse-report",
444 .vector_size =
sizeof (
u32),
A copy of the query message sent from the worker to the main thread.
void igmp_handle_report(const igmp_report_args_t *args)
#define clib_memcpy_fast(a, b, c)
static u32 igmp_membership_query_v3_length(const igmp_membership_query_v3_t *q)
void ip4_register_protocol(u32 protocol, u32 node_index)
vlib_error_t * errors
Vector of errors for this node.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define VLIB_INIT_FUNCTION(x)
description fragment has unexpected format
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#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.
#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).
A copy of the report message sent from the worker to the main thread.
#define VLIB_REGISTER_NODE(x,...)
#define foreach_igmp_error
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_main_t vlib_node_runtime_t * node
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
void igmp_handle_query(const igmp_query_args_t *args)
Called from the main thread on reception of a Query message.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static u32 igmp_membership_report_v3_length(const igmp_membership_report_v3_t *r)
u16 flags
Copy of main node flags.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static int ip4_header_bytes(const ip4_header_t *i)
#define VLIB_NODE_FLAG_TRACE
static ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u16 ip_csum_fold(ip_csum_t c)
vl_api_interface_index_t sw_if_index