FD.io VPP  v16.09
Vector Packet Processing
mpls.h File Reference
+ Include dependency graph for mpls.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mpls_gre_tunnel_t
 
struct  mpls_eth_tunnel_t
 
struct  mpls_encap_t
 
struct  mpls_decap_t
 
struct  mpls_main_t
 
struct  mpls_gre_tx_trace_t
 
struct  mpls_eth_tx_trace_t
 
struct  show_mpls_fib_t
 

Macros

#define mpls_error(n, s)   MPLS_ERROR_##n,
 
#define MPLS_GRE_OUTPUT_NEXT_LOOKUP   1
 
#define MPLS_GRE_OUTPUT_NEXT_DROP   VNET_INTERFACE_TX_NEXT_DROP
 
#define foreach_mpls_input_next
 

Enumerations

enum  mpls_gre_error_t { mpls_error, mpls_error }
 
enum  mpls_input_next_t { MPLS_INPUT_N_NEXT }
 

Functions

typedef CLIB_PACKED (struct{ip4_header_t ip4;gre_header_t gre;mpls_unicast_header_t labels[0];}) ip4_gre_and_mpls_header_t
 
mpls_encap_tmpls_encap_by_fib_and_dest (mpls_main_t *mm, u32 rx_fib, u32 dst_address)
 
int mpls_label_from_fib_id_and_dest (mpls_main_t *gm, u32 fib_id, u32 dst_address, u32 *labelp)
 
int vnet_mpls_gre_add_del_tunnel (ip4_address_t *src, ip4_address_t *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 outer_fib_id, u32 *tunnel_intfc_sw_if_index, u8 l2_only, u8 is_add)
 
int vnet_mpls_ethernet_add_del_tunnel (u8 *dst, ip4_address_t *intfc, u32 mask_width, u32 inner_fib_id, u32 tx_sw_if_index, u32 *tunnel_sw_if_index, u8 l2_only, u8 is_add)
 
int vnet_mpls_gre_delete_fib_tunnels (u32 fib_id)
 
int mpls_fib_reset_labels (u32 fib_id)
 
int vnet_mpls_add_del_decap (u32 rx_fib_id, u32 tx_fib_id, u32 label_host_byte_order, int s_bit, int next_index, int is_add)
 
int vnet_mpls_add_del_encap (ip4_address_t *dest, u32 fib_id, u32 *labels_host_byte_order, u32 policy_tunnel_index, int no_dst_hash, u32 *indexp, int is_add)
 
int vnet_mpls_policy_tunnel_add_rewrite (mpls_main_t *mm, mpls_encap_t *e, u32 policy_tunnel_index)
 
u8format_mpls_gre_tx_trace (u8 *s, va_list *args)
 
u8format_mpls_gre_header (u8 *s, va_list *args)
 
u8format_mpls_eth_tx_trace (u8 *s, va_list *args)
 
int mpls_dest_cmp (void *a1, void *a2)
 
int mpls_fib_index_cmp (void *a1, void *a2)
 
int mpls_label_cmp (void *a1, void *a2)
 

Variables

vnet_hw_interface_class_t mpls_gre_hw_interface_class
 
mpls_main_t mpls_main
 
format_function_t format_mpls_protocol
 
format_function_t format_mpls_header
 
format_function_t format_mpls_header_with_length
 
format_function_t format_mpls_gre_header_with_length
 
format_function_t format_mpls_eth_header_with_length
 
format_function_t format_mpls_unicast_label
 
format_function_t format_mpls_encap_index
 
vlib_node_registration_t mpls_input_node
 (constructor) VLIB_REGISTER_NODE (mpls_input_node) More...
 
vlib_node_registration_t mpls_policy_encap_node
 (constructor) VLIB_REGISTER_NODE (mpls_policy_encap_node) More...
 
vnet_device_class_t mpls_gre_device_class
 
unformat_function_t unformat_mpls_protocol_host_byte_order
 
unformat_function_t unformat_mpls_protocol_net_byte_order
 
unformat_function_t unformat_mpls_label_net_byte_order
 
unformat_function_t unformat_mpls_gre_header
 
unformat_function_t unformat_pg_mpls_gre_header
 
unformat_function_t unformat_mpls_header
 
unformat_function_t unformat_pg_mpls_header
 

Macro Definition Documentation

#define foreach_mpls_input_next
Value:
_(DROP, "error-drop") \
_(IP4_INPUT, "ip4-input") \
_(L2_OUTPUT, "l2-output")
DROP
Definition: error.def:41

Definition at line 199 of file mpls.h.

#define mpls_error (   n,
 
)    MPLS_ERROR_##n,

Definition at line 33 of file mpls.h.

#define MPLS_GRE_OUTPUT_NEXT_DROP   VNET_INTERFACE_TX_NEXT_DROP

Definition at line 136 of file mpls.h.

#define MPLS_GRE_OUTPUT_NEXT_LOOKUP   1

Definition at line 135 of file mpls.h.

Enumeration Type Documentation

Enumerator
mpls_error 
mpls_error 

Definition at line 32 of file mpls.h.

Enumerator
MPLS_INPUT_N_NEXT 

Definition at line 204 of file mpls.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip4_header_t ip4;gre_header_t gre;mpls_unicast_header_t labels[0];}  )
u8* format_mpls_eth_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 44 of file mpls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_mpls_gre_header ( u8 s,
va_list *  args 
)

Definition at line 101 of file mpls.c.

+ Here is the call graph for this function:

