session: lcl transport info on accept
[vpp.git] / src / vnet / session / application_interface.h
index d3bfb3b..46029f0 100644 (file)
@@ -53,6 +53,9 @@ typedef struct session_cb_vft_
   /** Notify app that session or transport are about to be removed */
   void (*session_cleanup_callback) (session_t * s, session_cleanup_ntf_t ntf);
 
+  /** Notify app that half open state was cleaned up (optional) */
+  void (*half_open_cleanup_callback) (session_t *s);
+
   /** Notify app that session was reset */
   void (*session_reset_callback) (session_t * s);
 
@@ -139,6 +142,9 @@ typedef struct _vnet_connect_args
   u32 app_index;
   u32 wrk_map_index;
   u32 api_context;
+
+  /* Resulting session, or half-open session, if connect successful */
+  session_handle_t sh;
 } vnet_connect_args_t;
 
 typedef struct _vnet_shutdown_args_t
@@ -372,6 +378,7 @@ typedef struct session_accepted_msg_
   u64 segment_handle;
   uword vpp_event_queue_address;
   u32 mq_index;
+  transport_endpoint_t lcl;
   transport_endpoint_t rmt;
   u8 flags;
 } __clib_packed session_accepted_msg_t;