diff options
author | Stanislav Zaikin <stanislav.zaikin@46labs.com> | 2024-03-06 19:48:30 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2024-03-18 17:30:07 +0000 |
commit | dc4d21e9ce78a77caa7abfe997021cd735863e0f (patch) | |
tree | 17b6636f29b256020eff224cfe7a2b76ad77726e /src/vpp-api/vapi/vapi_common.h | |
parent | 3eb6cbec50a5cbe4c3465d60ba6aea7bf2845cd1 (diff) |
vapi: uds transport support
introduce ability to connect over unix socket instead of shared memory
Type: improvement
Change-Id: Id9042c74e33ad4e418896c4d7ae48bb9106195c9
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi_common.h')
-rw-r--r-- | src/vpp-api/vapi/vapi_common.h | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/src/vpp-api/vapi/vapi_common.h b/src/vpp-api/vapi/vapi_common.h index bf438f7f08d..69b9b788b51 100644 --- a/src/vpp-api/vapi/vapi_common.h +++ b/src/vpp-api/vapi/vapi_common.h @@ -22,30 +22,34 @@ extern "C" { #endif -typedef enum -{ - VAPI_OK = 0, /**< success */ - VAPI_EINVAL, /**< invalid value encountered */ - VAPI_EAGAIN, /**< operation would block */ - VAPI_ENOTSUP, /**< operation not supported */ - VAPI_ENOMEM, /**< out of memory */ - VAPI_ENORESP, /**< no response to request */ - VAPI_EMAP_FAIL, /**< failure while mapping api */ - VAPI_ECON_FAIL, /**< failure while connecting to vpp */ - VAPI_EINCOMPATIBLE, /**< fundamental incompatibility while connecting to vpp - (control ping/control ping reply mismatch) */ - VAPI_MUTEX_FAILURE, /**< failure manipulating internal mutex(es) */ - VAPI_EUSER, /**< user error used for breaking dispatch, - never used by VAPI */ -} vapi_error_e; - -typedef enum -{ - VAPI_MODE_BLOCKING = 1, /**< operations block until response received */ - VAPI_MODE_NONBLOCKING = 2, /**< operations never block */ -} vapi_mode_e; - -typedef unsigned int vapi_msg_id_t; + typedef enum + { + VAPI_OK = 0, /**< success */ + VAPI_EINVAL, /**< invalid value encountered */ + VAPI_EAGAIN, /**< operation would block */ + VAPI_ENOTSUP, /**< operation not supported */ + VAPI_ENOMEM, /**< out of memory */ + VAPI_ENORESP, /**< no response to request */ + VAPI_EMAP_FAIL, /**< failure while mapping api */ + VAPI_ECON_FAIL, /**< failure while connecting to vpp */ + VAPI_EINCOMPATIBLE, /**< fundamental incompatibility while connecting to + vpp (control ping/control ping reply mismatch) */ + VAPI_MUTEX_FAILURE, /**< failure manipulating internal mutex(es) */ + VAPI_EUSER, /**< user error used for breaking dispatch, + never used by VAPI */ + VAPI_ENOTSOCK, /**< vapi socket doesn't refer to a socket */ + VAPI_EACCES, /**< no write permission for socket */ + VAPI_ECONNRESET, /**< connection reset by peer*/ + VAPI_ESOCK_FAILURE, /**< generic socket failure, check errno */ + } vapi_error_e; + + typedef enum + { + VAPI_MODE_BLOCKING = 1, /**< operations block until response received */ + VAPI_MODE_NONBLOCKING = 2, /**< operations never block */ + } vapi_mode_e; + + typedef unsigned int vapi_msg_id_t; #define VAPI_INVALID_MSG_ID ((vapi_msg_id_t)(~0)) |