FD.io VPP  v20.09-64-g4f7b92f0a
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)
 

Functions

static clib_error_tlldp_cfg_err_to_clib_err (lldp_cfg_err_t e)
 
lldp_cfg_err_t lldp_cfg_intf_set (u32 hw_if_index, u8 **port_desc, u8 **mgmt_ip4, u8 **mgmt_ip6, u8 **mgmt_oid, int enable)
 
static clib_error_tlldp_intf_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
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

◆ F [1/3]

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

◆ F [2/3]

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

◆ F [3/3]

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

Function Documentation

◆ format_lldp_chassis_id()

u8* format_lldp_chassis_id ( u8 s,
va_list *  va 
)

Definition at line 395 of file lldp_cli.c.

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

◆ format_lldp_intfs()

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

Definition at line 616 of file lldp_cli.c.

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

◆ format_lldp_intfs_detail()

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

Definition at line 533 of file lldp_cli.c.

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

◆ format_lldp_port_id()

u8* format_lldp_port_id ( u8 s,
va_list *  va 
)

Definition at line 323 of file lldp_cli.c.

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

◆ format_lldp_tlv()

u8* format_lldp_tlv ( u8 s,
va_list *  va 
)

Definition at line 483 of file lldp_cli.c.

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

◆ format_time_ago()

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

Definition at line 521 of file lldp_cli.c.

+ Here is the call graph for this function:

◆ lldp_cfg_cmd()

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

Definition at line 219 of file lldp_cli.c.

+ Here is the call graph for this function:

◆ lldp_cfg_err_to_clib_err()

static clib_error_t* lldp_cfg_err_to_clib_err ( lldp_cfg_err_t  e)
static

Definition at line 31 of file lldp_cli.c.

+ Here is the caller graph for this function:

◆ lldp_cfg_intf_set()

lldp_cfg_err_t lldp_cfg_intf_set ( u32  hw_if_index,
u8 **  port_desc,
u8 **  mgmt_ip4,
u8 **  mgmt_ip6,
u8 **  mgmt_oid,
int  enable 
)

Definition at line 47 of file lldp_cli.c.

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

◆ lldp_cfg_set()

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

Definition at line 170 of file lldp_cli.c.

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

◆ lldp_chassis_id_subtype_str()

static const char* lldp_chassis_id_subtype_str ( lldp_chassis_id_subtype_t  t)
static

Definition at line 287 of file lldp_cli.c.

+ Here is the caller graph for this function:

◆ lldp_input_format_trace()

u8* lldp_input_format_trace ( u8 s,
va_list *  args 
)

Definition at line 695 of file lldp_cli.c.

+ Here is the call graph for this function:

◆ lldp_intf_cmd()

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

Definition at line 119 of file lldp_cli.c.

+ Here is the call graph for this function:

◆ lldp_port_id_subtype_str()

static const char* lldp_port_id_subtype_str ( lldp_port_id_subtype_t  t)
static

Definition at line 301 of file lldp_cli.c.

+ Here is the caller graph for this function:

◆ lldp_tlv_code_str()

static const char* lldp_tlv_code_str ( lldp_tlv_code_t  t)
static

Definition at line 463 of file lldp_cli.c.

+ Here is the caller graph for this function:

◆ show_lldp()

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 665 of file lldp_cli.c.

+ Here is the call graph for this function:

Variable Documentation

◆ set_interface_lldp_cmd

vlib_cli_command_t set_interface_lldp_cmd
static
Initial value:
= {
.path = "set interface lldp",
.short_help = "set interface lldp <interface> | sw_if_index <idx>"
" [port-desc <string>] [mgmt-ip4 <string>]"
" [mgmt-ip6 <string>] [mgmt-oid <string>] [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:119

(constructor) VLIB_CLI_COMMAND (set_interface_lldp_cmd)

Definition at line 270 of file lldp_cli.c.

◆ set_lldp_cmd

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:219

(constructor) VLIB_CLI_COMMAND (set_lldp_cmd)

Definition at line 278 of file lldp_cli.c.

◆ show_lldp_command

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:665

(constructor) VLIB_CLI_COMMAND (show_lldp_command)

Definition at line 682 of file lldp_cli.c.