vcl: add apis that expos fifo as buffer
Change-Id: I4bd9c9f73499711e04b38d53daa5c917a4285bf5
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index b5e7532..6346684 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -147,6 +147,14 @@
short *revents;
} vcl_poll_t;
+typedef struct vppcom_data_segment_
+{
+ unsigned char *data;
+ uint32_t len;
+} vppcom_data_segment_t;
+
+typedef vppcom_data_segment_t vppcom_data_segments_t[2];
+
/*
* VPPCOM Public API Functions
*/
@@ -255,6 +263,13 @@
extern int vppcom_mq_epoll_fd (void);
extern int vppcom_session_index (uint32_t session_handle);
+extern int vppcom_session_read_segments (uint32_t session_handle,
+ vppcom_data_segments_t ds);
+extern void vppcom_session_free_segments (uint32_t session_handle,
+ vppcom_data_segments_t ds);
+extern int vppcom_data_segment_copy (void *buf, vppcom_data_segments_t ds,
+ uint32_t max_bytes);
+
/**
* Request from application to register a new worker
*