FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
acl.c File Reference
+ Include dependency graph for acl.c:

Go to the source code of this file.

Data Structures

struct  macip_match_type_t
 

Macros

#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define REPLY_MSG_ID_BASE   am->msg_id_base
 
#define vec_validate_acl_rules(v, idx)
 

Typedefs

typedef void(* acl_vector_print_func_t) (vlib_main_t *vm, u8 *out0)
 

Functions

 VLIB_PLUGIN_REGISTER ()
 
u8format_vec16 (u8 *s, va_list *va)
 
static void vl_api_acl_plugin_get_version_t_handler (vl_api_acl_plugin_get_version_t *mp)
 
static void vl_api_acl_plugin_control_ping_t_handler (vl_api_acl_plugin_control_ping_t *mp)
 
static void print_clib_warning_and_reset (vlib_main_t *vm, u8 *out0)
 
static void print_cli_and_reset (vlib_main_t *vm, u8 *out0)
 
static u8format_acl_action (u8 *s, u8 action)
 
static void acl_print_acl_x (acl_vector_print_func_t vpr, vlib_main_t *vm, acl_main_t *am, int acl_index)
 
static void vl_api_acl_plugin_get_conn_table_max_entries_t_handler (vl_api_acl_plugin_get_conn_table_max_entries_t *mp)
 
static void acl_print_acl (vlib_main_t *vm, acl_main_t *am, int acl_index)
 
static void warning_acl_print_acl (vlib_main_t *vm, acl_main_t *am, int acl_index)
 
static void increment_policy_epoch (acl_main_t *am, u32 sw_if_index, int is_input)
 
static void try_increment_acl_policy_epoch (acl_main_t *am, u32 acl_num, int is_input)
 
static void policy_notify_acl_change (acl_main_t *am, u32 acl_num)
 
static void validate_and_reset_acl_counters (acl_main_t *am, u32 acl_index)
 
static int acl_api_invalid_prefix (const vl_api_prefix_t *prefix)
 
static int acl_add_list (u32 count, vl_api_acl_rule_t rules[], u32 *acl_list_index, u8 *tag)
 
static int acl_is_used_by (u32 acl_index, u32 **foo_index_vec_by_acl)
 
static int acl_del_list (u32 acl_list_index)
 
static int count_skip (u8 *p, u32 size)
 
static int acl_classify_add_del_table_small (vnet_classify_main_t *cm, u8 *mask, u32 mask_len, u32 next_table_index, u32 miss_next_index, u32 *table_index, int is_add)
 
static int intf_has_etype_whitelist (acl_main_t *am, u32 sw_if_index, int is_input)
 
static void acl_clear_sessions (acl_main_t *am, u32 sw_if_index)
 
static int acl_interface_in_enable_disable (acl_main_t *am, u32 sw_if_index, int enable_disable)
 
static int acl_interface_out_enable_disable (acl_main_t *am, u32 sw_if_index, int enable_disable)
 
static int acl_stats_intf_counters_enable_disable (acl_main_t *am, int enable_disable)
 
static int acl_interface_inout_enable_disable (acl_main_t *am, u32 sw_if_index, int is_input, int enable_disable)
 
static int acl_is_not_defined (acl_main_t *am, u32 acl_list_index)
 
static int acl_interface_set_inout_acl_list (acl_main_t *am, u32 sw_if_index, u8 is_input, u32 *vec_acl_list_index, int *may_clear_sessions)
 
static void acl_interface_reset_inout_acls (u32 sw_if_index, u8 is_input, int *may_clear_sessions)
 
static int acl_interface_add_del_inout_acl (u32 sw_if_index, u8 is_add, u8 is_input, u32 acl_list_index)
 
static int acl_set_etype_whitelists (acl_main_t *am, u32 sw_if_index, u16 *vec_in, u16 *vec_out)
 
static u32 macip_find_match_type (macip_match_type_t *mv, u8 *mac_mask, u8 prefix_len, u8 is_ipv6)
 
static int match_type_metric (macip_match_type_t *m)
 
static int match_type_compare (macip_match_type_t *m1, macip_match_type_t *m2)
 
static int get_l3_src_offset (int is6)
 
static int get_l3_dst_offset (int is6)
 
static int macip_permit_also_egress (u8 is_permit)
 
