|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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) \
49 _(AF_PACKET_DUMP, af_packet_dump)
57 u8 *host_if_name = NULL;
81 vl_api_af_packet_delete_reply_t *rmp;
83 u8 *host_if_name = NULL;
100 vl_api_af_packet_delete_reply_t *rmp;
104 REPLY_MACRO (VL_API_AF_PACKET_SET_L4_CKSUM_OFFLOAD_REPLY);
115 mp->_vl_msg_id = htons (VL_API_AF_PACKET_DETAILS);
158 #define vl_msg_name_crc_list
160 #undef vl_msg_name_crc_list
165 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
166 foreach_vl_msg_name_crc_af_packet;
176 vl_msg_api_set_handlers(VL_API_##N, #n, \
177 vl_api_##n##_t_handler, \
179 vl_api_##n##_t_endian, \
180 vl_api_##n##_t_print, \
181 sizeof(vl_api_##n##_t), 1);
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static void vl_api_af_packet_set_l4_cksum_offload_t_handler(vl_api_af_packet_set_l4_cksum_offload_t *mp)
#define REPLY_MACRO2(t, body)
#define clib_memcpy(d, s, n)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static void setup_message_id_table(api_main_t *am)
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)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Set l4 offload checksum calculation.
static void vl_api_af_packet_delete_t_handler(vl_api_af_packet_delete_t *mp)
Reply for af_packet dump request.
vl_api_mac_address_t hw_addr
vl_api_interface_index_t sw_if_index
static void af_packet_send_details(vpe_api_main_t *am, vl_api_registration_t *reg, af_packet_if_detail_t *af_packet_if, u32 context)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)
#define foreach_vpe_api_msg
An API client registration, only in vpp/vlib.
static void vl_api_af_packet_dump_t_handler(vl_api_af_packet_dump_t *mp)
static api_main_t * vlibapi_get_main(void)
vl_api_interface_index_t sw_if_index
VLIB_API_INIT_FUNCTION(af_packet_api_hookup)
vl_api_interface_index_t sw_if_index
int af_packet_set_l4_cksum_offload(vlib_main_t *vm, u32 sw_if_index, u8 set)
API main structure, used by both vpp and binary API clients.
int af_packet_dump_ifs(af_packet_if_detail_t **out_af_packet_ifs)
#define vec_free(V)
Free vector's memory (no header).
description fragment has unexpected format
#define vec_foreach(var, vec)
Vector iterator.
static void vl_api_af_packet_create_t_handler(vl_api_af_packet_create_t *mp)
Dump af_packet interfaces request.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static vlib_main_t * vlib_get_main(void)
Create host-interface response.
vl_api_interface_index_t sw_if_index
vpe_api_main_t vpe_api_main
void * vl_msg_api_alloc(int nbytes)