22 #define foreach_ipfix_collector_error \ 23 _(PROCESSED, "Number of IP-Fix packets processed") \ 24 _(NO_LISTENER, "Number of IP-Fix packets with no listener") 28 #define _(sym,str) IPFIX_COLLECTOR_ERROR_##sym, 35 #define _(sym,string) string, 64 "IPFIX_COLLECTOR: set_id %u, next_node %u", t->
set_id,
96 u32 n_left_from, next_index, *from, *to_next;
97 word n_no_listener = 0;
105 while (n_left_from > 0)
111 while (n_left_from >= 4 && n_left_to_next >= 2)
118 u16 set_id0, set_id1;
208 to_next, n_left_to_next,
209 bi0, bi1, next0, next1);
212 while (n_left_from > 0 && n_left_to_next > 0)
261 to_next, n_left_to_next,
268 IPFIX_COLLECTOR_ERROR_NO_LISTENER, n_no_listener);
270 IPFIX_COLLECTOR_ERROR_PROCESSED, n_listener);
277 .name =
"ipfix-collector",
278 .vector_size =
sizeof (
u32),
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
IP-FIX collector internal client structure to store SetID to client node ID.
u32 client_next_node
ipfix-collector next index where packets have to be redirected.
#define foreach_ipfix_collector_error
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
static ipfix_client * ipfix_collector_get_client(u16 set_id)
vlib_node_registration_t ipfix_collector_node
(constructor) VLIB_REGISTER_NODE (ipfix_collector_node)
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
u32 client_node
Node index where packets have to be redirected.
vl_api_fib_path_type_t type
static u8 * format_ipfix_collector_trace(u8 *s, va_list *args)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 node_index
Node index.
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
#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).
#define VLIB_REGISTER_NODE(x,...)
uword ipfix_collector_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Node to receive IP-Fix packets.
#define CLIB_PREFETCH(addr, size, type)
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.
struct _vlib_node_registration vlib_node_registration_t
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static char * ipfix_collector_error_strings[]
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.