18 #ifndef VAPI_INTERNAL_H 19 #define VAPI_INTERNAL_H 41 typedef struct __attribute__ ((__packed__))
47 typedef struct __attribute__ ((__packed__))
57 h->_vl_msg_id = htobe16 (h->_vl_msg_id);
63 h->_vl_msg_id = be16toh (h->_vl_msg_id);
69 h->_vl_msg_id = htobe16 (h->_vl_msg_id);
75 h->_vl_msg_id = be16toh (h->_vl_msg_id);
106 void (*swap_to_be) (
void *payload);
107 void (*swap_to_host) (
void *payload);
static void vapi_type_msg_header1_t_hton(vapi_type_msg_header1_t *h)
int vapi_get_payload_offset(vapi_msg_id_t id)
static void vapi_type_msg_header2_t_hton(vapi_type_msg_header2_t *h)
vapi_error_e vapi_producer_unlock(vapi_ctx_t ctx)
size_t vapi_get_request_count(vapi_ctx_t ctx)
bool vapi_is_nonblocking(vapi_ctx_t ctx)
bool vapi_requests_full(vapi_ctx_t ctx)
int vapi_get_client_index(vapi_ctx_t ctx)
void(*)(void *payload) vapi_get_swap_to_host_func(vapi_msg_id_t id)
vapi_error_e vapi_producer_lock(vapi_ctx_t ctx)
vapi_msg_id_t vapi_register_msg(vapi_message_desc_t *msg)
bool vapi_requests_empty(vapi_ctx_t ctx)
const char * name_with_crc
common vpp api C declarations
size_t vapi_get_max_request_count(vapi_ctx_t ctx)
size_t vapi_get_context_offset(vapi_msg_id_t id)
size_t vapi_get_message_size(vapi_msg_id_t id)
vapi_error_e(* vapi_cb_t)(struct vapi_ctx_s *, void *, vapi_error_e, bool, void *)
u32 vapi_gen_req_context(vapi_ctx_t ctx)
u16 vapi_lookup_vl_msg_id(vapi_ctx_t ctx, vapi_msg_id_t id)
static void vapi_type_msg_header2_t_ntoh(vapi_type_msg_header2_t *h)
vapi_msg_id_t vapi_lookup_vapi_msg_id_t(vapi_ctx_t ctx, u16 vl_msg_id)
void(*)(void *payload) vapi_get_swap_to_be_func(vapi_msg_id_t id)
generic_swap_fn_t swap_to_host
generic_swap_fn_t swap_to_be
size_t vapi_get_message_count()
void vapi_store_request(vapi_ctx_t ctx, u32 context, bool is_dump, vapi_cb_t callback, void *callback_ctx)
const char * vapi_get_msg_name(vapi_msg_id_t id)
bool vapi_msg_is_with_context(vapi_msg_id_t id)
void(* generic_swap_fn_t)(void *payload)
static void vapi_type_msg_header1_t_ntoh(vapi_type_msg_header1_t *h)