gbp: add anonymous l3-out subnets
[vpp.git] / src / vnet / session / session_types.h
index a0d3362..be1111f 100644 (file)
@@ -19,8 +19,6 @@
 #include <svm/svm_fifo.h>
 #include <vnet/session/transport_types.h>
 
-#define SESSION_LISTENER_PREFIX                0x5FFFFFFF
-
 #define foreach_session_endpoint_fields                                \
   foreach_transport_endpoint_cfg_fields                                \
   _(u8, transport_proto)                                       \
@@ -42,6 +40,7 @@ typedef struct _session_endpoint_cfg
   u32 ns_index;
   u8 original_tp;
   u8 *hostname;
+  u64 transport_opts;
 } session_endpoint_cfg_t;
 
 #define SESSION_IP46_ZERO                      \
@@ -128,6 +127,12 @@ typedef enum
   SESSION_STATE_N_STATES,
 } session_state_t;
 
+typedef enum session_flags_
+{
+  SESSION_F_RX_EVT = 1,
+  SESSION_F_PROXY = (1 << 1),
+} session_flags_t;
+
 typedef struct session_
 {
   /** Pointers to rx/tx buffers. Once allocated, these do not move */
@@ -149,8 +154,8 @@ typedef struct session_
   /** Index of the thread that allocated the session */
   u8 thread_index;
 
-  /** Tracks last enqueue epoch to avoid generating multiple enqueue events */
-  u64 enqueue_epoch;
+  /** Session flags. See @ref session_flags_t */
+  u32 flags;
 
   /** Index of the transport connection associated to the session */
   u32 connection_index;
@@ -161,7 +166,7 @@ typedef struct session_
   union
   {
     /** Parent listener session index if the result of an accept */
-    u32 listener_index;
+    session_handle_t listener_handle;
 
     /** App listener index in app's listener pool if a listener */
     u32 al_index;