static int macip_create_classify_tables (acl_main_t *am, u32 macip_acl_index)
 
static void macip_destroy_classify_tables (acl_main_t *am, u32 macip_acl_index)
 
static int macip_maybe_apply_unapply_classifier_tables (acl_main_t *am, u32 acl_index, int is_apply)
 
static int macip_acl_add_list (u32 count, vl_api_macip_acl_rule_t rules[], u32 *acl_list_index, u8 *tag)
 
static int macip_acl_interface_del_acl (acl_main_t *am, u32 sw_if_index)
 
static int macip_acl_interface_add_acl (acl_main_t *am, u32 sw_if_index, u32 macip_acl_index)
 
static int macip_acl_del_list (u32 acl_list_index)
 
static int macip_acl_interface_add_del_acl (u32 sw_if_index, u8 is_add, u32 acl_list_index)
 
static int verify_message_len (void *mp, u64 expected_len, char *where)
 
static void vl_api_acl_add_replace_t_handler (vl_api_acl_add_replace_t *mp)
 
static void vl_api_acl_del_t_handler (vl_api_acl_del_t *mp)
 
static void vl_api_acl_stats_intf_counters_enable_t_handler (vl_api_acl_stats_intf_counters_enable_t *mp)
 
static void vl_api_acl_interface_add_del_t_handler (vl_api_acl_interface_add_del_t *mp)
 
static void vl_api_acl_interface_set_acl_list_t_handler (vl_api_acl_interface_set_acl_list_t *mp)
 
static void copy_acl_rule_to_api_rule (vl_api_acl_rule_t *api_rule, acl_rule_t *r)
 
static void send_acl_details (acl_main_t *am, vl_api_registration_t *reg, acl_list_t *acl, u32 context)
 
static void vl_api_acl_dump_t_handler (vl_api_acl_dump_t *mp)
 
static void send_acl_interface_list_details (acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 context)
 
static void vl_api_acl_interface_list_dump_t_handler (vl_api_acl_interface_list_dump_t *mp)
 
static void vl_api_macip_acl_add_t_handler (vl_api_macip_acl_add_t *mp)
 
static void vl_api_macip_acl_add_replace_t_handler (vl_api_macip_acl_add_replace_t *mp)
 
static void vl_api_macip_acl_del_t_handler (vl_api_macip_acl_del_t *mp)
 
static void vl_api_macip_acl_interface_add_del_t_handler (vl_api_macip_acl_interface_add_del_t *mp)
 
static void send_macip_acl_details (acl_main_t *am, vl_api_registration_t *reg, macip_acl_list_t *acl, u32 context)
 
static void vl_api_macip_acl_dump_t_handler (vl_api_macip_acl_dump_t *mp)
 
static void vl_api_macip_acl_interface_get_t_handler (vl_api_macip_acl_interface_get_t *mp)
 
static void send_macip_acl_interface_list_details (acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 acl_index, u32 context)
 
static void vl_api_macip_acl_interface_list_dump_t_handler (vl_api_macip_acl_interface_list_dump_t *mp)
 
static void vl_api_acl_interface_set_etype_whitelist_t_handler (vl_api_acl_interface_set_etype_whitelist_t *mp)
 
static void send_acl_interface_etype_whitelist_details (acl_main_t *am, vl_api_registration_t *reg, u32 sw_if_index, u32 context)
 
static void vl_api_acl_interface_etype_whitelist_dump_t_handler (vl_api_acl_interface_list_dump_t *mp)
 
static void acl_set_timeout_sec (int timeout_type, u32 value)
 
static void acl_set_session_max_entries (u32 value)
 
static int acl_set_skip_ipv6_eh (u32 eh, u32 value)
 
static clib_error_tacl_sw_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (acl_sw_interface_add_del)
 
static clib_error_tacl_set_aclplugin_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8my_format_mac_address (u8 *s, va_list *args)
 
static u8my_macip_acl_rule_t_pretty_format (u8 *out, va_list *args)
 
static void macip_acl_print (acl_main_t *am, u32 macip_acl_index)
 
static clib_error_tacl_set_aclplugin_interface_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_set_aclplugin_acl_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_macip_acl_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_macip_interface_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void acl_plugin_show_acl (acl_main_t *am, u32 acl_index)
 
