FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  ipfix_collector_trace_t
 

Macros

#define foreach_ipfix_collector_error
 

Enumerations

enum  flowperpkt_error_t { IPFIX_COLLECTOR_N_ERROR }
 
enum  ipfix_collector_next_t { IPFIX_COLLECTOR_NEXT_DROP, IPFIX_COLLECTOR_N_NEXT }
 

Functions

static u8format_ipfix_collector_trace (u8 *s, va_list *args)
 
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. More...
 

Variables

static char * ipfix_collector_error_strings []
 
vlib_node_registration_t ipfix_collector_node
 (constructor) VLIB_REGISTER_NODE (ipfix_collector_node) More...
 

Macro Definition Documentation

◆ foreach_ipfix_collector_error

#define foreach_ipfix_collector_error
Value:
_(PROCESSED, "Number of IP-Fix packets processed") \
_(NO_LISTENER, "Number of IP-Fix packets with no listener")

Definition at line 22 of file node.c.

Enumeration Type Documentation

◆ flowperpkt_error_t

Enumerator
IPFIX_COLLECTOR_N_ERROR 

Definition at line 26 of file node.c.

◆ ipfix_collector_next_t

Enumerator
IPFIX_COLLECTOR_NEXT_DROP 
IPFIX_COLLECTOR_N_NEXT 

Definition at line 40 of file node.c.

Function Documentation

◆ format_ipfix_collector_trace()

static u8* format_ipfix_collector_trace ( u8 s,
va_list *  args 
)
static

Definition at line 57 of file node.c.

◆ ipfix_collector_node_fn()

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.

Node Identifier:
ipfix-collector

This function receives IP-FIX packets and forwards them to other graph nodes based on SetID field in IP-FIX.

Parameters
vmvlib_main_t corresponding to the current thread.
nodevlib_node_runtime_t data for this node.
framevlib_frame_t whose contents should be dispatched.
Graph mechanics: buffer, next index usage

Uses:

  • vlib_buffer_get_current(p0)
    • Parses IP-Fix packet to extract SetId which will be used to decide next node where packets should be enqueued.

Next Index:

  • Dispatches the packet to other VPP graph nodes based on their registartion for the IP-Fix SetId using API ipfix_collector_reg_setid().

Definition at line 92 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ipfix_collector_error_strings

char* ipfix_collector_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 34 of file node.c.

◆ ipfix_collector_node

vlib_node_registration_t ipfix_collector_node
Initial value:
= {
.name = "ipfix-collector",
.vector_size = sizeof (u32),
.n_next_nodes = IPFIX_COLLECTOR_N_NEXT,
.next_nodes = {
[IPFIX_COLLECTOR_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ipfix_collector_node)

Definition at line 53 of file node.c.

foreach_ipfix_collector_error
#define foreach_ipfix_collector_error
Definition: node.c:22
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
IPFIX_COLLECTOR_NEXT_DROP
@ IPFIX_COLLECTOR_NEXT_DROP
Definition: node.c:42
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
format_ipfix_collector_trace
static u8 * format_ipfix_collector_trace(u8 *s, va_list *args)
Definition: node.c:57
ipfix_collector_node_fn
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.
Definition: node.c:92
IPFIX_COLLECTOR_N_NEXT
@ IPFIX_COLLECTOR_N_NEXT
Definition: node.c:43
u32
unsigned int u32
Definition: types.h:88
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
ipfix_collector_error_strings
static char * ipfix_collector_error_strings[]
Definition: node.c:34