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

Go to the source code of this file.

Data Structures

struct  mpls_input_trace_t
 
struct  mpls_input_runtime_t
 

Macros

#define foreach_mpls_input_next
 
#define mpls_error(n, s)   s,
 

Enumerations

enum  mpls_input_next_t { MPLS_INPUT_N_NEXT }
 

Functions

static u8format_mpls_input_trace (u8 *s, va_list *args)
 
static uword mpls_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() mpls_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static void mpls_setup_nodes (vlib_main_t *vm)
 
static clib_error_tmpls_input_init (vlib_main_t *vm)
 

Variables

static char * mpls_error_strings []
 
vlib_node_registration_t mpls_input_node
 (constructor) VLIB_REGISTER_NODE (mpls_input_node) More...
 

Macro Definition Documentation

◆ foreach_mpls_input_next

#define foreach_mpls_input_next
Value:
_(DROP, "error-drop") \
_(LOOKUP, "mpls-lookup")
DROP
Definition: error.def:41

Definition at line 28 of file mpls_input.c.

◆ mpls_error

#define mpls_error (   n,
 
)    s,

Enumeration Type Documentation

◆ mpls_input_next_t

Enumerator
MPLS_INPUT_N_NEXT 

Definition at line 32 of file mpls_input.c.

Function Documentation

◆ format_mpls_input_trace()

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

Definition at line 40 of file mpls_input.c.

+ Here is the call graph for this function:

◆ mpls_input_init()

static clib_error_t* mpls_input_init ( vlib_main_t vm)
static

Definition at line 279 of file mpls_input.c.

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

◆ mpls_input_inline()

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

Definition at line 71 of file mpls_input.c.

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

◆ mpls_input_node()

VLIB_NODE_FN() mpls_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 232 of file mpls_input.c.

+ Here is the call graph for this function:

◆ mpls_setup_nodes()

static void mpls_setup_nodes ( vlib_main_t vm)
static

Definition at line 268 of file mpls_input.c.

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

Variable Documentation

◆ mpls_error_strings

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 (PKTS_NEED_FRAG, "MPLS output packets needs fragmentation")
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")
}
option version
Definition: sample.api:19
#define mpls_error(n, s)
for(i=1;i<=collision_buckets;i++)
vl_api_ip_proto_t protocol
Definition: lb_types.api:71
u32 label
Definition: fib_types.api:25
vl_api_address_t dst
Definition: gre.api:61
u8 ttl
Definition: fib_types.api:26
DROP
Definition: error.def:41
u32 ip4
Definition: one.api:440

Definition at line 239 of file mpls_input.c.

◆ mpls_input_node

vlib_node_registration_t mpls_input_node
Initial value:
= {
.name = "mpls-input",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof(mpls_input_runtime_t),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.n_next_nodes = MPLS_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_mpls_input_trace,
}
static char * mpls_error_strings[]
Definition: mpls_input.c:239
format_function_t format_mpls_unicast_header_net_byte_order
Definition: mpls.h:70
unsigned int u32
Definition: types.h:88
#define foreach_mpls_input_next
Definition: mpls_input.c:28
static u8 * format_mpls_input_trace(u8 *s, va_list *args)
Definition: mpls_input.c:40

(constructor) VLIB_REGISTER_NODE (mpls_input_node)

Definition at line 245 of file mpls_input.c.