static clib_error_tacl_show_aclplugin_acl_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_lookup_context_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_lookup_user_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void acl_plugin_show_interface (acl_main_t *am, u32 sw_if_index, int show_acl, int detail)
 
static clib_error_tacl_show_aclplugin_decode_5tuple_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_interface_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_memory_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void acl_plugin_show_sessions (acl_main_t *am, u32 show_session_thread_id, u32 show_session_session_index)
 
static clib_error_tacl_show_aclplugin_sessions_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_show_aclplugin_tables_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_clear_aclplugin_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tacl_plugin_config (vlib_main_t *vm, unformat_input_t *input)
 
static clib_error_tacl_init (vlib_main_t *vm)
 

Variables

acl_main_t acl_main
 
static acl_plugin_methods_t acl_plugin
 
static vlib_cli_command_t aclplugin_set_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_set_command) More...
 
static vlib_cli_command_t aclplugin_show_acl_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_acl_command) More...
 
static vlib_cli_command_t aclplugin_show_lookup_context_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_lookup_context_command) More...
 
static vlib_cli_command_t aclplugin_show_lookup_user_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_lookup_user_command) More...
 
static vlib_cli_command_t aclplugin_show_decode_5tuple_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_decode_5tuple_command) More...
 
static vlib_cli_command_t aclplugin_show_interface_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_interface_command) More...
 
static vlib_cli_command_t aclplugin_show_memory_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_memory_command) More...
 
static vlib_cli_command_t aclplugin_show_sessions_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_sessions_command) More...
 
static vlib_cli_command_t aclplugin_show_tables_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_tables_command) More...
 
static vlib_cli_command_t aclplugin_show_macip_acl_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_acl_command) More...
 
static vlib_cli_command_t aclplugin_show_macip_interface_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_interface_command) More...
 
static vlib_cli_command_t aclplugin_clear_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_clear_command) More...
 
static vlib_cli_command_t aclplugin_set_interface_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_set_interface_command) More...
 
static vlib_cli_command_t aclplugin_set_acl_command
 (constructor) VLIB_CLI_COMMAND (aclplugin_set_acl_command) More...
 

Macro Definition Documentation

◆ REPLY_MSG_ID_BASE

#define REPLY_MSG_ID_BASE   am->msg_id_base

Definition at line 46 of file acl.c.

◆ vec_validate_acl_rules

#define vec_validate_acl_rules (   v,
  idx 
)
Value:
do { \
if (vec_len(v) < idx+1) { \
vec_validate(v, idx); \
v[idx].is_permit = 0x1; \
v[idx].srcport_or_icmptype_last = 0xffff; \
v[idx].dstport_or_icmpcode_last = 0xffff; \
} \
} while (0)

Definition at line 2816 of file acl.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 39 of file acl.c.

Typedef Documentation

◆ acl_vector_print_func_t

typedef void(* acl_vector_print_func_t) (vlib_main_t *vm, u8 *out0)

Definition at line 135 of file acl.c.

Function Documentation

◆ acl_add_list()

static int acl_add_list ( u32  count,
vl_api_acl_rule_t  rules[],
u32 acl_list_index,
u8 tag 
)
static

Definition at line 317 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_api_invalid_prefix()

static int acl_api_invalid_prefix ( const vl_api_prefix_t *  prefix)
static

Definition at line 310 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_classify_add_del_table_small()

static int acl_classify_add_del_table_small ( vnet_classify_main_t cm,
u8 mask,
u32  mask_len,
u32  next_table_index,
u32  miss_next_index,
u32 table_index,
int  is_add 
)
static

Definition at line 478 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_clear_aclplugin_fn()

static clib_error_t* acl_clear_aclplugin_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3459 of file acl.c.

+ Here is the call graph for this function:

◆ acl_clear_sessions()

static void acl_clear_sessions ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 514 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_del_list()

static int acl_del_list ( u32  acl_list_index)
static

Definition at line 436 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_init()

static clib_error_t* acl_init ( vlib_main_t vm)
static

Definition at line 3655 of file acl.c.

+ Here is the call graph for this function:

◆ acl_interface_add_del_inout_acl()

static int acl_interface_add_del_inout_acl ( u32  sw_if_index,
u8  is_add,
u8  is_input,
u32  acl_list_index 
)
static

