FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
l2_classify.h File Reference
+ Include dependency graph for l2_classify.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _l2_classify_main l2_input_classify_main_t
 
typedef struct _l2_classify_main l2_output_classify_main_t
 

Enumerations

enum  l2_input_classify_next_t {
  L2_INPUT_CLASSIFY_NEXT_DROP, L2_INPUT_CLASSIFY_NEXT_ETHERNET_INPUT, L2_INPUT_CLASSIFY_NEXT_IP4_INPUT, L2_INPUT_CLASSIFY_NEXT_IP6_INPUT,
  L2_INPUT_CLASSIFY_NEXT_LI, L2_INPUT_CLASSIFY_N_NEXT
}
 
enum  l2_input_classify_table_id_t { L2_INPUT_CLASSIFY_TABLE_IP4, L2_INPUT_CLASSIFY_TABLE_IP6, L2_INPUT_CLASSIFY_TABLE_OTHER, L2_INPUT_CLASSIFY_N_TABLES }
 
enum  l2_output_classify_next_t { L2_OUTPUT_CLASSIFY_NEXT_DROP, L2_OUTPUT_CLASSIFY_N_NEXT }
 
enum  l2_output_classify_table_id_t { L2_OUTPUT_CLASSIFY_TABLE_IP4, L2_OUTPUT_CLASSIFY_TABLE_IP6, L2_OUTPUT_CLASSIFY_TABLE_OTHER, L2_OUTPUT_CLASSIFY_N_TABLES }
 

Functions

void vnet_l2_input_classify_enable_disable (u32 sw_if_index, int enable_disable)
 Enable/disable l2 input classification on a specific interface. More...
 
int vnet_l2_input_classify_set_tables (u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
 Set l2 per-protocol, per-interface input classification tables. More...
 
void vnet_l2_output_classify_enable_disable (u32 sw_if_index, int enable_disable)
 Enable/disable l2 input classification on a specific interface. More...
 
int vnet_l2_output_classify_set_tables (u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
 Set l2 per-protocol, per-interface output classification tables. More...
 

Variables

l2_input_classify_main_t l2_input_classify_main
 l2 input classifier main data structure. More...
 
vlib_node_registration_t l2_input_classify_node
 (constructor) VLIB_REGISTER_NODE (l2_input_classify_node) More...
 
l2_output_classify_main_t l2_output_classify_main
 l2 output classifier main data structure. More...
 
vlib_node_registration_t l2_output_classify_node
 (constructor) VLIB_REGISTER_NODE (l2_output_classify_node) More...
 

Typedef Documentation

typedef struct _l2_classify_main l2_input_classify_main_t
typedef struct _l2_classify_main l2_output_classify_main_t

Definition at line 84 of file l2_classify.h.

Enumeration Type Documentation

Enumerator
L2_INPUT_CLASSIFY_NEXT_DROP 
L2_INPUT_CLASSIFY_NEXT_ETHERNET_INPUT 
L2_INPUT_CLASSIFY_NEXT_IP4_INPUT 
L2_INPUT_CLASSIFY_NEXT_IP6_INPUT 
L2_INPUT_CLASSIFY_NEXT_LI 
L2_INPUT_CLASSIFY_N_NEXT 

Definition at line 37 of file l2_classify.h.

Enumerator
L2_INPUT_CLASSIFY_TABLE_IP4 
L2_INPUT_CLASSIFY_TABLE_IP6 
L2_INPUT_CLASSIFY_TABLE_OTHER 
L2_INPUT_CLASSIFY_N_TABLES 

Definition at line 47 of file l2_classify.h.

Enumerator
L2_OUTPUT_CLASSIFY_NEXT_DROP 
L2_OUTPUT_CLASSIFY_N_NEXT 

Definition at line 55 of file l2_classify.h.

Enumerator
L2_OUTPUT_CLASSIFY_TABLE_IP4 
L2_OUTPUT_CLASSIFY_TABLE_IP6 
L2_OUTPUT_CLASSIFY_TABLE_OTHER 
L2_OUTPUT_CLASSIFY_N_TABLES 

Definition at line 61 of file l2_classify.h.

Function Documentation

void vnet_l2_input_classify_enable_disable ( u32  sw_if_index,
int  enable_disable 
)

Enable/disable l2 input classification on a specific interface.

Definition at line 518 of file l2_input_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_l2_input_classify_set_tables ( u32  sw_if_index,
u32  ip4_table_index,
u32  ip6_table_index,
u32  other_table_index 
)

Set l2 per-protocol, per-interface input classification tables.

Parameters
sw_if_indexinterface handle
ip4_table_indexip4 classification table index, or ~0
ip6_table_indexip6 classification table index, or ~0
other_table_indexnon-ip4, non-ip6 classification table index, or ~0
Returns
0 on success, VNET_API_ERROR_NO_SUCH_TABLE, TABLE2, TABLE3 if the indicated (non-~0) table does not exist.

Definition at line 536 of file l2_input_classify.c.

+ Here is the caller graph for this function:

void vnet_l2_output_classify_enable_disable ( u32  sw_if_index,
int  enable_disable 
)

Enable/disable l2 input classification on a specific interface.

Definition at line 507 of file l2_output_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_l2_output_classify_set_tables ( u32  sw_if_index,
u32  ip4_table_index,
u32  ip6_table_index,
u32  other_table_index 
)

Set l2 per-protocol, per-interface output classification tables.

Parameters
sw_if_indexinterface handle
ip4_table_indexip4 classification table index, or ~0
ip6_table_indexip6 classification table index, or ~0
other_table_indexnon-ip4, non-ip6 classification table index, or ~0
Returns
0 on success, VNET_API_ERROR_NO_SUCH_TABLE, TABLE2, TABLE3 if the indicated (non-~0) table does not exist.

Definition at line 526 of file l2_output_classify.c.

+ Here is the caller graph for this function:

Variable Documentation

l2_input_classify_main_t l2_input_classify_main

l2 input classifier main data structure.

Definition at line 71 of file l2_input_classify.c.

vlib_node_registration_t l2_input_classify_node
Initial value:
= {
.name = "l2-input-classify",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof (l2_input_classify_runtime_t),
.n_next_nodes = L2_INPUT_CLASSIFY_N_NEXT,
.next_nodes = {
[L2_INPUT_CLASSIFY_NEXT_DROP] = "error-drop",
[L2_INPUT_CLASSIFY_NEXT_ETHERNET_INPUT] = "ethernet-input-not-l2",
},
}
static u8 * format_l2_input_classify_trace(u8 *s, va_list *args)
Packet trace format function.
static uword l2_input_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
l2 input classifier node.
static char * l2_input_classify_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (l2_input_classify_node)

Definition at line 445 of file l2_input_classify.c.

l2_output_classify_main_t l2_output_classify_main

l2 output classifier main data structure.

Definition at line 63 of file l2_output_classify.c.

vlib_node_registration_t l2_output_classify_node
Initial value:
= {
.name = "l2-output-classify",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof (l2_output_classify_runtime_t),
.n_next_nodes = L2_OUTPUT_CLASSIFY_N_NEXT,
.next_nodes = {
[L2_OUTPUT_CLASSIFY_NEXT_DROP] = "error-drop",
},
}
static uword l2_output_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
l2 output classifier node.
static char * l2_output_classify_error_strings[]
static u8 * format_l2_output_classify_trace(u8 *s, va_list *args)
Packet trace format function.
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (l2_output_classify_node)

Definition at line 438 of file l2_output_classify.c.