X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvapi%2Fvapi.h;h=2a401c21189560cf9681ff042aa037c93a69779a;hb=dab732a;hp=245bf654e8a535e99f907a26090fbcad806844cb;hpb=dc15be2ca7c51772b00e4c5548934a35aa7e4add;p=vpp.git diff --git a/src/vpp-api/vapi/vapi.h b/src/vpp-api/vapi/vapi.h index 245bf654e8a..2a401c21189 100644 --- a/src/vpp-api/vapi/vapi.h +++ b/src/vpp-api/vapi/vapi.h @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" @@ -95,13 +96,15 @@ extern "C" * @param max_outstanding_requests max number of outstanding requests queued * @param response_queue_size size of the response queue * @param mode mode of operation - blocking or nonblocking + * @param handle_keepalives - if true, automatically handle memclnt_keepalive * * @return VAPI_OK on success, other error code on error */ 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); + int response_queue_size, vapi_mode_e mode, + bool handle_keepalives); /** * @brief disconnect from vpp @@ -162,10 +165,13 @@ extern "C" * @param ctx opaque vapi context * @param[out] msg pointer to result variable containing message * @param[out] msg_size pointer to result variable containing message size + * @param cond enum type for blocking, non-blocking or timed wait call + * @param time in sec for timed wait * * @return VAPI_OK on success, other error code on error */ - vapi_error_e vapi_recv (vapi_ctx_t ctx, void **msg, size_t * msg_size); + vapi_error_e vapi_recv (vapi_ctx_t ctx, void **msg, size_t * msg_size, + svm_q_conditional_wait_t cond, u32 time); /** * @brief wait for connection to become readable or writable