FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
lldp_node.c File Reference

LLDP nodes implementation. More...

+ Include dependency graph for lldp_node.c:

Go to the source code of this file.

Macros

#define LLDP_DEBUG   (0)
 
#define F(sym, string)   static char LLDP_ERR_##sym##_STR[] = string;
 
#define F(sym, string)   LLDP_ERR_##sym##_STR,
 

Enumerations

enum  lldp_next_t { LLDP_INPUT_NEXT_NORMAL, LLDP_INPUT_N_NEXT }
 

Functions

 foreach_lldp_error (F)
 
static uword lldp_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword lldp_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
void lldp_schedule_intf (lldp_main_t *lm, lldp_intf_t *n)
 
void lldp_unschedule_intf (lldp_main_t *lm, lldp_intf_t *n)
 
static clib_error_tlldp_sw_interface_up_down (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (lldp_sw_interface_up_down)
 
static clib_error_tlldp_hw_interface_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (lldp_hw_interface_up_down)
 

Variables

static vlib_node_registration_t lldp_process_node
 (constructor) VLIB_REGISTER_NODE (lldp_process_node) More...
 
static char * lldp_error_strings []
 
static vlib_node_registration_t lldp_input_node
 (constructor) VLIB_REGISTER_NODE (lldp_input_node) More...
 

Detailed Description

LLDP nodes implementation.

Definition in file lldp_node.c.

Macro Definition Documentation

◆ F [1/2]

#define F (   sym,
  string 
)    static char LLDP_ERR_##sym##_STR[] = string;

Definition at line 28 of file lldp_node.c.

◆ F [2/2]

#define F (   sym,
  string 
)    LLDP_ERR_##sym##_STR,

Definition at line 28 of file lldp_node.c.

◆ LLDP_DEBUG

#define LLDP_DEBUG   (0)

Definition at line 24 of file lldp_node.c.

Enumeration Type Documentation

◆ lldp_next_t

Enumerator
LLDP_INPUT_NEXT_NORMAL 
LLDP_INPUT_N_NEXT 

Definition at line 47 of file lldp_node.c.

Function Documentation

◆ foreach_lldp_error()

foreach_lldp_error ( F  )

◆ lldp_hw_interface_up_down()

static clib_error_t* lldp_hw_interface_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 319 of file lldp_node.c.

+ Here is the call graph for this function:

◆ lldp_node_fn()

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

Definition at line 58 of file lldp_node.c.

+ Here is the call graph for this function:

◆ lldp_process()

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

Definition at line 129 of file lldp_node.c.

+ Here is the call graph for this function:

◆ lldp_schedule_intf()

void lldp_schedule_intf ( lldp_main_t lm,
lldp_intf_t n 
)

Definition at line 242 of file lldp_node.c.

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

◆ lldp_sw_interface_up_down()

static clib_error_t* lldp_sw_interface_up_down ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)
static

Definition at line 298 of file lldp_node.c.

+ Here is the call graph for this function:

◆ lldp_unschedule_intf()

void lldp_unschedule_intf ( lldp_main_t lm,
lldp_intf_t n 
)

Definition at line 267 of file lldp_node.c.

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

◆ VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION()

VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION ( lldp_hw_interface_up_down  )

◆ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION()

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( lldp_sw_interface_up_down  )

Variable Documentation

◆ lldp_error_strings

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

Definition at line 36 of file lldp_node.c.

◆ lldp_input_node

vlib_node_registration_t lldp_input_node
static
Initial value:
= {
.function = lldp_node_fn,
.name = "lldp-input",
.vector_size = sizeof(u32),
.n_errors = LLDP_N_ERROR,
.error_strings = lldp_error_strings,
.format_trace = lldp_input_format_trace,
.n_next_nodes = LLDP_INPUT_N_NEXT,
.next_nodes =
{
[LLDP_INPUT_NEXT_NORMAL] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (lldp_input_node)

Definition at line 106 of file lldp_node.c.

◆ lldp_process_node

static vlib_node_registration_t lldp_process_node
static
Initial value:
= {
.function = lldp_process,
.name = "lldp-process",
}

(constructor) VLIB_REGISTER_NODE (lldp_process_node)

Definition at line 26 of file lldp_node.c.

VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
LLDP_INPUT_N_NEXT
@ LLDP_INPUT_N_NEXT
Definition: lldp_node.c:50
foreach_lldp_error
foreach_lldp_error(F)
u32
unsigned int u32
Definition: types.h:88
lldp_input_format_trace
u8 * lldp_input_format_trace(u8 *s, va_list *args)
Definition: lldp_cli.c:727
VLIB_NODE_TYPE_PROCESS
@ VLIB_NODE_TYPE_PROCESS
Definition: node.h:84
F
#define F(sym, string)
Definition: lldp_node.c:28
LLDP_INPUT_NEXT_NORMAL
@ LLDP_INPUT_NEXT_NORMAL
Definition: lldp_node.c:49
lldp_process
static uword lldp_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: lldp_node.c:129
lldp_node_fn
static uword lldp_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: lldp_node.c:58
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
lldp_error_strings
static char * lldp_error_strings[]
Definition: lldp_node.c:36