42 sw_if_index, feature_enable, 0, 0);
48 sw_if_index, feature_enable, 0, 0);
62 u32 l2_table_index,
u32 is_add)
78 return VNET_API_ERROR_NO_SUCH_TABLE;
87 clib_warning (
"Non-existent intf_idx=%d with table_index=%d for delete",
88 sw_if_index, acl[ti]);
89 return VNET_API_ERROR_NO_SUCH_TABLE;
114 u32 sw_if_index = ~0;
115 u32 ip4_table_index = ~0;
116 u32 ip6_table_index = ~0;
117 u32 l2_table_index = ~0;
127 else if (
unformat (input,
"ip4-table %d", &ip4_table_index))
129 else if (
unformat (input,
"ip6-table %d", &ip6_table_index))
131 else if (
unformat (input,
"l2-table %d", &l2_table_index))
139 if (sw_if_index == ~0)
149 ip6_table_index, l2_table_index, is_add);
156 case VNET_API_ERROR_NO_MATCHING_INTERFACE:
159 case VNET_API_ERROR_NO_SUCH_ENTRY:
176 .path =
"set interface input acl",
178 "set interface input acl intfc <int> [ip4-table <index>]\n" 179 " [ip6-table <index>] [l2-table <index>] [del]",
202 u32 * acl_type = va_arg (*args,
u32 *);
223 int sw_if_idx = va_arg (*va,
int);
224 u32 tid = va_arg (*va,
u32);
228 s =
format (s,
"%10s%20s\t\t%s",
"Intfc idx",
"Classify table",
233 s =
format (s,
"%10d%20d\t\t%U", sw_if_idx, tid,
267 for (i = 0; i <
vec_len (vec_tbl); i++)
280 .path =
"show inacl",
281 .short_help =
"show inacl type [ip4|ip6|l2]",
vnet_config_main_t config_main
sll srl srl sll sra u16x4 i
u8 vnet_get_feature_arc_index(const char *s)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
u32 * classify_table_index_by_sw_if_index[INPUT_ACL_N_TABLES]
unformat_function_t unformat_vnet_sw_interface
format_function_t format_vnet_sw_if_index_name
vnet_classify_main_t * vnet_classify_main
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
#define clib_warning(format, args...)
#define vlib_call_init_function(vm, x)
vnet_config_main_t * vnet_config_main[INPUT_ACL_N_TABLES]
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define VLIB_CLI_COMMAND(x,...)
struct _vnet_classify_main vnet_classify_main_t
vnet_classify_main_t vnet_classify_main
#define vec_elt(v, i)
Get vector value at index i.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static vnet_feature_config_main_t * vnet_get_feature_arc_config_main(u8 arc_index)
#define clib_error_return(e, args...)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)