aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.h
diff options
context:
space:
mode:
authorMaros Ondrejicka <maros.ondrejicka@pantheon.tech>2022-10-06 18:17:05 +0200
committerFlorin Coras <florin.coras@gmail.com>2022-10-06 20:32:43 +0000
commit6ff8e90ed45e25e619f27beee1e0d016234e141e (patch)
treea31ce1f431145ae719473c4bfc1874fcbd31878d /src/vcl/vppcom.h
parent426f8f239fea0ad28d9e8bf4d712e4ae12ce49e0 (diff)
vcl: add api to check if vcl disconnected from vpp
Type: feature Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech> Change-Id: I98bc108360f9d04a33126865ce49d2702cbe9cdf
Diffstat (limited to 'src/vcl/vppcom.h')
-rw-r--r--src/vcl/vppcom.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 6e15cd17cd4..08724cc31d8 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -102,7 +102,8 @@ typedef enum
VPPCOM_ENOPROTOOPT = -ENOPROTOOPT,
VPPCOM_EPIPE = -EPIPE,
VPPCOM_ENOENT = -ENOENT,
- VPPCOM_EADDRINUSE = -EADDRINUSE
+ VPPCOM_EADDRINUSE = -EADDRINUSE,
+ VPPCOM_ENOTSUP = -ENOTSUP
} vppcom_error_t;
typedef enum
@@ -272,6 +273,14 @@ extern int vppcom_worker_mqs_epfd (void);
*/
extern int vppcom_session_get_error (uint32_t session_handle);
+/**
+ * Returns true if current worker is disconnected from vpp
+ *
+ * Application can use this API to check if VPP is disconnected
+ * as long as `use-mq-eventfd` is being set
+ */
+extern int vppcom_worker_is_detached (void);
+
/* *INDENT-OFF* */
#ifdef __cplusplus
}