FD.io VPP  v16.09
Vector Packet Processing
mac_swap.c File Reference
+ Include dependency graph for mac_swap.c:

Go to the source code of this file.

Data Structures

struct  mac_swap_main_t
 
struct  swap_trace_t
 

Macros

#define foreach_hw_driver_next
 
#define foreach_mac_swap_error   _(SWAPS, "mac addresses swapped")
 

Enumerations

enum  mac_swap_error_t { MAC_SWAP_N_ERROR }
 
enum  mac_swap_next_t { MAC_SWAP_NEXT_DROP, MAC_SWAP_N_NEXT }
 

Functions

static u8format_swap_trace (u8 *s, va_list *args)
 
static uword mac_swap_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tmac_swap_init (vlib_main_t *vm)
 

Variables

mac_swap_main_t mac_swap_main
 
static vlib_node_registration_t mac_swap_node
 (constructor) VLIB_REGISTER_NODE (mac_swap_node) More...
 
static char * mac_swap_error_strings []
 

Macro Definition Documentation

#define foreach_hw_driver_next
Value:
_(IP4) \
_(IP6) \
_(ETHERNET)
Definition: lisp_types.h:24
Definition: lisp_types.h:25

Definition at line 58 of file mac_swap.c.

#define foreach_mac_swap_error   _(SWAPS, "mac addresses swapped")

Definition at line 67 of file mac_swap.c.

Enumeration Type Documentation

Enumerator
MAC_SWAP_N_ERROR 

Definition at line 70 of file mac_swap.c.

Enumerator
MAC_SWAP_NEXT_DROP 
MAC_SWAP_N_NEXT 

Definition at line 99 of file mac_swap.c.

Function Documentation

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

Definition at line 46 of file mac_swap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* mac_swap_init ( vlib_main_t vm)

Definition at line 365 of file mac_swap.c.

+ Here is the call graph for this function:

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

Definition at line 106 of file mac_swap.c.

+ Here is the call graph for this function:

Variable Documentation

char* mac_swap_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_mac_swap_error
Definition: mac_swap.c:67

Definition at line 78 of file mac_swap.c.

mac_swap_main_t mac_swap_main

Definition at line 63 of file mac_swap.c.

static vlib_node_registration_t mac_swap_node
static
Initial value:
= {
.function = mac_swap_node_fn,
.name = "mac-swap",
.vector_size = sizeof (u32),
.format_trace = format_swap_trace,
.error_strings = mac_swap_error_strings,
.n_next_nodes = MAC_SWAP_N_NEXT,
.next_nodes = {
[MAC_SWAP_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u8 * format_swap_trace(u8 *s, va_list *args)
Definition: mac_swap.c:46
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static char * mac_swap_error_strings[]
Definition: mac_swap.c:78
static uword mac_swap_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mac_swap.c:106

(constructor) VLIB_REGISTER_NODE (mac_swap_node)

Definition at line 65 of file mac_swap.c.