FD.io VPP  v18.01-8-g0eacf49
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_typedefs
 
#define vl_endianfun
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define vl_api_version(n, v)   static u32 api_version=(v);
 
#define REPLY_MSG_ID_BASE   am->msg_id_base
 
#define foreach_acl_plugin_api_msg
 
#define XX   "\377"
 
#define v
 
#define vl_msg_name_crc_list
 
#define PRINT_AND_RESET(vm, out0)   do { vlib_cli_output(vm, "%v", out0); vec_reset_length(out0); } while(0)
 

Functions

 VLIB_PLUGIN_REGISTER ()
 
static void * acl_set_heap (acl_main_t *am)
 
void acl_plugin_acl_set_validate_heap (acl_main_t *am, int on)
 
void acl_plugin_acl_set_trace_heap (acl_main_t *am, int on)
 
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 int acl_add_list (u32 count, vl_api_acl_rule_t rules[], u32 *acl_list_index, u8 *tag)
 
static int acl_del_list (u32 acl_list_index)
 
static int count_skip (u8 *p, u32 size)
 
static int acl_classify_add_del_table_tiny (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 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 acl_unhook_l2_input_classify (acl_main_t *am, u32 sw_if_index)
 
static int acl_unhook_l2_output_classify (acl_main_t *am, u32 sw_if_index)
 
static void acl_add_vlan_session (acl_main_t *am, u32 table_index, u8 is_output, u8 is_dot1ad, u8 is_ip6)
 
static int acl_hook_l2_input_classify (acl_main_t *am, u32 sw_if_index)
 
static int acl_hook_l2_output_classify (acl_main_t *am, u32 sw_if_index)
 
int acl_interface_in_enable_disable (acl_main_t *am, u32 sw_if_index, int enable_disable)
 
int acl_interface_out_enable_disable (acl_main_t *am, u32 sw_if_index, int enable_disable)
 
static int acl_is_not_defined (acl_main_t *am, u32 acl_list_index)
 
static int acl_interface_add_inout_acl (u32 sw_if_index, u8 is_input, u32 acl_list_index)
 
static int acl_interface_del_inout_acl (u32 sw_if_index, u8 is_input, u32 acl_list_index)
 
static void acl_interface_reset_inout_acls (u32 sw_if_index, u8 is_input)
 
static int acl_interface_add_del_inout_acl (u32 sw_if_index, u8 is_add, u8 is_input, u32 acl_list_index)
 
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 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, u32 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_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, unix_shared_memory_queue_t *q, 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, unix_shared_memory_queue_t *q, 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, unix_shared_memory_queue_t *q, 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, unix_shared_memory_queue_t *q, 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 clib_error_tacl_plugin_api_hookup (vlib_main_t *vm)
 
static void setup_message_id_table (acl_main_t *am, api_main_t *apim)
 
static void acl_setup_fa_nodes (void)
 
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_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_print_acl (vlib_main_t *vm, acl_main_t *am, int acl_index)
 
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 void acl_plugin_show_interface (acl_main_t *am, u32 sw_if_index, int show_acl)
 
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 void acl_plugin_show_tables_mask_type (acl_main_t *am)
 
static void acl_plugin_show_tables_acl_hash_info (acl_main_t *am, u32 acl_index)
 
static void acl_plugin_print_pae (vlib_main_t *vm, int j, applied_hash_ace_entry_t *pae)
 
static void acl_plugin_show_tables_applied_info (acl_main_t *am, u32 sw_if_index)
 
static void acl_plugin_show_tables_bihash (acl_main_t *am, u32 show_bihash_verbose)
 
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
 
u8 ip4_5tuple_mask []
 
u8 ip6_5tuple_mask []
 
u8 dot1q_5tuple_mask []
 
u8 dot1ad_5tuple_mask []
 
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_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...
 

Macro Definition Documentation

#define foreach_acl_plugin_api_msg
Value:
_(ACL_PLUGIN_GET_VERSION, acl_plugin_get_version) \
_(ACL_PLUGIN_CONTROL_PING, acl_plugin_control_ping) \
_(ACL_ADD_REPLACE, acl_add_replace) \
_(ACL_DEL, acl_del) \
_(ACL_INTERFACE_ADD_DEL, acl_interface_add_del) \
_(ACL_INTERFACE_SET_ACL_LIST, acl_interface_set_acl_list) \
_(ACL_DUMP, acl_dump) \
_(ACL_INTERFACE_LIST_DUMP, acl_interface_list_dump) \
_(MACIP_ACL_ADD, macip_acl_add) \
_(MACIP_ACL_ADD_REPLACE, macip_acl_add_replace) \
_(MACIP_ACL_DEL, macip_acl_del) \
_(MACIP_ACL_INTERFACE_ADD_DEL, macip_acl_interface_add_del) \
_(MACIP_ACL_DUMP, macip_acl_dump) \
_(MACIP_ACL_INTERFACE_GET, macip_acl_interface_get) \
_(MACIP_ACL_INTERFACE_LIST_DUMP, macip_acl_interface_list_dump)

Definition at line 63 of file acl.c.

#define PRINT_AND_RESET (   vm,
  out0 
)    do { vlib_cli_output(vm, "%v", out0); vec_reset_length(out0); } while(0)

