55 ci = ((feature_enable)
72 u32 l2_table_index,
u32 is_add)
88 return VNET_API_ERROR_NO_SUCH_TABLE;
97 clib_warning (
"Non-existent intf_idx=%d with table_index=%d for delete",
98 sw_if_index, acl[ti]);
99 return VNET_API_ERROR_NO_SUCH_TABLE;
124 u32 sw_if_index = ~0;
125 u32 ip4_table_index = ~0;
126 u32 ip6_table_index = ~0;
127 u32 l2_table_index = ~0;
137 else if (
unformat (input,
"ip4-table %d", &ip4_table_index))
139 else if (
unformat (input,
"ip6-table %d", &ip6_table_index))
141 else if (
unformat (input,
"l2-table %d", &l2_table_index))
149 if (sw_if_index == ~0)
159 ip6_table_index, l2_table_index, is_add);
166 case VNET_API_ERROR_NO_MATCHING_INTERFACE:
169 case VNET_API_ERROR_NO_SUCH_ENTRY:
186 .path =
"set interface input acl",
188 "set interface input acl intfc <int> [ip4-table <index>]\n" 189 " [ip6-table <index>] [l2-table <index>] [del]",
212 u32 * acl_type = va_arg (*args,
u32 *);
233 int sw_if_idx = va_arg (*va,
int);
234 u32 tid = va_arg (*va,
u32);
238 s =
format (s,
"%10s%20s\t\t%s",
"Intfc idx",
"Classify table",
243 s =
format (s,
"%10d%20d\t\t%U", sw_if_idx, tid,
277 for (i = 0; i <
vec_len (vec_tbl); i++)
290 .path =
"show inacl",
291 .short_help =
"show inacl type [ip4|ip6|l2]",
sll srl srl sll sra u16x4 i
u32 * config_index_by_sw_if_index
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
u32 * classify_table_index_by_sw_if_index[INPUT_ACL_N_TABLES]
u32 vnet_config_del_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
ip_config_main_t rx_config_mains[VNET_N_CAST]
rx/tx interface/feature configuration.
ip_lookup_main_t lookup_main
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)
u32 ip6_unicast_rx_feature_check_access
#define clib_warning(format, args...)
#define vlib_call_init_function(vm, x)
u32 ip4_unicast_rx_feature_check_access
Built-in unicast feature path indice, see ip_feature_init_cast()
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.
struct _vnet_classify_main vnet_classify_main_t
ip_lookup_main_t lookup_main
u32 vnet_config_add_feature(vlib_main_t *vm, vnet_config_main_t *cm, u32 config_string_heap_index, u32 feature_index, void *feature_config, u32 n_feature_config_bytes)
vnet_classify_main_t vnet_classify_main
#define vec_elt(v, i)
Get vector value at index i.
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip4_main_t ip4_main
Global ip4 main structure.
#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)
vnet_config_main_t config_main