38 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 45 #define foreach_vpe_api_msg \ 46 _(AF_PACKET_CREATE, af_packet_create) \ 47 _(AF_PACKET_DELETE, af_packet_delete) 70 rmp->
sw_if_index = clib_host_to_net_u32(sw_if_index);
100 #define vl_msg_name_crc_list 102 #undef vl_msg_name_crc_list 107 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 108 foreach_vl_msg_name_crc_af_packet;
118 vl_msg_api_set_handlers(VL_API_##N, #n, \ 119 vl_api_##n##_t_handler, \ 121 vl_api_##n##_t_endian, \ 122 vl_api_##n##_t_print, \ 123 sizeof(vl_api_##n##_t), 1); static void vl_api_af_packet_create_t_handler(vl_api_af_packet_create_t *mp)
#define REPLY_MACRO2(t, body)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define foreach_vpe_api_msg
Create host-interface response.
#define vec_free(V)
Free vector's memory (no header).
Delete host-interface response.
VLIB_API_INIT_FUNCTION(af_packet_api_hookup)
static void setup_message_id_table(api_main_t *am)
static vlib_main_t * vlib_get_main(void)
static void vl_api_af_packet_delete_t_handler(vl_api_af_packet_delete_t *mp)
static clib_error_t * af_packet_api_hookup(vlib_main_t *vm)
int af_packet_create_if(vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set, u32 *sw_if_index)
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)