Definition at line 2682 of file acl.c.

#define REPLY_MSG_ID_BASE   am->msg_id_base

Definition at line 58 of file acl.c.

#define v

Definition at line 341 of file acl.c.

#define vl_api_version (   n,
  v 
)    static u32 api_version=(v);

Definition at line 49 of file acl.c.

#define vl_endianfun

Definition at line 38 of file acl.c.

#define vl_msg_name_crc_list

Definition at line 2313 of file acl.c.

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

Definition at line 43 of file acl.c.

#define vl_printfun

Definition at line 44 of file acl.c.

#define vl_typedefs

Definition at line 33 of file acl.c.

#define XX   "\377"

Definition at line 338 of file acl.c.

Function Documentation

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

Definition at line 177 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_add_vlan_session ( acl_main_t am,
u32  table_index,
u8  is_output,
u8  is_dot1ad,
u8  is_ip6 
)
static

Definition at line 615 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 456 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_classify_add_del_table_tiny ( 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 429 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 3241 of file acl.c.

+ Here is the call graph for this function:

static int acl_del_list ( u32  acl_list_index)
static

Definition at line 263 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_hook_l2_input_classify ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 682 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_hook_l2_output_classify ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 787 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* acl_init ( vlib_main_t vm)
static

Definition at line 3356 of file acl.c.

+ Here is the call graph for this function:

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 1169 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_interface_add_inout_acl ( u32  sw_if_index,
u8  is_input,
u32  acl_list_index 
)
static

Definition at line 951 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_interface_del_inout_acl ( u32  sw_if_index,
u8  is_input,
u32  acl_list_index 
)
static

Definition at line 1019 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 894 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 919 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_interface_reset_inout_acls ( u32  sw_if_index,
u8  is_input 
)
static

Definition at line 1100 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_is_not_defined ( acl_main_t am,
u32  acl_list_index 
)
static

Definition at line 944 of file acl.c.

+ Here is the caller graph for this function:

void acl_plugin_acl_set_trace_heap ( acl_main_t am,
int  on 
)

Definition at line 121 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void acl_plugin_acl_set_validate_heap ( acl_main_t am,
int  on 
)

Definition at line 103 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* acl_plugin_api_hookup ( vlib_main_t vm)
static

Definition at line 2296 of file acl.c.

+ Here is the caller graph for this function:

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

Definition at line 3314 of file acl.c.

+ Here is the call graph for this function:

static void acl_plugin_print_pae ( vlib_main_t vm,
int  j,
applied_hash_ace_entry_t pae 
)
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:

static void acl_plugin_show_acl ( acl_main_t am,
u32  acl_index 
)
static

Definition at line 2727 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2775 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2890 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_plugin_show_tables_acl_hash_info ( acl_main_t am,
u32  acl_index 
)
static

Definition at line 3064 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_plugin_show_tables_applied_info ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 3110 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_plugin_show_tables_bihash ( acl_main_t am,
u32  show_bihash_verbose 
)
static

Definition at line 3174 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_plugin_show_tables_mask_type ( acl_main_t am)
static

Definition at line 3046 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2684 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 2439 of file acl.c.

+ Here is the call graph for this function:

static void* acl_set_heap ( acl_main_t am)
static

Definition at line 90 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_set_session_max_entries ( u32  value)
static

Definition at line 2390 of file acl.c.

+ Here is the caller graph for this function:

static int acl_set_skip_ipv6_eh ( u32  eh,
u32  value 
)
static

Definition at line 2397 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void acl_set_timeout_sec ( int  timeout_type,
u32  value 
)
static

Definition at line 2371 of file acl.c.

+ Here is the caller graph for this function:

static void acl_setup_fa_nodes ( void  )
static

Definition at line 2327 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 2761 of file acl.c.

+ Here is the call graph for this function:

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 2826 of file acl.c.

+ Here is the call graph for this function:

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 2845 of file acl.c.

+ Here is the call graph for this function:

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 2654 of file acl.c.

+ Here is the call graph for this function:

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 2667 of file acl.c.

+ Here is the call graph for this function:

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 2861 of file acl.c.

+ Here is the call graph for this function:

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 3025 of file acl.c.

+ Here is the call graph for this function:

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 3181 of file acl.c.

+ Here is the call graph for this function:

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

Definition at line 2413 of file acl.c.

+ Here is the call graph for this function:

static int acl_unhook_l2_input_classify ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 484 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int acl_unhook_l2_output_classify ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 549 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void copy_acl_rule_to_api_rule ( vl_api_acl_rule_t api_rule,
acl_rule_t r 
)
static

Definition at line 1848 of file acl.c.

+ Here is the caller graph for this function:

static int count_skip ( u8 p,
u32  size 
)
static

Definition at line 414 of file acl.c.

+ Here is the caller graph for this function:

static int get_l3_src_offset ( int  is6)
static

Definition at line 1257 of file acl.c.

+ Here is the caller graph for this function:

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 1527 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int macip_acl_del_list ( u32  acl_list_index)
static

Definition at line 1664 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1638 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1700 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int macip_acl_interface_del_acl ( acl_main_t am,
u32  sw_if_index 
)
static

Definition at line 1613 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void macip_acl_print ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 2627 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int macip_create_classify_tables ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 1268 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void macip_destroy_classify_tables ( acl_main_t am,
u32  macip_acl_index 
)
static

Definition at line 1480 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1206 of file acl.c.

+ Here is the caller graph for this function:

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

Definition at line 1506 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int match_type_compare ( macip_match_type_t m1,
macip_match_type_t m2 
)
static

Definition at line 1249 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int match_type_metric ( macip_match_type_t m)
static

Definition at line 1228 of file acl.c.

+ Here is the caller graph for this function:

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

Definition at line 2604 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 2612 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_acl_details ( acl_main_t am,
unix_shared_memory_queue_t q,
acl_list_t acl,
u32  context 
)
static

Definition at line 1874 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_acl_interface_list_details ( acl_main_t am,
unix_shared_memory_queue_t q,
u32  sw_if_index,
u32  context 
)
static

Definition at line 1948 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_macip_acl_details ( acl_main_t am,
unix_shared_memory_queue_t q,
macip_acl_list_t acl,
u32  context 
)
static

Definition at line 2116 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_macip_acl_interface_list_details ( acl_main_t am,
unix_shared_memory_queue_t q,
u32  sw_if_index,
u32  acl_index,
u32  context 
)
static

Definition at line 2233 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void setup_message_id_table ( acl_main_t am,
api_main_t apim 
)
static

Definition at line 2318 of file acl.c.

+ Here is the caller graph for this function:

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

Definition at line 1733 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_acl_add_replace_t_handler ( vl_api_acl_add_replace_t mp)
static

Definition at line 1750 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_acl_del_t_handler ( vl_api_acl_del_t mp)
static

Definition at line 1777 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_acl_dump_t_handler ( vl_api_acl_dump_t mp)
static

Definition at line 1905 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_acl_interface_add_del_t_handler ( vl_api_acl_interface_add_del_t mp)
static

Definition at line 1789 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_acl_interface_list_dump_t_handler ( vl_api_acl_interface_list_dump_t mp)
static

Definition at line 1994 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_acl_interface_set_acl_list_t_handler ( vl_api_acl_interface_set_acl_list_t mp)
static

Definition at line 1809 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_acl_plugin_control_ping_t_handler ( vl_api_acl_plugin_control_ping_t mp)
static

Definition at line 161 of file acl.c.

static void vl_api_acl_plugin_get_version_t_handler ( vl_api_acl_plugin_get_version_t mp)
static

Definition at line 136 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_add_replace_t_handler ( vl_api_macip_acl_add_replace_t mp)
static

Definition at line 2057 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_add_t_handler ( vl_api_macip_acl_add_t mp)
static

Definition at line 2030 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_del_t_handler ( vl_api_macip_acl_del_t mp)
static

Definition at line 2084 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_dump_t_handler ( vl_api_macip_acl_dump_t mp)
static

Definition at line 2166 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_interface_add_del_t_handler ( vl_api_macip_acl_interface_add_del_t mp)
static

Definition at line 2097 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_macip_acl_interface_get_t_handler ( vl_api_macip_acl_interface_get_t mp)
static

Definition at line 2202 of file acl.c.

+ Here is the call graph for this function:

static void vl_api_macip_acl_interface_list_dump_t_handler ( vl_api_macip_acl_interface_list_dump_t mp)
static

Definition at line 2258 of file acl.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )
VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( acl_sw_interface_add_del  )

