38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_vpe_api_msg \ 46 _(L2_XCONNECT_DUMP, l2_xconnect_dump) 50 u32 rx_sw_if_index,
u32 tx_sw_if_index)
55 memset (mp, 0,
sizeof (*mp));
56 mp->_vl_msg_id = ntohs (VL_API_L2_XCONNECT_DETAILS);
81 config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
83 send_l2_xconnect_details (q, mp->context, swif->sw_if_index,
84 config->output_sw_if_index);
97 #define vl_msg_name_crc_list 99 #undef vl_msg_name_crc_list 104 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 105 foreach_vl_msg_name_crc_l2;
115 vl_msg_api_set_handlers(VL_API_##N, #n, \ 116 vl_api_##n##_t_handler, \ 118 vl_api_##n##_t_endian, \ 119 vl_api_##n##_t_print, \ 120 sizeof(vl_api_##n##_t), 1);
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
vnet_interface_main_t interface_main
VLIB_API_INIT_FUNCTION(l2_api_hookup)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
Reply to l2_xconnect_dump.
static void send_l2_xconnect_details(unix_shared_memory_queue_t *q, u32 context, u32 rx_sw_if_index, u32 tx_sw_if_index)
vnet_main_t * vnet_get_main(void)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static clib_error_t * l2_api_hookup(vlib_main_t *vm)
void * vl_msg_api_alloc(int nbytes)
static void vl_api_l2_xconnect_dump_t_handler(vl_api_l2_xconnect_dump_t *mp)
#define foreach_vpe_api_msg
static void setup_message_id_table(api_main_t *am)
vnet_sw_interface_t * sw_interfaces
struct _unix_shared_memory_queue unix_shared_memory_queue_t