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)",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
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)
void ip6_address_decode(const vl_api_ip6_address_t in, ip6_address_t *out)
#define clib_memcpy(d, s, n)
vl_api_ip6_address_t mgmt_ip6
vl_api_interface_index_t sw_if_index
VLIB_API_INIT_FUNCTION(lldp_api_hookup)
u32 vl_api_string_len(vl_api_string_t *astr)
LLDP external definition.
static void setup_message_id_table(api_main_t *am)
#define BAD_SW_IF_INDEX_LABEL
static void vl_api_lldp_config_t_handler(vl_api_lldp_config_t *mp)
vl_api_ip4_address_t mgmt_ip4
static uword ip6_address_is_zero(const ip6_address_t *a)
#define vec_free(V)
Free vector's memory (no header).
char * vl_api_from_api_to_new_c_string(vl_api_string_t *astr)
static u32 lldp_base_msg_id
Base message ID fot the plugin.
static void vl_api_sw_interface_set_lldp_t_handler(vl_api_sw_interface_set_lldp_t *mp)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void ip4_address_decode(const vl_api_ip4_address_t in, ip4_address_t *out)
Interface set LLDP request.
bool enable[default=true]
configure global parameter for LLDP
lldp_cfg_err_t lldp_cfg_set(u8 **host, int hold_time, int tx_interval)
static clib_error_t * lldp_api_hookup(vlib_main_t *vm)
u8 * vl_api_from_api_to_new_vec(void *mp, vl_api_string_t *astr)
#define VALIDATE_SW_IF_INDEX(mp)