|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
33 #include <lldp/lldp.api_enum.h>
34 #include <lldp/lldp.api_types.h>
40 #define REPLY_MSG_ID_BASE lldp_base_msg_id
47 vl_api_lldp_config_reply_t *rmp;
57 rv = VNET_API_ERROR_INVALID_VALUE;
66 vl_api_sw_interface_set_lldp_reply_t *rmp;
68 u8 *mgmt_oid = 0, *mgmt_ip4 = 0, *mgmt_ip6 = 0;
70 u8 no_data[128] = { 0 };
104 &mgmt_ip4, &mgmt_ip6, &mgmt_oid,
111 rv = VNET_API_ERROR_INVALID_VALUE;
127 #include <lldp/lldp.api.c>
143 #include <vpp/app/version.h>
147 .version = VPP_BUILD_VER,
148 .description =
"Link Layer Discovery Protocol (LLDP)",
VLIB_API_INIT_FUNCTION(lldp_api_hookup)
#define VALIDATE_SW_IF_INDEX(mp)
lldp_cfg_err_t lldp_cfg_set(u8 **host, int hold_time, int tx_interval)
vl_api_ip6_address_t mgmt_ip6
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
#define clib_memcpy(d, s, n)
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void vl_api_sw_interface_set_lldp_t_handler(vl_api_sw_interface_set_lldp_t *mp)
static void setup_message_id_table(api_main_t *am)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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)
bool enable[default=true]
static void vl_api_lldp_config_t_handler(vl_api_lldp_config_t *mp)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
u32 vl_api_string_len(vl_api_string_t *astr)
#define BAD_SW_IF_INDEX_LABEL
Interface set LLDP request.
#define vec_free(V)
Free vector's memory (no header).
vl_api_interface_index_t sw_if_index
u8 * vl_api_from_api_to_new_vec(void *mp, vl_api_string_t *astr)
static u32 lldp_base_msg_id
Base message ID fot the plugin.
static uword ip6_address_is_zero(const ip6_address_t *a)
LLDP external definition.
configure global parameter for LLDP
char * vl_api_from_api_to_new_c_string(vl_api_string_t *astr)
vl_api_ip4_address_t mgmt_ip4
static clib_error_t * lldp_api_hookup(vlib_main_t *vm)