FD.io VPP  v18.07-rc0-415-g6c78436
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 foreach_mac_address_offset
 

Enumerations

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

Functions

static u8format_mac_address (u8 *s, va_list *args)
 
static u8format_sample_trace (u8 *s, va_list *args)
 
static uword sample_node_fn (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

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

Definition at line 75 of file node.c.

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

Definition at line 54 of file node.c.

Enumeration Type Documentation

Enumerator
DHCP_STAT_UNKNOWN 
DHCP_STAT_N_STAT 
SAMPLE_N_ERROR 

Definition at line 57 of file node.c.

Enumerator
SAMPLE_NEXT_INTERFACE_OUTPUT 
SAMPLE_N_NEXT 

Definition at line 70 of file node.c.

Function Documentation

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

Definition at line 29 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 37 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 84 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

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

Definition at line 64 of file node.c.

Initial value:
= {
.function = sample_node_fn,
.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
static u8 * format_sample_trace(u8 *s, va_list *args)
Definition: node.c:37
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword sample_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:84
static char * sample_error_strings[]
Definition: node.c:64

(constructor) VLIB_REGISTER_NODE (sample_node)

Definition at line 52 of file node.c.