15 #ifndef included_vnet_mpls_h 16 #define included_vnet_mpls_h 27 #define mpls_error(n,s) MPLS_ERROR_##n, 33 #define MPLS_FIB_DEFAULT_TABLE_ID 0 38 #define MPLS_FIB_KEY_SIZE 21 39 #define MPLS_FIB_DB_SIZE (1 << (MPLS_FIB_KEY_SIZE-1)) 121 #define foreach_mpls_input_next \ 122 _(DROP, "error-drop") \ 123 _(LOOKUP, "mpls-lookup") 126 #define _(s,n) MPLS_INPUT_NEXT_##s, 132 #define foreach_mpls_lookup_next \ 133 _(DROP, "error-drop") \ 134 _(IP4_INPUT, "ip4-input") \ 135 _(L2_OUTPUT, "l2-output") 139 #define _(s,n) MPLS_LOOKUP_NEXT_##s, 145 #define foreach_mpls_output_next \ 146 _(DROP, "error-drop") 149 #define _(s,n) MPLS_OUTPUT_NEXT_##s, struct mpls_fib_t_ mpls_fib_t
format_function_t format_mpls_header
#define foreach_mpls_lookup_next
u8 input_feature_arc_index
int mpls_label_cmp(void *a1, void *a2)
void mpls_sw_interface_enable_disable(mpls_main_t *mm, u32 sw_if_index, u8 is_enable)
u32 * fib_index_by_sw_if_index
format_function_t format_mpls_protocol
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
struct _vlib_node_registration vlib_node_registration_t
#define foreach_mpls_input_next
unformat_function_t unformat_mpls_unicast_label
u8 * mpls_enabled_by_sw_if_index
format_function_t format_mpls_unicast_header_net_byte_order
void(* mpls_interface_state_change_callback_t)(u32 sw_if_index, u32 is_enable)
Definition of a callback for receiving MPLS interface state change notifications. ...
vlib_node_registration_t mpls_midchain_node
(constructor) VLIB_REGISTER_NODE (mpls_midchain_node)
u8 output_feature_arc_index
format_function_t format_mpls_eos_bit
vlib_node_registration_t mpls_policy_encap_node
int mpls_fib_reset_labels(u32 fib_id)
vlib_node_registration_t mpls_input_node
(constructor) VLIB_REGISTER_NODE (mpls_input_node)
struct fib_table_t_ * fibs
A pool of all the MPLS FIBs.
int mpls_fib_index_cmp(void *a1, void *a2)
unformat_function_t unformat_mpls_protocol_net_byte_order
unformat_function_t unformat_mpls_header
unformat_function_t unformat_mpls_protocol_host_byte_order
unformat_function_t unformat_pg_mpls_header
clib_error_t * mpls_feature_init(vlib_main_t *vm)
#define foreach_mpls_output_next
uword * mf_entries
A hash table of entries.
u8 mpls_sw_interface_is_enabled(u32 sw_if_index)
format_function_t format_mpls_unicast_label
unformat_function_t unformat_mpls_label_net_byte_order
format_function_t format_mpls_encap_index
index_t mf_lbs[MPLS_FIB_DB_SIZE]
The load-balance indeices keyed by 21 bit label+eos bit.
uword * fib_index_by_table_id
A hash table to lookup the mpls_fib by table ID.
vlib_node_registration_t mpls_output_node
(constructor) VLIB_REGISTER_NODE (mpls_output_node)
int mpls_dest_cmp(void *a1, void *a2)
A protocol Independent FIB table.