+/**
+ * User registered callback for when connection arrives on listener created
+ * with vppcom_session_register_listener()
+ * @param uint32_t - newly accepted session_index
+ * @param vppcom_endpt_t* - ip/port information of remote
+ * @param void* - user passed arg to pass back
+ */
+typedef void (*vppcom_session_listener_cb) (uint32_t, vppcom_endpt_t *,
+ void *);
+
+/**
+ * User registered callback for IO events (rx/tx)
+ * @param vppcom_ioevent_t* -
+ * @param void* - user passed arg to pass back
+ */
+typedef void (*vppcom_session_ioevent_cb) (vppcom_ioevent_t *, void *);
+
+/**
+ * User registered ERROR callback for any errors associated with
+ * handling vppcom_session_register_listener() and connections
+ * @param void* - user passed arg to pass back
+ */
+typedef void (*vppcom_session_listener_errcb) (void *);
+
+
+typedef enum vcl_event_id_
+{
+ VCL_EVENT_INVALID_EVENT,
+ VCL_EVENT_CONNECT_REQ_ACCEPTED,
+ VCL_EVENT_IOEVENT_RX_FIFO,
+ VCL_EVENT_IOEVENT_TX_FIFO,
+ VCL_EVENT_N_EVENTS
+} vcl_event_id_t;
+
+/* VPPCOM Event typedefs */
+typedef struct vppcom_session_listener
+{
+ vppcom_session_listener_cb user_cb;
+ vppcom_session_listener_errcb user_errcb;
+ void *user_cb_data;
+} vppcom_session_listener_t;
+
+typedef struct vppcom_session_ioevent_
+{
+ vppcom_session_ioevent_cb user_cb;
+ void *user_cb_data;
+} vppcom_session_ioevent_t;
+
+typedef struct vppcom_session_io_thread_
+{
+ pthread_t thread;
+ pthread_mutex_t vce_io_lock;
+ pthread_cond_t vce_io_cond;
+ u32 *active_session_indexes; //pool
+ vppcom_session_ioevent_t *ioevents; //pool
+ clib_spinlock_t io_sessions_lockp;
+} vppcom_session_io_thread_t;
+
+typedef struct vce_event_connect_request_
+{
+ u32 accepted_session_index;
+} vce_event_connect_request_t;
+