Definition at line 771 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_interface_in_enable_disable()

static int acl_interface_in_enable_disable ( acl_main_t am,
u32  sw_if_index,
int  enable_disable 
)
static

Definition at line 523 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_interface_inout_enable_disable()

static int acl_interface_inout_enable_disable ( acl_main_t am,
u32  sw_if_index,
int  is_input,
int  enable_disable 
)
static

Definition at line 606 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_interface_out_enable_disable()

static int acl_interface_out_enable_disable ( acl_main_t am,
u32  sw_if_index,
int  enable_disable 
)
static

Definition at line 559 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_interface_reset_inout_acls()

static void acl_interface_reset_inout_acls ( u32  sw_if_index,
u8  is_input,
int *  may_clear_sessions 
)
static

Definition at line 762 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_interface_set_inout_acl_list()

static int acl_interface_set_inout_acl_list ( acl_main_t am,
u32  sw_if_index,
u8  is_input,
u32 vec_acl_list_index,
int *  may_clear_sessions 
)
static

Definition at line 622 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_is_not_defined()

static int acl_is_not_defined ( acl_main_t am,
u32  acl_list_index 
)
static

Definition at line 616 of file acl.c.

+ Here is the caller graph for this function:

◆ acl_is_used_by()

static int acl_is_used_by ( u32  acl_index,
u32 **  foo_index_vec_by_acl 
)
static

Definition at line 422 of file acl.c.

+ Here is the caller graph for this function:

◆ acl_plugin_config()

static clib_error_t* acl_plugin_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 3581 of file acl.c.

+ Here is the call graph for this function:

◆ acl_plugin_show_acl()

static void acl_plugin_show_acl ( acl_main_t am,
u32  acl_index 
)
static

Definition at line 3017 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_plugin_show_interface()

static void acl_plugin_show_interface ( acl_main_t am,
u32  sw_if_index,
int  show_acl,
int  detail 
)
static

Definition at line 3099 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_plugin_show_sessions()

static void acl_plugin_show_sessions ( acl_main_t am,
u32  show_session_thread_id,
u32  show_session_session_index 
)
static

Definition at line 3229 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_print_acl()

static void acl_print_acl ( vlib_main_t vm,
acl_main_t am,
int  acl_index 
)
static

Definition at line 226 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_print_acl_x()

static void acl_print_acl_x ( acl_vector_print_func_t  vpr,
vlib_main_t vm,
acl_main_t am,
int  acl_index 
)
static

Definition at line 158 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_set_aclplugin_acl_fn()

static clib_error_t* acl_set_aclplugin_acl_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2827 of file acl.c.

+ Here is the call graph for this function:

◆ acl_set_aclplugin_fn()

static clib_error_t* acl_set_aclplugin_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2518 of file acl.c.

+ Here is the call graph for this function:

◆ acl_set_aclplugin_interface_fn()

static clib_error_t* acl_set_aclplugin_interface_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2772 of file acl.c.

+ Here is the call graph for this function:

◆ acl_set_etype_whitelists()

static int acl_set_etype_whitelists ( acl_main_t am,
u32  sw_if_index,
u16 vec_in,
u16 vec_out 
)
static

Definition at line 830 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_set_session_max_entries()

static void acl_set_session_max_entries ( u32  value)
static

Definition at line 2473 of file acl.c.

+ Here is the caller graph for this function:

◆ acl_set_skip_ipv6_eh()

static int acl_set_skip_ipv6_eh ( u32  eh,
u32  value 
)
static

Definition at line 2480 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ acl_set_timeout_sec()

static void acl_set_timeout_sec ( int  timeout_type,
u32  value 
)
static

Definition at line 2454 of file acl.c.

+ Here is the caller graph for this function:

◆ acl_show_aclplugin_acl_fn()

static clib_error_t* acl_show_aclplugin_acl_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3056 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_decode_5tuple_fn()

static clib_error_t* acl_show_aclplugin_decode_5tuple_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3183 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_interface_fn()

static clib_error_t* acl_show_aclplugin_interface_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3202 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_lookup_context_fn()

static clib_error_t* acl_show_aclplugin_lookup_context_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3070 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_lookup_user_fn()

static clib_error_t* acl_show_aclplugin_lookup_user_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3084 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_macip_acl_fn()

