35 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 42 #define foreach_vpe_api_msg \ 43 _(P2P_ETHERNET_ADD, p2p_ethernet_add) \ 44 _(P2P_ETHERNET_DEL, p2p_ethernet_del) 55 u32 p2pe_if_index = ~0;
60 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
65 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX_2;
98 rv = VNET_API_ERROR_INVALID_SW_IF_INDEX;
116 #define vl_msg_name_crc_list 118 #undef vl_msg_name_crc_list 123 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 124 foreach_vl_msg_name_crc_p2p_ethernet;
134 vl_msg_api_set_handlers(VL_API_##N, #n, \ 135 vl_api_##n##_t_handler, \ 137 vl_api_##n##_t_endian, \ 138 vl_api_##n##_t_print, \ 139 sizeof(vl_api_##n##_t), 1); void vl_api_p2p_ethernet_del_t_handler(vl_api_p2p_ethernet_del_t *mp)
Create a point-to-point (p2p) Ethernet sub-interface.
Delete a point-to-point (p2p) Ethernet sub-interface.
#define REPLY_MACRO2(t, body)
static void setup_message_id_table(api_main_t *am)
#define clib_memcpy(d, s, n)
vl_api_interface_index_t parent_if_index
vl_api_mac_address_t remote_mac
VLIB_API_INIT_FUNCTION(p2p_ethernet_api_hookup)
vl_api_interface_index_t parent_if_index
int p2p_ethernet_add_del(vlib_main_t *vm, u32 parent_if_index, u8 *client_mac, u32 p2pe_subif_id, int is_add, u32 *p2pe_if_index)
vl_api_interface_index_t sw_if_index
API main structure, used by both vpp and binary API clients.
#define BAD_SW_IF_INDEX_LABEL
static uword vnet_sw_if_index_is_api_valid(u32 sw_if_index)
vl_api_mac_address_t remote_mac
#define foreach_vpe_api_msg
static vlib_main_t * vlib_get_main(void)
void vl_api_p2p_ethernet_add_t_handler(vl_api_p2p_ethernet_add_t *mp)
static clib_error_t * p2p_ethernet_api_hookup(vlib_main_t *vm)
static api_main_t * vlibapi_get_main(void)