FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
lldp_cli.c File Reference

LLDP CLI handling. More...

+ Include dependency graph for lldp_cli.c:

Go to the source code of this file.

Macros

#define F(num, val, str)
 
#define F(num, val, str)
 
#define F(n, t, s)
 

Typedefs

typedef enum lldp_cfg_err lldp_cfg_err_t
 

Enumerations

enum  lldp_cfg_err { lldp_ok, lldp_not_supported, lldp_invalid_arg }
 

Functions

static clib_error_tlldp_cfg_err_to_clib_err (lldp_cfg_err_t e)
 
static lldp_cfg_err_t lldp_cfg_intf_set (u32 hw_if_index, int enable)
 
static clib_error_tlldp_intf_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static lldp_cfg_err_t lldp_cfg_set (u8 **host, int hold_time, int tx_interval)
 
static clib_error_tlldp_cfg_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static const char * lldp_chassis_id_subtype_str (lldp_chassis_id_subtype_t t)
 
static const char * lldp_port_id_subtype_str (lldp_port_id_subtype_t t)
 
u8format_lldp_port_id (u8 *s, va_list *va)
 
u8format_lldp_chassis_id (u8 *s, va_list *va)
 
static const char * lldp_tlv_code_str (lldp_tlv_code_t t)
 
u8format_lldp_tlv (u8 *s, va_list *va)
 
static u8format_time_ago (u8 *s, va_list *va)
 
static u8format_lldp_intfs_detail (u8 *s, vlib_main_t *vm, const lldp_main_t *lm)
 
static u8format_lldp_intfs (u8 *s, va_list *va)
 
static clib_error_tshow_lldp (vlib_main_t *vm, unformat_input_t *input, CLIB_UNUSED(vlib_cli_command_t *lmd))
 
u8lldp_input_format_trace (u8 *s, va_list *args)
 

Variables

static vlib_cli_command_t set_interface_lldp_cmd
 (constructor) VLIB_CLI_COMMAND (set_interface_lldp_cmd) More...
 
static vlib_cli_command_t set_lldp_cmd
 (constructor) VLIB_CLI_COMMAND (set_lldp_cmd) More...
 
static vlib_cli_command_t show_lldp_command
 (constructor) VLIB_CLI_COMMAND (show_lldp_command) More...
 

Detailed Description

LLDP CLI handling.

Definition in file lldp_cli.c.

Macro Definition Documentation

#define F (   num,
  val,
  str 
)
Value:
case num: \
return str;
#define F (   num,
  val,
  str 
)
Value:
case num: \
return str;
#define F (   n,
  t,
 
)
Value:
case n: \
return s;

Typedef Documentation

Enumeration Type Documentation

Enumerator
lldp_ok 
lldp_not_supported 
lldp_invalid_arg 

Definition at line 28 of file lldp_cli.c.

Function Documentation

u8* format_lldp_chassis_id ( u8 s,
va_list *  va 
)

Definition at line 334 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_lldp_intfs ( u8 s,
va_list *  va 
)
static

Definition at line 531 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_lldp_intfs_detail ( u8 s,
vlib_main_t vm,
const lldp_main_t lm 
)
static

Definition at line 472 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_lldp_port_id ( u8 s,
va_list *  va 
)

Definition at line 262 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_lldp_tlv ( u8 s,
va_list *  va 
)

Definition at line 422 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_time_ago ( u8 s,
va_list *  va 
)
static

Definition at line 460 of file lldp_cli.c.

+ Here is the call graph for this function:

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

Definition at line 158 of file lldp_cli.c.

+ Here is the call graph for this function:

static clib_error_t* lldp_cfg_err_to_clib_err ( lldp_cfg_err_t  e)
static

Definition at line 36 of file lldp_cli.c.

+ Here is the caller graph for this function:

static lldp_cfg_err_t lldp_cfg_intf_set ( u32  hw_if_index,
int  enable 
)
static

Definition at line 52 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static lldp_cfg_err_t lldp_cfg_set ( u8 **  host,
int  hold_time,
int  tx_interval 
)
static

Definition at line 114 of file lldp_cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char* lldp_chassis_id_subtype_str ( lldp_chassis_id_subtype_t  t)
static

Definition at line 226 of file lldp_cli.c.

+ Here is the caller graph for this function:

u8* lldp_input_format_trace ( u8 s,
va_list *  args 
)

Definition at line 610 of file lldp_cli.c.

+ Here is the call graph for this function:

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

Definition at line 91 of file lldp_cli.c.

+ Here is the call graph for this function:

static const char* lldp_port_id_subtype_str ( lldp_port_id_subtype_t  t)
static

Definition at line 240 of file lldp_cli.c.

+ Here is the caller graph for this function:

static const char* lldp_tlv_code_str ( lldp_tlv_code_t  t)
static

Definition at line 402 of file lldp_cli.c.

+ Here is the caller graph for this function:

static clib_error_t* show_lldp ( vlib_main_t vm,
unformat_input_t input,
CLIB_UNUSED(vlib_cli_command_t *lmd)   
)
static

Definition at line 580 of file lldp_cli.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_cli_command_t set_interface_lldp_cmd
static
Initial value:
= {
.path = "set interface lldp",
.short_help = "set interface lldp <interface> (enable | disable) ",
.function = lldp_intf_cmd,
}
static clib_error_t * lldp_intf_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lldp_cli.c:91

(constructor) VLIB_CLI_COMMAND (set_interface_lldp_cmd)

Definition at line 211 of file lldp_cli.c.

vlib_cli_command_t set_lldp_cmd
static
Initial value:
= {
.path = "set lldp",
.short_help = "set lldp [system-name <string>] [tx-hold <value>] "
"[tx-interval <value>]",
.function = lldp_cfg_cmd,
}
static clib_error_t * lldp_cfg_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: lldp_cli.c:158

(constructor) VLIB_CLI_COMMAND (set_lldp_cmd)

Definition at line 217 of file lldp_cli.c.

vlib_cli_command_t show_lldp_command
static
Initial value:
= {
.path = "show lldp",
.short_help = "show lldp [detail]",
.function = show_lldp,
}
static clib_error_t * show_lldp(vlib_main_t *vm, unformat_input_t *input, CLIB_UNUSED(vlib_cli_command_t *lmd))
Definition: lldp_cli.c:580

(constructor) VLIB_CLI_COMMAND (show_lldp_command)

Definition at line 597 of file lldp_cli.c.