|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef vpp_api_h_included
19 #define vpp_api_h_included
105 const char *chroot_prefix,
void vapi_set_event_cb(vapi_ctx_t ctx, vapi_msg_id_t id, vapi_event_cb callback, void *callback_ctx)
set event callback to call when message with given id is dispatched
void vapi_clear_generic_event_cb(vapi_ctx_t ctx)
clear generic event callback
vl_api_tunnel_mode_t mode
struct vapi_ctx_s * vapi_ctx_t
void vapi_msg_free(vapi_ctx_t ctx, void *msg)
free a vapi message
vapi_error_e vapi_send(vapi_ctx_t ctx, void *msg)
low-level api for sending messages to vpp
vapi_error_e vapi_ctx_alloc(vapi_ctx_t *result)
allocate vapi context
vapi_error_e vapi_connect(vapi_ctx_t ctx, const char *name, const char *chroot_prefix, int max_outstanding_requests, int response_queue_size, vapi_mode_e mode, bool handle_keepalives)
connect to vpp
unsigned int vapi_msg_id_t
bool vapi_is_msg_available(vapi_ctx_t ctx, vapi_msg_id_t type)
check if message identified by it's message id is known by the vpp to which the connection is open
vapi_error_e vapi_disconnect(vapi_ctx_t ctx)
disconnect from vpp
vapi_error_e(* vapi_event_cb)(vapi_ctx_t ctx, void *callback_ctx, void *payload)
generic vapi event callback
vapi_error_e vapi_dispatch_one(vapi_ctx_t ctx)
pick next message sent by vpp and call the appropriate callback
static const int response_queue_size
void vapi_set_generic_event_cb(vapi_ctx_t ctx, vapi_generic_event_cb callback, void *callback_ctx)
set generic event callback
vapi_error_e vapi_get_fd(vapi_ctx_t ctx, int *fd)
get event file descriptor
void vapi_ctx_free(vapi_ctx_t ctx)
free vapi context
vapi_error_e vapi_send2(vapi_ctx_t ctx, void *msg1, void *msg2)
low-level api for atomically sending two messages to vpp - either both messages are sent or neither o...
void * vapi_msg_alloc(vapi_ctx_t ctx, size_t size)
allocate vapi message of given size
vapi_error_e vapi_dispatch(vapi_ctx_t ctx)
loop vapi_dispatch_one until responses to all currently outstanding requests have been received and t...
vapi_error_e vapi_recv(vapi_ctx_t ctx, void **msg, size_t *msg_size, svm_q_conditional_wait_t cond, u32 time)
low-level api for reading messages from vpp
void vapi_clear_event_cb(vapi_ctx_t ctx, vapi_msg_id_t id)
clear event callback for given message id
vapi_error_e vapi_wait(vapi_ctx_t ctx, vapi_wait_mode_e mode)
wait for connection to become readable or writable
vapi_error_e(* vapi_generic_event_cb)(vapi_ctx_t ctx, void *callback_ctx, vapi_msg_id_t id, void *msg)
generic vapi event callback
static const int max_outstanding_requests
vl_api_fib_path_type_t type