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) \ 48 _(AF_PACKET_SET_L4_CKSUM_OFFLOAD, af_packet_set_l4_cksum_offload) 71 rmp->
sw_if_index = clib_host_to_net_u32(sw_if_index);
80 vl_api_af_packet_delete_reply_t *rmp;
99 vl_api_af_packet_delete_reply_t *rmp;
103 REPLY_MACRO (VL_API_AF_PACKET_SET_L4_CKSUM_OFFLOAD_REPLY);
113 #define vl_msg_name_crc_list 115 #undef vl_msg_name_crc_list 120 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 121 foreach_vl_msg_name_crc_af_packet;
131 vl_msg_api_set_handlers(VL_API_##N, #n, \ 132 vl_api_##n##_t_handler, \ 134 vl_api_##n##_t_endian, \ 135 vl_api_##n##_t_print, \ 136 sizeof(vl_api_##n##_t), 1); static void vl_api_af_packet_create_t_handler(vl_api_af_packet_create_t *mp)
Set l4 offload ckecksum calculation.
int af_packet_set_l4_cksum_offload(vlib_main_t *vm, u32 sw_if_index, u8 set)
#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.
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
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)
static void vl_api_af_packet_set_l4_cksum_offload_t_handler(vl_api_af_packet_set_l4_cksum_offload_t *mp)
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)