38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 #define foreach_bond_api_msg \ 47 _(BOND_CREATE, bond_create) \ 48 _(BOND_DELETE, bond_delete) \ 49 _(BOND_ENSLAVE, bond_enslave) \ 50 _(BOND_DETACH_SLAVE, bond_detach_slave) \ 51 _(SW_INTERFACE_BOND_DUMP, sw_interface_bond_dump)\ 52 _(SW_INTERFACE_SLAVE_DUMP, sw_interface_slave_dump) 62 memset (mp, 0,
sizeof (*mp));
63 mp->_vl_msg_id = ntohs (VL_API_SW_INTERFACE_EVENT);
78 vl_api_bond_delete_reply_t *rmp;
89 rmp->_vl_msg_id = ntohs (VL_API_BOND_DELETE_REPLY);
91 rmp->retval = ntohl (rv);
107 memset (ap, 0,
sizeof (*ap));
126 rmp->_vl_msg_id = ntohs (VL_API_BOND_CREATE_REPLY);
142 memset (ap, 0,
sizeof (*ap));
156 rmp->_vl_msg_id = ntohs (VL_API_BOND_ENSLAVE_REPLY);
167 vl_api_bond_detach_slave_reply_t *rmp;
171 memset (ap, 0,
sizeof (*ap));
181 rmp->_vl_msg_id = ntohs (VL_API_BOND_DETACH_SLAVE_REPLY);
183 rmp->retval = htonl (ap->
rv);
197 memset (mp, 0,
sizeof (*mp));
198 mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_BOND_DETAILS);
204 mp->
lb = bond_if->
lb;
246 memset (mp, 0,
sizeof (*mp));
247 mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_SLAVE_DETAILS);
285 #define vl_msg_name_crc_list 287 #undef vl_msg_name_crc_list 292 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 293 foreach_vl_msg_name_crc_bond;
303 vl_msg_api_set_handlers(VL_API_##N, #n, \ 304 vl_api_##n##_t_handler, \ 306 vl_api_##n##_t_endian, \ 307 vl_api_##n##_t_print, \ 308 sizeof(vl_api_##n##_t), 1);
static clib_error_t * bond_api_hookup(vlib_main_t *vm)
int bond_delete_if(vlib_main_t *vm, u32 sw_if_index)
static void vl_api_bond_detach_slave_t_handler(vl_api_bond_detach_slave_t *mp)
#define foreach_bond_api_msg
Reply for bond create reply.
int bond_dump_ifs(bond_interface_details_t **out_bondifs)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void vl_api_bond_create_t_handler(vl_api_bond_create_t *mp)
static void vl_api_bond_delete_t_handler(vl_api_bond_delete_t *mp)
void * vl_msg_api_alloc(int nbytes)
static void vl_api_sw_interface_slave_dump_t_handler(vl_api_sw_interface_slave_dump_t *mp)
static void vl_api_sw_interface_bond_dump_t_handler(vl_api_sw_interface_bond_dump_t *mp)
svm_queue_t unix_shared_memory_queue_t
void bond_enslave(vlib_main_t *vm, bond_enslave_args_t *args)
Reply for bond enslave reply.
VLIB_API_INIT_FUNCTION(bond_api_hookup)
static void bond_send_sw_interface_details(vpe_api_main_t *am, vl_api_registration_t *reg, bond_interface_details_t *bond_if, u32 context)
Dump bond interfaces request.
API main structure, used by both vpp and binary API clients.
void bond_detach_slave(vlib_main_t *vm, bond_detach_slave_args_t *args)
Initialize a new bond interface with the given paramters.
An API client registration, only in vpp/vlib.
void vl_msg_api_send_shmem(svm_queue_t *q, u8 *elem)
svm_queue_t * vl_api_client_index_to_input_queue(u32 index)
#define vec_free(V)
Free vector's memory (no header).
static void bond_send_sw_interface_slave_details(vpe_api_main_t *am, vl_api_registration_t *reg, slave_interface_details_t *slave_if, u32 context)
Initialize a new bond interface with the given paramters.
#define clib_memcpy(a, b, c)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
BOND interface details struct.
void bond_create_if(vlib_main_t *vm, bond_create_if_args_t *args)
Reply for bond dump request.
static void bond_setup_message_id_table(api_main_t *am)
static void vl_api_bond_enslave_t_handler(vl_api_bond_enslave_t *mp)
static vlib_main_t * vlib_get_main(void)
Interface Event generated by want_interface_events.
int bond_dump_slave_ifs(slave_interface_details_t **out_slaveifs, u32 bond_sw_if_index)
static void bond_send_sw_interface_event_deleted(vpe_api_main_t *am, unix_shared_memory_queue_t *q, u32 sw_if_index)
slave interface details struct
Reply for slave dump request.
#define vec_foreach(var, vec)
Vector iterator.
vpe_api_main_t vpe_api_main