FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
mpls_lookup.c File Reference
+ Include dependency graph for mpls_lookup.c:

Go to the source code of this file.

Data Structures

struct  mpls_lookup_trace_t
 The arc/edge from the MPLS lookup node to the MPLS replicate node. More...
 
struct  mpls_load_balance_trace_t
 

Macros

#define mpls_error(n, s)   s,
 

Functions

static u8format_mpls_lookup_trace (u8 *s, va_list *args)
 
static uword mpls_lookup (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_mpls_load_balance_trace (u8 *s, va_list *args)
 
static uword mpls_load_balance (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t mpls_lookup_node
 Static MPLS VLIB forwarding node. More...
 
static char * mpls_error_strings []
 
vlib_node_registration_t mpls_load_balance_node
 (constructor) VLIB_REGISTER_NODE (mpls_load_balance_node) More...
 

Macro Definition Documentation

#define mpls_error (   n,
 
)    s,

Function Documentation

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

Definition at line 421 of file mpls_lookup.c.

+ Here is the call graph for this function:

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

Definition at line 43 of file mpls_lookup.c.

+ Here is the call graph for this function:

static uword mpls_load_balance ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 433 of file mpls_lookup.c.

+ Here is the call graph for this function:

static uword mpls_lookup ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Definition at line 59 of file mpls_lookup.c.

+ Here is the call graph for this function:

Variable Documentation

char* mpls_error_strings[]
static
Initial value:
= {
#define mpls_error(n,s)
mpls_error (NONE, "no error")
mpls_error (UNKNOWN_PROTOCOL, "unknown protocol")
mpls_error (UNSUPPORTED_VERSION, "unsupported version")
mpls_error (PKTS_DECAP, "MPLS input packets decapsulated")
mpls_error (PKTS_ENCAP, "MPLS output packets encapsulated")
mpls_error (NO_LABEL, "MPLS no label for fib/dst")
mpls_error (TTL_EXPIRED, "MPLS ttl expired")
mpls_error (S_NOT_SET, "MPLS s-bit not set")
mpls_error (BAD_LABEL, "invalid FIB id in label")
mpls_error (NOT_IP4, "non-ip4 packets dropped")
mpls_error (DISALLOWED_FIB, "disallowed FIB id")
mpls_error (NOT_ENABLED, "MPLS not enabled")
mpls_error (DROP, "MPLS DROP DPO")
mpls_error (PUNT, "MPLS PUNT DPO")
}
#define mpls_error(n, s)
DROP
Definition: error.def:41

Definition at line 391 of file mpls_lookup.c.

vlib_node_registration_t mpls_load_balance_node
Initial value:
= {
.function = mpls_load_balance,
.name = "mpls-load-balance",
.vector_size = sizeof (u32),
.sibling_of = "mpls-lookup",
}
unsigned int u32
Definition: types.h:88
static uword mpls_load_balance(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mpls_lookup.c:433
static u8 * format_mpls_load_balance_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:421

(constructor) VLIB_REGISTER_NODE (mpls_load_balance_node)

Definition at line 610 of file mpls_lookup.c.

vlib_node_registration_t mpls_lookup_node
Initial value:
= {
.function = mpls_lookup,
.name = "mpls-lookup",
.vector_size = sizeof (u32),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.sibling_of = "ip4-lookup",
.format_buffer = format_mpls_header,
.format_trace = format_mpls_lookup_trace,
.unformat_buffer = unformat_mpls_header,
}
format_function_t format_mpls_header
Definition: mpls.h:92
static uword mpls_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: mpls_lookup.c:59
unformat_function_t unformat_mpls_header
Definition: mpls.h:106
unsigned int u32
Definition: types.h:88
static char * mpls_error_strings[]
Definition: mpls_lookup.c:391
static u8 * format_mpls_lookup_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:43

Static MPLS VLIB forwarding node.

(constructor) VLIB_REGISTER_NODE (mpls_lookup_node)

Definition at line 28 of file mpls_lookup.c.