static clib_error_t* acl_show_aclplugin_macip_acl_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2965 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_macip_interface_fn()

static clib_error_t* acl_show_aclplugin_macip_interface_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3001 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_memory_fn()

static clib_error_t* acl_show_aclplugin_memory_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3219 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_sessions_fn()

static clib_error_t* acl_show_aclplugin_sessions_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3377 of file acl.c.

+ Here is the call graph for this function:

◆ acl_show_aclplugin_tables_fn()

static clib_error_t* acl_show_aclplugin_tables_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 3398 of file acl.c.

+ Here is the call graph for this function:

◆ acl_stats_intf_counters_enable_disable()

static int acl_stats_intf_counters_enable_disable ( acl_main_t am,
int  enable_disable 
)
static

Definition at line 596 of file acl.c.

+ Here is the caller graph for this function:

◆ acl_sw_interface_add_del()

static clib_error_t* acl_sw_interface_add_del ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 2496 of file acl.c.

+ Here is the call graph for this function:

◆ copy_acl_rule_to_api_rule()

static void copy_acl_rule_to_api_rule ( vl_api_acl_rule_t *  api_rule,
acl_rule_t r 
)
static

Definition at line 1914 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ count_skip()

static int count_skip ( u8 p,
u32  size 
)
static

Definition at line 463 of file acl.c.

+ Here is the caller graph for this function:

◆ format_acl_action()

static u8* format_acl_action ( u8 s,
u8  action 
)
inlinestatic

Definition at line 138 of file acl.c.

+ Here is the caller graph for this function:

◆ format_vec16()

u8* format_vec16 ( u8 s,
va_list *  va 
)

Definition at line 68 of file acl.c.

+ Here is the caller graph for this function:

◆ get_l3_dst_offset()

static int get_l3_dst_offset ( int  is6)
static

Definition at line 952 of file acl.c.

+ Here is the caller graph for this function:

◆ get_l3_src_offset()

static int get_l3_src_offset ( int  is6)
static

Definition at line 941 of file acl.c.

+ Here is the caller graph for this function:

◆ increment_policy_epoch()

static void increment_policy_epoch ( acl_main_t am,
u32  sw_if_index,
int  is_input 
)
static

Definition at line 238 of file acl.c.

+ Here is the caller graph for this function:

◆ intf_has_etype_whitelist()

static int intf_has_etype_whitelist ( acl_main_t am,
u32  sw_if_index,
int  is_input 
)
static

Definition at line 504 of file acl.c.

+ Here is the caller graph for this function:

◆ macip_acl_add_list()

static int macip_acl_add_list ( u32  count,
vl_api_macip_acl_rule_t  rules[],
u32 acl_list_index,
u8 tag 
)
static

Definition at line 1550 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_acl_del_list()

static int macip_acl_del_list ( u32  acl_list_index)
static

Definition at line 1708 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_acl_interface_add_acl()

static int macip_acl_interface_add_acl ( acl_main_t am,
u32  sw_if_index,
u32  macip_acl_index 
)
static

Definition at line 1678 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_acl_interface_add_del_acl()

static int macip_acl_interface_add_del_acl ( u32  sw_if_index,
u8  is_add,
u32  acl_list_index 
)
static

Definition at line 1742 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_acl_interface_del_acl()

static int macip_acl_interface_del_acl ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 1641 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_acl_print()

static void macip_acl_print ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 2741 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_create_classify_tables()

static int macip_create_classify_tables ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 975 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_destroy_classify_tables()

static void macip_destroy_classify_tables ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 1479 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_find_match_type()

static u32 macip_find_match_type ( macip_match_type_t mv,
u8 mac_mask,
u8  prefix_len,
u8  is_ipv6 
)
static

Definition at line 890 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_maybe_apply_unapply_classifier_tables()

static int macip_maybe_apply_unapply_classifier_tables ( acl_main_t am,
u32  acl_index,
int  is_apply 
)
static

Definition at line 1523 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ macip_permit_also_egress()

static int macip_permit_also_egress ( u8  is_permit)
static

Definition at line 969 of file acl.c.

+ Here is the caller graph for this function:

◆ match_type_compare()

static int match_type_compare ( macip_match_type_t m1,
macip_match_type_t m2 
)
static

