FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
cdp_node.c File Reference

2 x CDP graph nodes: an "interior" node to process incoming announcements, and a "process" node to periodically send announcements. More...

+ Include dependency graph for cdp_node.c:

Go to the source code of this file.

Enumerations

enum  cdp_next_t { CDP_INPUT_NEXT_NORMAL, CDP_INPUT_N_NEXT }
 

Functions

static uword cdp_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword cdp_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
void vnet_cdp_create_periodic_process (cdp_main_t *cmp)
 

Variables

static char * cdp_error_strings []
 
static vlib_node_registration_t cdp_input_node
 (constructor) VLIB_REGISTER_NODE (cdp_input_node) More...
 

Detailed Description

2 x CDP graph nodes: an "interior" node to process incoming announcements, and a "process" node to periodically send announcements.

The interior node is neither pipelined nor dual-looped, because it would be very unusual to see more than one CDP packet in a given input frame. So, it's a very simple / straightforward example.

Definition in file cdp_node.c.

Enumeration Type Documentation

◆ cdp_next_t

enum cdp_next_t
Enumerator
CDP_INPUT_NEXT_NORMAL 
CDP_INPUT_N_NEXT 

Definition at line 45 of file cdp_node.c.

Function Documentation

◆ cdp_node_fn()

static uword cdp_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 56 of file cdp_node.c.

+ Here is the call graph for this function:

◆ cdp_process()

static uword cdp_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 126 of file cdp_node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_cdp_create_periodic_process()

void vnet_cdp_create_periodic_process ( cdp_main_t cmp)

Definition at line 201 of file cdp_node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ cdp_error_strings

char* cdp_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_cdp_error
Definition: cdp.h:112

Definition at line 34 of file cdp_node.c.

◆ cdp_input_node

vlib_node_registration_t cdp_input_node
static
Initial value:
= {
.function = cdp_node_fn,
.name = "cdp-input",
.vector_size = sizeof (u32),
.n_errors = CDP_N_ERROR,
.error_strings = cdp_error_strings,
.format_trace = cdp_input_format_trace,
.n_next_nodes = CDP_INPUT_N_NEXT,
.next_nodes = {
[CDP_INPUT_NEXT_NORMAL] = "error-drop",
},
}
static uword cdp_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: cdp_node.c:56
unsigned int u32
Definition: types.h:88
u8 * cdp_input_format_trace(u8 *s, va_list *args)
Definition: cdp_input.c:484
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * cdp_error_strings[]
Definition: cdp_node.c:34

(constructor) VLIB_REGISTER_NODE (cdp_input_node)

Definition at line 104 of file cdp_node.c.