vcl session: propagate cleanup notifications to apps
[vpp.git] / src / vcl / vcl_private.h
index 9116111..fd9d73c 100644 (file)
@@ -375,6 +375,7 @@ vcl_session_alloc (vcl_worker_t * wrk)
 static inline void
 vcl_session_free (vcl_worker_t * wrk, vcl_session_t * s)
 {
+  VDBG (0, "session %u [0x%llx] removed", s->session_index, s->vpp_handle);
   pool_put (wrk->sessions, s);
 }
 
@@ -517,6 +518,14 @@ vcl_session_is_ct (vcl_session_t * s)
   return (s->ct_tx_fifo != 0);
 }
 
+static inline u8
+vcl_session_is_cl (vcl_session_t * s)
+{
+  if (s->session_type == VPPCOM_PROTO_UDP)
+    return 1;
+  return 0;
+}
+
 static inline u8
 vcl_session_is_open (vcl_session_t * s)
 {
@@ -626,6 +635,10 @@ void vppcom_send_application_tls_key_add (vcl_session_t * session, char *key,
 void vcl_send_app_worker_add_del (u8 is_add);
 void vcl_send_child_worker_del (vcl_worker_t * wrk);
 
+int vcl_segment_attach (u64 segment_handle, char *name,
+                       ssvm_segment_type_t type, int fd);
+void vcl_segment_detach (u64 segment_handle);
+
 u32 vcl_max_nsid_len (void);
 
 u8 *format_api_error (u8 * s, va_list * args);