Definition at line 933 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ match_type_metric()

static int match_type_metric ( macip_match_type_t m)
static

Definition at line 912 of file acl.c.

+ Here is the caller graph for this function:

◆ my_format_mac_address()

static u8* my_format_mac_address ( u8 s,
va_list *  args 
)
static

Definition at line 2718 of file acl.c.

+ Here is the caller graph for this function:

◆ my_macip_acl_rule_t_pretty_format()

static u8* my_macip_acl_rule_t_pretty_format ( u8 out,
va_list *  args 
)
inlinestatic

Definition at line 2726 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ policy_notify_acl_change()

static void policy_notify_acl_change ( acl_main_t am,
u32  acl_num 
)
static

Definition at line 269 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_cli_and_reset()

static void print_cli_and_reset ( vlib_main_t vm,
u8 out0 
)
static

Definition at line 129 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_clib_warning_and_reset()

static void print_clib_warning_and_reset ( vlib_main_t vm,
u8 out0 
)
static

Definition at line 122 of file acl.c.

+ Here is the caller graph for this function:

◆ send_acl_details()

static void send_acl_details ( acl_main_t am,
vl_api_registration_t reg,
acl_list_t acl,
u32  context 
)
static

Definition at line 1933 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_acl_interface_etype_whitelist_details()

static void send_acl_interface_etype_whitelist_details ( acl_main_t am,
vl_api_registration_t reg,
u32  sw_if_index,
u32  context 
)
static

Definition at line 2366 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_acl_interface_list_details()

static void send_acl_interface_list_details ( acl_main_t am,
vl_api_registration_t reg,
u32  sw_if_index,
u32  context 
)
static

Definition at line 2003 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_macip_acl_details()

static void send_macip_acl_details ( acl_main_t am,
vl_api_registration_t reg,
macip_acl_list_t acl,
u32  context 
)
static

Definition at line 2167 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_macip_acl_interface_list_details()

static void send_macip_acl_interface_list_details ( acl_main_t am,
vl_api_registration_t reg,
u32  sw_if_index,
u32  acl_index,
u32  context 
)
static

Definition at line 2276 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ try_increment_acl_policy_epoch()

static void try_increment_acl_policy_epoch ( acl_main_t am,
u32  acl_num,
int  is_input 
)
static

Definition at line 253 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate_and_reset_acl_counters()

static void validate_and_reset_acl_counters ( acl_main_t am,
u32  acl_index 
)
static

Definition at line 277 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verify_message_len()

static int verify_message_len ( void *  mp,
u64  expected_len,
char *  where 
)
static

Definition at line 1775 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vl_api_acl_add_replace_t_handler()

static void vl_api_acl_add_replace_t_handler ( vl_api_acl_add_replace_t mp)
static

Definition at line 1792 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_del_t_handler()

static void vl_api_acl_del_t_handler ( vl_api_acl_del_t mp)
static

Definition at line 1819 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_dump_t_handler()

static void vl_api_acl_dump_t_handler ( vl_api_acl_dump_t mp)
static

Definition at line 1963 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_interface_add_del_t_handler()

static void vl_api_acl_interface_add_del_t_handler ( vl_api_acl_interface_add_del_t mp)
static

Definition at line 1846 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_interface_etype_whitelist_dump_t_handler()

static void vl_api_acl_interface_etype_whitelist_dump_t_handler ( vl_api_acl_interface_list_dump_t mp)
static

Definition at line 2422 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_interface_list_dump_t_handler()

static void vl_api_acl_interface_list_dump_t_handler ( vl_api_acl_interface_list_dump_t mp)
static

Definition at line 2047 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_interface_set_acl_list_t_handler()

static void vl_api_acl_interface_set_acl_list_t_handler ( vl_api_acl_interface_set_acl_list_t mp)
static

Definition at line 1866 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_interface_set_etype_whitelist_t_handler()

static void vl_api_acl_interface_set_etype_whitelist_t_handler ( vl_api_acl_interface_set_etype_whitelist_t mp)
static

Definition at line 2338 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_plugin_control_ping_t_handler()

static void vl_api_acl_plugin_control_ping_t_handler ( vl_api_acl_plugin_control_ping_t mp)
static

Definition at line 106 of file acl.c.

