43 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 49 #define vl_api_version(n,v) static u32 api_version=(v); 60 #define REPLY_MACRO(t) \ 63 vl_api_client_index_to_input_queue (mp->client_index); \ 67 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 68 rmp->_vl_msg_id = htons ((t)+lm->msg_id_base); \ 69 rmp->context = mp->context; \ 70 rmp->retval = htonl (rv); \ 72 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 75 #define REPLY_MACRO2(t, body) \ 78 vl_api_client_index_to_input_queue (mp->client_index); \ 82 rmp = vl_msg_api_alloc (sizeof (*rmp)); \ 83 rmp->_vl_msg_id = htons ((t)+lm->msg_id_base); \ 84 rmp->context = mp->context; \ 85 rmp->retval = htonl (rv); \ 86 do {body;} while (0); \ 87 vl_msg_api_send_shmem (q, (u8 *)&rmp); \ 90 #define foreach_lacp_plugin_api_msg \ 91 _(SW_INTERFACE_LACP_DUMP, sw_interface_lacp_dump) 102 memset (mp, 0,
sizeof (*mp));
103 mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_LACP_DETAILS + lm->
msg_id_base);
163 #define vl_msg_name_crc_list 165 #undef vl_msg_name_crc_list 170 #define _(id,n,crc) \ 171 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + lm->msg_id_base); 172 foreach_vl_msg_name_crc_lacp;
185 name =
format (0,
"lacp_%08x%c", api_version, 0);
192 vl_msg_api_set_handlers((VL_API_##N + lm->msg_id_base), \ 194 vl_api_##n##_t_handler, \ 196 vl_api_##n##_t_endian, \ 197 vl_api_##n##_t_print, \ 198 sizeof(vl_api_##n##_t), 1);
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)
u16 partner_port_priority
LACP interface details struct.
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]
#define vec_free(V)
Free vector's memory (no header).
#define clib_memcpy(a, b, c)
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
#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)