43 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 #define vl_api_version(n,v) static u32 api_version=(v); 53 vl_print (handle, (char *)s); \ 57 #define REPLY_MSG_ID_BASE lm->msg_id_base 60 #define foreach_lacp_plugin_api_msg \ 61 _(SW_INTERFACE_LACP_DUMP, sw_interface_lacp_dump) 73 mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_LACP_DETAILS + lm->
msg_id_base);
139 s =
format (0,
"SCRIPT: sw_interface_lacp_dump ");
144 #define vl_msg_name_crc_list 146 #undef vl_msg_name_crc_list 151 #define _(id,n,crc) \ 152 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + lm->msg_id_base); 153 foreach_vl_msg_name_crc_lacp;
160 #define _(n,f) api_main.msg_print_handlers \ 161 [VL_API_##n + lm->msg_id_base] \ 162 = (void *) vl_api_##f##_t_print; 176 name =
format (0,
"lacp_%08x%c", api_version, 0);
183 vl_msg_api_set_handlers((VL_API_##N + lm->msg_id_base), \ 185 vl_api_##n##_t_handler, \ 187 vl_api_##n##_t_endian, \ 188 vl_api_##n##_t_print, \ 189 sizeof(vl_api_##n##_t), 1); 194 am->
is_mp_safe[VL_API_SW_INTERFACE_LACP_DUMP] = 1;
195 am->
is_mp_safe[VL_API_SW_INTERFACE_LACP_DETAILS] = 1;
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void lacp_send_sw_interface_details(vl_api_registration_t *reg, lacp_interface_details_t *lacp_if, u32 context)
int lacp_dump_ifs(lacp_interface_details_t **out_lacpifs)
void vl_api_sw_interface_lacp_dump_t_handler(vl_api_sw_interface_lacp_dump_t *mp)
Message handler for lacp_dump API.
u16 partner_system_priority
void * vl_msg_api_alloc(int nbytes)
#define clib_memcpy(d, s, n)
u16 partner_port_priority
LACP interface details struct.
static void * vl_api_sw_interface_lacp_dump_t_print(vl_api_sw_interface_lacp_dump_t *mp, void *handle)
Reply for lacp dump request.
static void setup_message_id_table(lacp_main_t *lm, api_main_t *am)
#define foreach_lacp_plugin_api_msg
API main structure, used by both vpp and binary API clients.
An API client registration, only in vpp/vlib.
Dump lacp interfaces request.
u8 bond_interface_name[64]
static void plugin_custom_dump_configure(lacp_main_t *lm)
#define vec_free(V)
Free vector's memory (no header).
clib_error_t * lacp_plugin_api_hookup(vlib_main_t *vm)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
u16 partner_port_priority
u16 partner_system_priority
u8 bond_interface_name[64]
u16 actor_system_priority
u16 actor_system_priority
u8 * is_mp_safe
Message is mp safe vector.
#define vec_foreach(var, vec)
Vector iterator.
u16 msg_id_base
API message ID base.
u16 vl_msg_api_get_msg_ids(const char *name, int n)