FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
cdp_input.c File Reference
+ Include dependency graph for cdp_input.c:

Go to the source code of this file.

Data Structures

struct  tlv_handler_t
 

Macros

#define DEBUG_TLV_DUMP   0 /* 1=> dump TLV's to stdout while processing them */
 
#define format_unused_tlv   format_generic_tlv
 
#define format_device_name_tlv   format_text_tlv
 
#define format_address_tlv   format_generic_tlv
 
#define format_port_id_tlv   format_text_tlv
 
#define format_capabilities_tlv   format_generic_tlv
 
#define format_version_tlv   format_text_tlv
 
#define format_platform_tlv   format_text_tlv
 
#define format_ipprefix_tlv   format_generic_tlv
 
#define format_hello_tlv   format_generic_tlv
 
#define format_vtp_domain_tlv   format_generic_tlv
 
#define format_native_vlan_tlv   format_generic_tlv
 
#define format_duplex_tlv   format_generic_tlv
 
#define format_appl_vlan_tlv   format_generic_tlv
 
#define format_trigger_tlv   format_generic_tlv
 
#define format_power_tlv   format_generic_tlv
 
#define format_mtu_tlv   format_generic_tlv
 
#define format_trust_tlv   format_generic_tlv
 
#define format_cos_tlv   format_generic_tlv
 
#define format_sysname_tlv   format_generic_tlv
 
#define format_sysobject_tlv   format_generic_tlv
 
#define format_mgmt_addr_tlv   format_generic_tlv
 
#define format_physical_loc_tlv   format_generic_tlv
 
#define format_mgmt_addr2_tlv   format_generic_tlv
 
#define format_power_requested_tlv   format_generic_tlv
 
#define format_power_available_tlv   format_generic_tlv
 
#define format_port_unidirectional_tlv   format_generic_tlv
 
#define format_unknown_28_tlv   format_generic_tlv
 
#define format_energywise_tlv   format_generic_tlv
 
#define format_unknown_30_tlv   format_generic_tlv
 
#define format_spare_poe_tlv   format_generic_tlv
 
#define foreach_text_to_struct_tlv
 
#define process_address_tlv   process_generic_tlv
 
#define process_capabilities_tlv   process_generic_tlv
 
#define process_ipprefix_tlv   process_generic_tlv
 
#define process_hello_tlv   process_generic_tlv
 
#define process_vtp_domain_tlv   process_generic_tlv
 
#define process_native_vlan_tlv   process_generic_tlv
 
#define process_duplex_tlv   process_generic_tlv
 
#define process_appl_vlan_tlv   process_generic_tlv
 
#define process_trigger_tlv   process_generic_tlv
 
#define process_power_tlv   process_generic_tlv
 
#define process_mtu_tlv   process_generic_tlv
 
#define process_trust_tlv   process_generic_tlv
 
#define process_cos_tlv   process_generic_tlv
 
#define process_sysname_tlv   process_generic_tlv
 
#define process_sysobject_tlv   process_generic_tlv
 
#define process_mgmt_addr_tlv   process_generic_tlv
 
#define process_physical_loc_tlv   process_generic_tlv
 
#define process_mgmt_addr2_tlv   process_generic_tlv
 
#define process_power_requested_tlv   process_generic_tlv
 
#define process_power_available_tlv   process_generic_tlv
 
#define process_port_unidirectional_tlv   process_generic_tlv
 
#define process_unknown_28_tlv   process_generic_tlv
 
#define process_energywise_tlv   process_generic_tlv
 
#define process_unknown_30_tlv   process_generic_tlv
 
#define process_spare_poe_tlv   process_generic_tlv
 

Functions

u16 cdp_checksum (void *p, int count)
 
static u8format_generic_tlv (u8 *s, va_list *va)
 
static cdp_error_t process_generic_tlv (cdp_main_t *cm, cdp_neighbor_t *n, cdp_tlv_t *t)
 
static u8format_text_tlv (u8 *s, va_list *va)
 
 CLIB_UNUSED (static cdp_error_t process_text_tlv(cdp_main_t *cm, cdp_neighbor_t *n, cdp_tlv_t *t))
 
static cdp_error_t process_text_tlv (cdp_main_t *cm, cdp_neighbor_t *n, cdp_tlv_t *t)
 
static cdp_error_t process_unused_tlv (cdp_main_t *cm, cdp_neighbor_t *n, cdp_tlv_t *t)
 
 CLIB_UNUSED (static u8 *format_cdp_hdr(u8 *s, va_list *va))
 
static u8format_cdp_hdr (u8 *s, va_list *va)
 
static cdp_error_t process_cdp_hdr (cdp_main_t *cm, cdp_neighbor_t *n, cdp_hdr_t *h)
 