+ Here is the caller graph for this function:

Variable Documentation

acl_main_t acl_main

Definition at line 56 of file acl.c.

vlib_cli_command_t aclplugin_clear_command
static
Initial value:
= {
.path = "clear acl-plugin sessions",
.short_help = "clear acl-plugin sessions",
}
static clib_error_t * acl_clear_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:3241

(constructor) VLIB_CLI_COMMAND (aclplugin_clear_command)

Definition at line 3306 of file acl.c.

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,
}
static clib_error_t * acl_set_aclplugin_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: acl.c:2439

(constructor) VLIB_CLI_COMMAND (aclplugin_set_command)

Definition at line 3252 of file acl.c.

vlib_cli_command_t aclplugin_show_acl_command
static
Initial value:
= {
.path = "show acl-plugin acl",
.short_help = "show acl-plugin acl [index N]",
}
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:2761

(constructor) VLIB_CLI_COMMAND (aclplugin_show_acl_command)

Definition at line 3258 of file acl.c.

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",
}
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:2826

(constructor) VLIB_CLI_COMMAND (aclplugin_show_decode_5tuple_command)

Definition at line 3264 of file acl.c.

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]",
}
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:2845

(constructor) VLIB_CLI_COMMAND (aclplugin_show_interface_command)

Definition at line 3270 of file acl.c.

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",
}
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:2654

(constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_acl_command)

Definition at line 3294 of file acl.c.

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",
}
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:2667

(constructor) VLIB_CLI_COMMAND (aclplugin_show_macip_interface_command)

Definition at line 3300 of file acl.c.

vlib_cli_command_t aclplugin_show_memory_command
static
Initial value:
= {
.path = "show acl-plugin memory",
.short_help = "show acl-plugin memory",
}
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:2861

(constructor) VLIB_CLI_COMMAND (aclplugin_show_memory_command)

Definition at line 3276 of file acl.c.

vlib_cli_command_t aclplugin_show_sessions_command
static
Initial value:
= {
.path = "show acl-plugin sessions",
.short_help = "show acl-plugin sessions",
}
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:3025

(constructor) VLIB_CLI_COMMAND (aclplugin_show_sessions_command)

Definition at line 3282 of file acl.c.

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 [ sw_if_index N ] | mask | hash [verbose N] ]",
}
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:3181

(constructor) VLIB_CLI_COMMAND (aclplugin_show_tables_command)

Definition at line 3288 of file acl.c.

u8 dot1ad_5tuple_mask[]
Initial value:
=
_(" dmac smac dot1ad dot1q etype ")
_(ether) __ __ __ __ __ __ v __ __ __ __ __ __ v XX XX __ __ XX XX __ __ v XX XX v
_(padpad) __ __ __ __
_(padpad) __ __ __ __
_(padeth) __ __
#define v
Definition: acl.c:341
#define XX
Definition: acl.c:338

Definition at line 400 of file acl.c.

u8 dot1q_5tuple_mask[]
Initial value:
=
_(" dmac smac dot1q etype ")
_(ether) __ __ __ __ __ __ v __ __ __ __ __ __ v XX XX __ __ v XX XX v
_(padpad) __ __ __ __
_(padpad) __ __ __ __
_(padpad) __ __ __ __
_(padeth) __ __
#define v
Definition: acl.c:341
#define XX
Definition: acl.c:338

Definition at line 392 of file acl.c.

u8 ip4_5tuple_mask[]
Initial value:
=
_(" dmac smac etype ")
_(ether) __ __ __ __ __ __ v __ __ __ __ __ __ v __ __ v
_(" v ihl totlen ")
_(0x0000)
__ __ __ __
_(" ident fl+fo ")
_(0x0004)
__ __ __ __
_(" ttl pr checksum ")
_(0x0008)
__ XX __ __
_(" src address ")
_(0x000C)
_(" dst address ")
_(0x0010)
_("L4 T/U sport dport ")
_(tcpudp)
_(padpad)
__ __ __ __
_(padpad)
__ __ __ __
_(padeth)
__ __
#define fl(x, y)
#define v
Definition: acl.c:341
#define XX
Definition: acl.c:338

Definition at line 344 of file acl.c.

u8 ip6_5tuple_mask[]
Initial value:
=
_(" dmac smac etype ")
_(ether) __ __ __ __ __ __ v __ __ __ __ __ __ v __ __ v
_(" v tc + flow ")
_(0x0000) __ __ __ __
_(" plen nh hl ")
_(0x0004) __ __ XX __
_(" src address ")
_(0x0008) XX XX XX XX
_(0x000C) XX XX XX XX
_(0x0010) XX XX XX XX
_(0x0014) XX XX XX XX
_(" dst address ")
_(0x0018) XX XX XX XX
_(0x001C) XX XX XX XX
_(0x0020) XX XX XX XX
_(0x0024) XX XX XX XX
_("L4T/U sport dport ")
_(tcpudp) XX XX XX XX _(padpad) __ __ __ __ _(padeth) __ __
#define v
Definition: acl.c:341
#define XX
Definition: acl.c:338

Definition at line 372 of file acl.c.