FD.io VPP  v19.08.2-294-g37e99c22d
Vector Packet Processing
mactime.c File Reference
+ Include dependency graph for mactime.c:

Go to the source code of this file.

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   mm->msg_id_base
 
#define foreach_mactime_plugin_api_msg
 
#define vl_msg_name_crc_list
 

Functions

static void feature_init (mactime_main_t *mm)
 
int mactime_enable_disable (mactime_main_t *mm, u32 sw_if_index, int enable_disable)
 Action function shared between message handler and debug CLI. More...
 
static clib_error_tmactime_enable_disable_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void vl_api_mactime_enable_disable_t_handler (vl_api_mactime_enable_disable_t *mp)
 Enable / disable time-base src mac filtration on an interface. More...
 
void mactime_send_create_entry_message (u8 *mac_address)
 Create a lookup table entry for the indicated mac address. More...
 
static void vl_api_mactime_add_del_range_t_handler (vl_api_mactime_add_del_range_t *mp)
 Add or delete static / dynamic accept/drop configuration for a src mac. More...
 
static clib_error_tmactime_plugin_api_hookup (vlib_main_t *vm)
 
static void setup_message_id_table (mactime_main_t *mm, api_main_t *am)
 
static clib_error_tmactime_init (vlib_main_t *vm)
 
static clib_error_tmactime_config (vlib_main_t *vm, unformat_input_t *input)
 
 VNET_FEATURE_INIT (mactime, static)
 
 VNET_FEATURE_INIT (mactime_tx, static)
 
 VLIB_PLUGIN_REGISTER ()
 
u8format_bytes_with_width (u8 *s, va_list *va)
 
static clib_error_tshow_mactime_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tclear_mactime_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

mactime_main_t mactime_main
 
static vlib_cli_command_t mactime_enable_disable_command
 (constructor) VLIB_CLI_COMMAND (mactime_enable_disable_command) More...
 
static vlib_cli_command_t show_mactime_command
 (constructor) VLIB_CLI_COMMAND (show_mactime_command) More...
 
static vlib_cli_command_t clear_mactime_command
 (constructor) VLIB_CLI_COMMAND (clear_mactime_command) More...
 

Macro Definition Documentation

◆ foreach_mactime_plugin_api_msg

#define foreach_mactime_plugin_api_msg
Value:
_(MACTIME_ENABLE_DISABLE, mactime_enable_disable) \
_(MACTIME_ADD_DEL_RANGE, mactime_add_del_range)
int mactime_enable_disable(mactime_main_t *mm, u32 sw_if_index, int enable_disable)
Action function shared between message handler and debug CLI.
Definition: mactime.c:86

Definition at line 60 of file mactime.c.

◆ REPLY_MSG_ID_BASE

#define REPLY_MSG_ID_BASE   mm->msg_id_base

Definition at line 50 of file mactime.c.

◆ vl_api_version

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

Definition at line 46 of file mactime.c.

◆ vl_endianfun

#define vl_endianfun

Definition at line 35 of file mactime.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 365 of file mactime.c.

◆ vl_print

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

Definition at line 40 of file mactime.c.

◆ vl_printfun

#define vl_printfun

Definition at line 41 of file mactime.c.

◆ vl_typedefs

#define vl_typedefs

Definition at line 30 of file mactime.c.

Function Documentation

◆ clear_mactime_command_fn()

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

Definition at line 670 of file mactime.c.

+ Here is the call graph for this function:

◆ feature_init()

static void feature_init ( mactime_main_t mm)
static

Definition at line 65 of file mactime.c.

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

◆ format_bytes_with_width()

u8* format_bytes_with_width ( u8 s,
va_list *  va 
)

Definition at line 461 of file mactime.c.

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

◆ mactime_config()

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

Definition at line 409 of file mactime.c.

+ Here is the call graph for this function:

◆ mactime_enable_disable()

int mactime_enable_disable ( mactime_main_t mm,
u32  sw_if_index,
int  enable_disable 
)

Action function shared between message handler and debug CLI.

Definition at line 86 of file mactime.c.

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

◆ mactime_enable_disable_command_fn()

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

Definition at line 112 of file mactime.c.

+ Here is the call graph for this function:

◆ mactime_init()

static clib_error_t* mactime_init ( vlib_main_t vm)
static

Definition at line 378 of file mactime.c.

+ Here is the call graph for this function:

◆ mactime_plugin_api_hookup()

static clib_error_t* mactime_plugin_api_hookup ( vlib_main_t vm)
static

Definition at line 348 of file mactime.c.

+ Here is the caller graph for this function:

◆ mactime_send_create_entry_message()

void mactime_send_create_entry_message ( u8 mac_address)

Create a lookup table entry for the indicated mac address.

Definition at line 188 of file mactime.c.

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

◆ setup_message_id_table()

static void setup_message_id_table ( mactime_main_t mm,
api_main_t am 
)
static

Definition at line 370 of file mactime.c.

+ Here is the caller graph for this function:

◆ show_mactime_command_fn()

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

Definition at line 501 of file mactime.c.

+ Here is the call graph for this function:

◆ vl_api_mactime_add_del_range_t_handler()

static void vl_api_mactime_add_del_range_t_handler ( vl_api_mactime_add_del_range_t mp)
static

Add or delete static / dynamic accept/drop configuration for a src mac.

Definition at line 215 of file mactime.c.

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

◆ vl_api_mactime_enable_disable_t_handler()

static void vl_api_mactime_enable_disable_t_handler ( vl_api_mactime_enable_disable_t mp)
static

Enable / disable time-base src mac filtration on an interface.

Definition at line 171 of file mactime.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( mactime  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( mactime_tx  ,
static   
)

Variable Documentation

◆ clear_mactime_command

vlib_cli_command_t clear_mactime_command
static
Initial value:
=
{
.path = "clear mactime",
.short_help = "clear mactime counters",
}
static clib_error_t * clear_mactime_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: mactime.c:670

(constructor) VLIB_CLI_COMMAND (clear_mactime_command)

Definition at line 687 of file mactime.c.

◆ mactime_enable_disable_command

vlib_cli_command_t mactime_enable_disable_command
static
Initial value:
=
{
.path = "mactime enable-disable",
.short_help =
"mactime enable-disable <interface-name> [disable]",
}
static clib_error_t * mactime_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: mactime.c:112

(constructor) VLIB_CLI_COMMAND (mactime_enable_disable_command)

Definition at line 157 of file mactime.c.

◆ mactime_main

mactime_main_t mactime_main

Definition at line 53 of file mactime.c.

◆ show_mactime_command

vlib_cli_command_t show_mactime_command
static
Initial value:
=
{
.path = "show mactime",
.short_help = "show mactime [verbose]",
}
static clib_error_t * show_mactime_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: mactime.c:501

(constructor) VLIB_CLI_COMMAND (show_mactime_command)

Definition at line 661 of file mactime.c.