static int cdp_packet_scan (cdp_main_t *cm, cdp_neighbor_t *n)
 
cdp_error_t cdp_input (vlib_main_t *vm, vlib_buffer_t *b0, u32 bi0)
 
static clib_error_tcdp_input_init (vlib_main_t *vm)
 
static u8format_cdp_neighbors (u8 *s, va_list *va)
 
static clib_error_tshow_cdp (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8cdp_input_format_trace (u8 *s, va_list *args)
 

Variables

cdp_main_t cdp_main
 
static tlv_handler_t tlv_handlers []
 
static vlib_cli_command_t show_cdp_command
 (constructor) VLIB_CLI_COMMAND (show_cdp_command) More...
 

Macro Definition Documentation

#define DEBUG_TLV_DUMP   0 /* 1=> dump TLV's to stdout while processing them */

Definition at line 19 of file cdp_input.c.

#define foreach_text_to_struct_tlv
Value:
_(device_name,DEBUG_TLV_DUMP) \
_(platform,DEBUG_TLV_DUMP) \
_(port_id,DEBUG_TLV_DUMP)
#define DEBUG_TLV_DUMP
Definition: cdp_input.c:19
option version
Definition: memclnt.api:17

Definition at line 161 of file cdp_input.c.

#define format_address_tlv   format_generic_tlv

Definition at line 124 of file cdp_input.c.

#define format_appl_vlan_tlv   format_generic_tlv

Definition at line 134 of file cdp_input.c.

#define format_capabilities_tlv   format_generic_tlv

Definition at line 126 of file cdp_input.c.

#define format_cos_tlv   format_generic_tlv

Definition at line 139 of file cdp_input.c.

#define format_device_name_tlv   format_text_tlv

Definition at line 123 of file cdp_input.c.

#define format_duplex_tlv   format_generic_tlv

Definition at line 133 of file cdp_input.c.

#define format_energywise_tlv   format_generic_tlv

Definition at line 149 of file cdp_input.c.

#define format_hello_tlv   format_generic_tlv

Definition at line 130 of file cdp_input.c.

#define format_ipprefix_tlv   format_generic_tlv

Definition at line 129 of file cdp_input.c.

#define format_mgmt_addr2_tlv   format_generic_tlv

Definition at line 144 of file cdp_input.c.

#define format_mgmt_addr_tlv   format_generic_tlv

Definition at line 142 of file cdp_input.c.

#define format_mtu_tlv   format_generic_tlv

Definition at line 137 of file cdp_input.c.

#define format_native_vlan_tlv   format_generic_tlv

Definition at line 132 of file cdp_input.c.

#define format_physical_loc_tlv   format_generic_tlv

Definition at line 143 of file cdp_input.c.

#define format_platform_tlv   format_text_tlv

Definition at line 128 of file cdp_input.c.

#define format_port_id_tlv   format_text_tlv

Definition at line 125 of file cdp_input.c.

#define format_port_unidirectional_tlv   format_generic_tlv

Definition at line 147 of file cdp_input.c.

#define format_power_available_tlv   format_generic_tlv

Definition at line 146 of file cdp_input.c.

#define format_power_requested_tlv   format_generic_tlv

Definition at line 145 of file cdp_input.c.

#define format_power_tlv   format_generic_tlv

Definition at line 136 of file cdp_input.c.

#define format_spare_poe_tlv   format_generic_tlv

Definition at line 151 of file cdp_input.c.

#define format_sysname_tlv   format_generic_tlv

Definition at line 140 of file cdp_input.c.

#define format_sysobject_tlv   format_generic_tlv

Definition at line 141 of file cdp_input.c.

#define format_trigger_tlv   format_generic_tlv

Definition at line 135 of file cdp_input.c.

#define format_trust_tlv   format_generic_tlv

Definition at line 138 of file cdp_input.c.

#define format_unknown_28_tlv   format_generic_tlv

Definition at line 148 of file cdp_input.c.

#define format_unknown_30_tlv   format_generic_tlv

Definition at line 150 of file cdp_input.c.

#define format_unused_tlv   format_generic_tlv

Definition at line 122 of file cdp_input.c.

#define format_version_tlv   format_text_tlv

Definition at line 127 of file cdp_input.c.

#define format_vtp_domain_tlv   format_generic_tlv

Definition at line 131 of file cdp_input.c.

#define process_address_tlv   process_generic_tlv

Definition at line 189 of file cdp_input.c.

#define process_appl_vlan_tlv   process_generic_tlv

Definition at line 196 of file cdp_input.c.

#define process_capabilities_tlv   process_generic_tlv

Definition at line 190 of file cdp_input.c.

#define process_cos_tlv   process_generic_tlv

Definition at line 201 of file cdp_input.c.

#define process_duplex_tlv   process_generic_tlv

Definition at line 195 of file cdp_input.c.

#define process_energywise_tlv   process_generic_tlv

Definition at line 211 of file cdp_input.c.

#define process_hello_tlv   process_generic_tlv

Definition at line 192 of file cdp_input.c.

#define process_ipprefix_tlv   process_generic_tlv

Definition at line 191 of file cdp_input.c.

#define process_mgmt_addr2_tlv   process_generic_tlv

Definition at line 206 of file cdp_input.c.

#define process_mgmt_addr_tlv   process_generic_tlv

Definition at line 204 of file cdp_input.c.

#define process_mtu_tlv   process_generic_tlv

Definition at line 199 of file cdp_input.c.

#define process_native_vlan_tlv   process_generic_tlv

Definition at line 194 of file cdp_input.c.

#define process_physical_loc_tlv   process_generic_tlv

Definition at line 205 of file cdp_input.c.

#define process_port_unidirectional_tlv   process_generic_tlv

Definition at line 209 of file cdp_input.c.

#define process_power_available_tlv   process_generic_tlv

Definition at line 208 of file cdp_input.c.

#define process_power_requested_tlv   process_generic_tlv

Definition at line 207 of file cdp_input.c.

#define process_power_tlv   process_generic_tlv

Definition at line 198 of file cdp_input.c.

#define process_spare_poe_tlv   process_generic_tlv

Definition at line 213 of file cdp_input.c.

#define process_sysname_tlv   process_generic_tlv

Definition at line 202 of file cdp_input.c.

#define process_sysobject_tlv   process_generic_tlv

Definition at line 203 of file cdp_input.c.

#define process_trigger_tlv   process_generic_tlv

Definition at line 197 of file cdp_input.c.

#define process_trust_tlv   process_generic_tlv

Definition at line 200 of file cdp_input.c.

#define process_unknown_28_tlv   process_generic_tlv

Definition at line 210 of file cdp_input.c.

#define process_unknown_30_tlv   process_generic_tlv

Definition at line 212 of file cdp_input.c.

#define process_vtp_domain_tlv   process_generic_tlv

Definition at line 193 of file cdp_input.c.

Function Documentation

u16 cdp_checksum ( void *  p,
int  count 
)

Definition at line 26 of file cdp_input.c.

+ Here is the caller graph for this function:

cdp_error_t cdp_input ( vlib_main_t vm,
vlib_buffer_t b0,
u32  bi0 
)

Definition at line 297 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* cdp_input_format_trace ( u8 s,
va_list *  args 
)

Definition at line 460 of file cdp_input.c.

+ Here is the call graph for this function:

static clib_error_t* cdp_input_init ( vlib_main_t vm)
static

Definition at line 383 of file cdp_input.c.

+ Here is the call graph for this function:

static int cdp_packet_scan ( cdp_main_t cm,
cdp_neighbor_t n 
)
static

Definition at line 251 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CLIB_UNUSED ( static cdp_error_t   process_text_tlvcdp_main_t *cm, cdp_neighbor_t *n, cdp_tlv_t *t)

+ Here is the caller graph for this function:

CLIB_UNUSED ( static u8 format_cdp_hdru8 *s, va_list *va)
static u8* format_cdp_hdr ( u8 s,
va_list *  va 
)
static

Definition at line 225 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 405 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 65 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 88 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cdp_error_t process_cdp_hdr ( cdp_main_t cm,
cdp_neighbor_t n,
cdp_hdr_t *  h 
)
static

Definition at line 235 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cdp_error_t process_generic_tlv ( cdp_main_t cm,
cdp_neighbor_t n,
cdp_tlv_t *  t 
)
static

Definition at line 77 of file cdp_input.c.

+ Here is the call graph for this function:

static cdp_error_t process_text_tlv ( cdp_main_t cm,
cdp_neighbor_t n,
cdp_tlv_t *  t 
)
static

Definition at line 112 of file cdp_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static cdp_error_t process_unused_tlv ( cdp_main_t cm,
cdp_neighbor_t n,
cdp_tlv_t *  t 
)
static

Definition at line 155 of file cdp_input.c.

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

Definition at line 432 of file cdp_input.c.

+ Here is the call graph for this function:

Variable Documentation

cdp_main_t cdp_main

Definition at line 17 of file cdp_input.c.

vlib_cli_command_t show_cdp_command
static
Initial value:
= {
.path = "show cdp",
.short_help = "Show cdp command",
.function = show_cdp,
}
static clib_error_t * show_cdp(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cdp_input.c:432

(constructor) VLIB_CLI_COMMAND (show_cdp_command)

Definition at line 446 of file cdp_input.c.

static tlv_handler_t tlv_handlers
static
Initial value:

Definition at line 61 of file cdp_input.c.