18 #ifndef vpp_api_h_included 19 #define vpp_api_h_included 105 const char *chroot_prefix,
106 int max_outstanding_requests,
void * vapi_msg_alloc(vapi_ctx_t ctx, size_t size)
allocate vapi message of given size
void vapi_clear_generic_event_cb(vapi_ctx_t ctx)
clear generic event callback
vapi_error_e vapi_disconnect(vapi_ctx_t ctx)
disconnect from vpp
Optimized string handling code, including c11-compliant "safe C library" variants.
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
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_ctx_free(vapi_ctx_t ctx)
free vapi context
vl_api_fib_path_type_t type
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...
vl_api_tunnel_mode_t mode
void vapi_clear_event_cb(vapi_ctx_t ctx, vapi_msg_id_t id)
clear event callback for given message id
struct vapi_ctx_s * vapi_ctx_t
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
void vapi_msg_free(vapi_ctx_t ctx, void *msg)
free a vapi message
vapi_error_e vapi_ctx_alloc(vapi_ctx_t *result)
allocate vapi context
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_dispatch_one(vapi_ctx_t ctx)
pick next message sent by vpp and call the appropriate callback
vapi_error_e(* vapi_event_cb)(vapi_ctx_t ctx, void *callback_ctx, void *payload)
generic vapi event callback
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_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
unsigned int vapi_msg_id_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
vapi_error_e vapi_send(vapi_ctx_t ctx, void *msg)
low-level api for sending messages to vpp