◆ vl_api_acl_plugin_get_conn_table_max_entries_t_handler()

static void vl_api_acl_plugin_get_conn_table_max_entries_t_handler ( vl_api_acl_plugin_get_conn_table_max_entries_t mp)
static

Definition at line 202 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_plugin_get_version_t_handler()

static void vl_api_acl_plugin_get_version_t_handler ( vl_api_acl_plugin_get_version_t mp)
static

Definition at line 83 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_acl_stats_intf_counters_enable_t_handler()

static void vl_api_acl_stats_intf_counters_enable_t_handler ( vl_api_acl_stats_intf_counters_enable_t mp)
static

Definition at line 1833 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_add_replace_t_handler()

static void vl_api_macip_acl_add_replace_t_handler ( vl_api_macip_acl_add_replace_t mp)
static

Definition at line 2108 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_add_t_handler()

static void vl_api_macip_acl_add_t_handler ( vl_api_macip_acl_add_t mp)
static

Definition at line 2081 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_del_t_handler()

static void vl_api_macip_acl_del_t_handler ( vl_api_macip_acl_del_t mp)
static

Definition at line 2135 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_dump_t_handler()

static void vl_api_macip_acl_dump_t_handler ( vl_api_macip_acl_dump_t mp)
static

Definition at line 2214 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_interface_add_del_t_handler()

static void vl_api_macip_acl_interface_add_del_t_handler ( vl_api_macip_acl_interface_add_del_t mp)
static

Definition at line 2148 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_interface_get_t_handler()

static void vl_api_macip_acl_interface_get_t_handler ( vl_api_macip_acl_interface_get_t mp)
static

Definition at line 2247 of file acl.c.

+ Here is the call graph for this function:

◆ vl_api_macip_acl_interface_list_dump_t_handler()

static void vl_api_macip_acl_interface_list_dump_t_handler ( vl_api_macip_acl_interface_list_dump_t mp)
static

Definition at line 2301 of file acl.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION()

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( acl_sw_interface_add_del  )

◆ warning_acl_print_acl()

static void warning_acl_print_acl ( vlib_main_t vm,
acl_main_t am,
int  acl_index 
)
static

Definition at line 232 of file acl.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ acl_main

acl_main_t acl_main

Definition at line 44 of file acl.c.

◆ acl_plugin

acl_plugin_methods_t acl_plugin
static

Definition at line 64 of file acl.c.

◆ aclplugin_clear_command

vlib_cli_command_t aclplugin_clear_command
static
Initial value:
= {
.path = "clear acl-plugin sessions",
.short_help = "clear acl-plugin sessions",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_clear_command)

Definition at line 3536 of file acl.c.

◆ aclplugin_set_acl_command

vlib_cli_command_t aclplugin_set_acl_command
static
Initial value:
= {
.path = "set acl-plugin acl",
.short_help = "set acl-plugin acl <permit|deny> src <PREFIX> dst <PREFIX> proto X sport X-Y dport X-Y [tag FOO] {use comma separated list for multiple rules}",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_set_acl_command)

Definition at line 3573 of file acl.c.

◆ aclplugin_set_command

vlib_cli_command_t aclplugin_set_command
static
Initial value:
= {
.path = "set acl-plugin",
.short_help = "set acl-plugin session timeout {{udp idle}|tcp {idle|transient}} <seconds>",
.function = acl_set_aclplugin_fn,
}

(constructor) VLIB_CLI_COMMAND (aclplugin_set_command)

Definition at line 3470 of file acl.c.

◆ aclplugin_set_interface_command

vlib_cli_command_t aclplugin_set_interface_command
static
Initial value:
= {
.path = "set acl-plugin interface",
.short_help = "set acl-plugin interface <interface> <input|output> <acl INDEX> [del] ",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_set_interface_command)

Definition at line 3551 of file acl.c.

◆ aclplugin_show_acl_command