u8* format_mpls_gre_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 23 of file mpls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mpls_dest_cmp ( void *  a1,
void *  a2 
)

Definition at line 581 of file mpls.c.

+ Here is the caller graph for this function:

mpls_encap_t* mpls_encap_by_fib_and_dest ( mpls_main_t mm,
u32  rx_fib,
u32  dst_address 
)

Definition at line 156 of file mpls.c.

+ Here is the caller graph for this function:

int mpls_fib_index_cmp ( void *  a1,
void *  a2 
)

Definition at line 590 of file mpls.c.

+ Here is the caller graph for this function:

int mpls_fib_reset_labels ( u32  fib_id)

Definition at line 703 of file mpls.c.

+ Here is the caller graph for this function:

int mpls_label_cmp ( void *  a1,
void *  a2 
)

Definition at line 599 of file mpls.c.

+ Here is the caller graph for this function:

int mpls_label_from_fib_id_and_dest ( mpls_main_t gm,
u32  fib_id,
u32  dst_address,
u32 labelp 
)
int vnet_mpls_add_del_decap ( u32  rx_fib_id,
u32  tx_fib_id,
u32  label_host_byte_order,
int  s_bit,
int  next_index,
int  is_add 
)

Definition at line 369 of file mpls.c.

+ Here is the caller graph for this function:

int vnet_mpls_add_del_encap ( ip4_address_t dest,
u32  fib_id,
u32 labels_host_byte_order,
u32  policy_tunnel_index,
int  no_dst_hash,
u32 indexp,
int  is_add 
)

Definition at line 172 of file mpls.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_ethernet_add_del_tunnel ( u8 dst,
ip4_address_t intfc,
u32  mask_width,
u32  inner_fib_id,
u32  tx_sw_if_index,
u32 tunnel_sw_if_index,
u8  l2_only,
u8  is_add 
)

Definition at line 1276 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_gre_add_del_tunnel ( ip4_address_t src,
ip4_address_t dst,
ip4_address_t intfc,
u32  mask_width,
u32  inner_fib_id,
u32  outer_fib_id,
u32 tunnel_intfc_sw_if_index,
u8  l2_only,
u8  is_add 
)

Definition at line 728 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_gre_delete_fib_tunnels ( u32  fib_id)

Definition at line 964 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_mpls_policy_tunnel_add_rewrite ( mpls_main_t mm,
mpls_encap_t e,
u32  policy_tunnel_index 
)

Definition at line 1607 of file interface.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

format_function_t format_mpls_encap_index

Definition at line 115 of file mpls.h.

format_function_t format_mpls_eth_header_with_length

Definition at line 113 of file mpls.h.

format_function_t format_mpls_gre_header_with_length

Definition at line 112 of file mpls.h.

format_function_t format_mpls_header

Definition at line 110 of file mpls.h.

format_function_t format_mpls_header_with_length

Definition at line 111 of file mpls.h.

format_function_t format_mpls_protocol

Definition at line 109 of file mpls.h.

format_function_t format_mpls_unicast_label

Definition at line 114 of file mpls.h.

vnet_device_class_t mpls_gre_device_class
vnet_hw_interface_class_t mpls_gre_hw_interface_class
vlib_node_registration_t mpls_input_node
Initial value:
= {
.function = mpls_input,
.name = "mpls-gre-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_rx_trace,
.unformat_buffer = unformat_mpls_gre_header,
}
#define foreach_mpls_input_next
Definition: mpls.h:199
static uword mpls_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: node.c:245
format_function_t format_mpls_gre_header_with_length
Definition: mpls.h:112
u8 * format_mpls_rx_trace(u8 *s, va_list *args)
Definition: node.c:29
static char * mpls_error_strings[]
Definition: node.c:252
unsigned int u32
Definition: types.h:88
unformat_function_t unformat_mpls_gre_header
Definition: mpls.h:127

(constructor) VLIB_REGISTER_NODE (mpls_input_node)

Definition at line 258 of file node.c.

mpls_main_t mpls_main

Definition at line 107 of file mpls.h.

vlib_node_registration_t mpls_policy_encap_node
Initial value:
= {
.function = mpls_policy_encap,
.name = "mpls-policy-encap",
.vector_size = sizeof (u32),
.runtime_data_bytes = 0,
.n_next_nodes = MPLS_POLICY_ENCAP_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
u8 * format_mpls_policy_encap_trace(u8 *s, va_list *args)
Definition: policy_encap.c:27
#define foreach_mpls_policy_encap_next
Definition: policy_encap.c:41
static uword mpls_policy_encap(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: policy_encap.c:69
unsigned int u32
Definition: types.h:88
static char * mpls_policy_encap_error_strings[]
Definition: policy_encap.c:61

(constructor) VLIB_REGISTER_NODE (mpls_policy_encap_node)

Definition at line 135 of file policy_encap.c.

unformat_function_t unformat_mpls_gre_header

Definition at line 127 of file mpls.h.

unformat_function_t unformat_mpls_header

Definition at line 131 of file mpls.h.

unformat_function_t unformat_mpls_label_net_byte_order

Definition at line 126 of file mpls.h.

unformat_function_t unformat_mpls_protocol_host_byte_order

Definition at line 124 of file mpls.h.

unformat_function_t unformat_mpls_protocol_net_byte_order

Definition at line 125 of file mpls.h.

unformat_function_t unformat_pg_mpls_gre_header

Definition at line 128 of file mpls.h.

unformat_function_t unformat_pg_mpls_header

Definition at line 132 of file mpls.h.