FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  sample_trace_t
 

Macros

#define foreach_sample_error   _(SWAPPED, "Mac swap packets processed")
 
#define VERSION_1   1
 
#define foreach_mac_address_offset
 

Enumerations

enum  sample_error_t { SAMPLE_N_ERROR, DHCP_STAT_UNKNOWN, DHCP_STAT_N_STAT }
 
enum  sample_next_t { SAMPLE_NEXT_INTERFACE_OUTPUT, SAMPLE_N_NEXT }
 

Functions

static u8format_sample_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() sample_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t sample_node
 (constructor) VLIB_REGISTER_NODE (sample_node) More...
 
static char * sample_error_strings []
 

Macro Definition Documentation

◆ foreach_mac_address_offset

#define foreach_mac_address_offset
Value:
_(0) \
_(1) \
_(2) \
_(3) \
_(4) \
_(5)

Definition at line 82 of file node.c.

◆ foreach_sample_error

#define foreach_sample_error   _(SWAPPED, "Mac swap packets processed")

Definition at line 50 of file node.c.

◆ VERSION_1

#define VERSION_1   1

Definition at line 80 of file node.c.

Enumeration Type Documentation

◆ sample_error_t

Enumerator
SAMPLE_N_ERROR 
DHCP_STAT_UNKNOWN 
DHCP_STAT_N_STAT 

Definition at line 53 of file node.c.

◆ sample_next_t

Enumerator
SAMPLE_NEXT_INTERFACE_OUTPUT 
SAMPLE_N_NEXT 

Definition at line 67 of file node.c.

Function Documentation

◆ format_sample_trace()

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

Definition at line 33 of file node.c.

+ Here is the call graph for this function:

◆ sample_node()

VLIB_NODE_FN() sample_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 90 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ sample_error_strings

char* sample_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_sample_error
Definition: node.c:50

Definition at line 61 of file node.c.

◆ sample_node

Initial value:
=
{
.name = "sample",
.vector_size = sizeof (u32),
.format_trace = format_sample_trace,
.error_strings = sample_error_strings,
.n_next_nodes = SAMPLE_N_NEXT,
.next_nodes = {
[SAMPLE_NEXT_INTERFACE_OUTPUT] = "interface-output",
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_sample_trace(u8 *s, va_list *args)
Definition: node.c:33
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * sample_error_strings[]
Definition: node.c:61

(constructor) VLIB_REGISTER_NODE (sample_node)

Definition at line 691 of file node.c.