vlib_cli_command_t aclplugin_show_acl_command
static
Initial value:
= {
.path = "show acl-plugin acl",
.short_help = "show acl-plugin acl [index N]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_acl_command)

Definition at line 3476 of file acl.c.

◆ aclplugin_show_decode_5tuple_command

vlib_cli_command_t aclplugin_show_decode_5tuple_command
static
Initial value:
= {
.path = "show acl-plugin decode 5tuple",
.short_help = "show acl-plugin decode 5tuple XXXX XXXX XXXX XXXX XXXX XXXX",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_decode_5tuple_command)

Definition at line 3494 of file acl.c.

◆ aclplugin_show_interface_command

vlib_cli_command_t aclplugin_show_interface_command
static
Initial value:
= {
.path = "show acl-plugin interface",
.short_help = "show acl-plugin interface [sw_if_index N] [acl]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_interface_command)

Definition at line 3500 of file acl.c.

◆ aclplugin_show_lookup_context_command

vlib_cli_command_t aclplugin_show_lookup_context_command
static
Initial value:
= {
.path = "show acl-plugin lookup context",
.short_help = "show acl-plugin lookup context [index N]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_lookup_context_command)

Definition at line 3482 of file acl.c.

◆ aclplugin_show_lookup_user_command

vlib_cli_command_t aclplugin_show_lookup_user_command
static
Initial value:
= {
.path = "show acl-plugin lookup user",
.short_help = "show acl-plugin lookup user [index N]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_lookup_user_command)

Definition at line 3488 of file acl.c.

◆ aclplugin_show_macip_acl_command

vlib_cli_command_t aclplugin_show_macip_acl_command
static
Initial value:
= {
.path = "show acl-plugin macip acl",
.short_help = "show acl-plugin macip acl [index N]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_acl_command)

Definition at line 3524 of file acl.c.

◆ aclplugin_show_macip_interface_command

vlib_cli_command_t aclplugin_show_macip_interface_command
static
Initial value:
= {
.path = "show acl-plugin macip interface",
.short_help = "show acl-plugin macip interface",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_interface_command)

Definition at line 3530 of file acl.c.

◆ aclplugin_show_memory_command

vlib_cli_command_t aclplugin_show_memory_command
static
Initial value:
= {
.path = "show acl-plugin memory",
.short_help = "show acl-plugin memory",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_memory_command)

Definition at line 3506 of file acl.c.

◆ aclplugin_show_sessions_command

vlib_cli_command_t aclplugin_show_sessions_command
static
Initial value:
= {
.path = "show acl-plugin sessions",
.short_help = "show acl-plugin sessions",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_sessions_command)

Definition at line 3512 of file acl.c.

◆ aclplugin_show_tables_command

vlib_cli_command_t aclplugin_show_tables_command
static
Initial value:
= {
.path = "show acl-plugin tables",
.short_help = "show acl-plugin tables [ acl [index N] | applied [ lc_index N ] | mask | hash [verbose N] ]",
}

(constructor) VLIB_CLI_COMMAND (aclplugin_show_tables_command)

Definition at line 3518 of file acl.c.

acl_set_aclplugin_fn
static clib_error_t * acl_set_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:2518
acl_show_aclplugin_tables_fn
static clib_error_t * acl_show_aclplugin_tables_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3398
acl_show_aclplugin_decode_5tuple_fn
static clib_error_t * acl_show_aclplugin_decode_5tuple_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3183
acl_show_aclplugin_interface_fn
static clib_error_t * acl_show_aclplugin_interface_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3202
acl_show_aclplugin_macip_acl_fn
static clib_error_t * acl_show_aclplugin_macip_acl_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:2965
acl_set_aclplugin_acl_fn
static clib_error_t * acl_set_aclplugin_acl_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:2827
acl_show_aclplugin_lookup_user_fn
static clib_error_t * acl_show_aclplugin_lookup_user_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3084
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
acl_set_aclplugin_interface_fn
static clib_error_t * acl_set_aclplugin_interface_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:2772
acl_clear_aclplugin_fn
static clib_error_t * acl_clear_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3459
acl_show_aclplugin_acl_fn
static clib_error_t * acl_show_aclplugin_acl_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3056
acl_show_aclplugin_macip_interface_fn
static clib_error_t * acl_show_aclplugin_macip_interface_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3001
acl_show_aclplugin_sessions_fn
static clib_error_t * acl_show_aclplugin_sessions_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3377
acl_show_aclplugin_memory_fn
static clib_error_t * acl_show_aclplugin_memory_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3219
acl_show_aclplugin_lookup_context_fn
static clib_error_t * acl_show_aclplugin_lookup_context_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3070