38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_vpe_api_msg \ 46 _(LLDP_CONFIG, lldp_config) \ 47 _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) 52 vl_api_lldp_config_reply_t *rmp;
63 rv = VNET_API_ERROR_INVALID_VALUE;
72 vl_api_sw_interface_set_lldp_reply_t *rmp;
74 u8 *port_desc = 0, *mgmt_ip4 = 0, *mgmt_ip6 = 0, *mgmt_oid = 0;
82 strncpy ((
char *) port_desc, (
char *) mp->
port_desc,
101 strncpy ((
char *) mgmt_oid, (
char *) mp->
mgmt_oid,
vec_len (mgmt_oid));
107 &mgmt_ip4, &mgmt_ip6, &mgmt_oid,
114 rv = VNET_API_ERROR_INVALID_VALUE;
130 #define vl_msg_name_crc_list 132 #undef vl_msg_name_crc_list 137 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 138 foreach_vl_msg_name_crc_lldp;
148 vl_msg_api_set_handlers(VL_API_##N, #n, \ 149 vl_api_##n##_t_handler, \ 151 vl_api_##n##_t_endian, \ 152 vl_api_##n##_t_print, \ 153 sizeof(vl_api_##n##_t), 1); #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)
memset(h->entries, 0, sizeof(h->entries[0])*entries)
#define foreach_vpe_api_msg
VLIB_API_INIT_FUNCTION(lldp_api_hookup)
LLDP external definition.
API main structure, used by both vpp and binary API clients.
#define BAD_SW_IF_INDEX_LABEL
static void vl_api_lldp_config_t_handler(vl_api_lldp_config_t *mp)
#define vec_free(V)
Free vector's memory (no header).
#define clib_memcpy(a, b, c)
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)
static void setup_message_id_table(api_main_t *am)
Interface set LLDP request.
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)
#define VALIDATE_SW_IF_INDEX(mp)