session: add support for memfd segments
[vpp.git] / src / vnet / session / application_interface.h
index 0251c3b..8db318f 100644 (file)
@@ -39,9 +39,7 @@ typedef struct _vnet_app_attach_args_t
   /*
    * Results
    */
-  u8 *segment_name;
-  u32 segment_name_length;
-  u32 segment_size;
+  ssvm_private_t *segment;
   u64 app_event_queue_address;
   u32 app_index;
 } vnet_app_attach_args_t;
@@ -101,26 +99,25 @@ typedef struct _vnet_disconnect_args_t
 /* Application attach options */
 typedef enum
 {
-  APP_EVT_QUEUE_SIZE,
   APP_OPTIONS_FLAGS,
-  APP_OPTIONS_PREALLOC_FIFO_PAIRS,
+  APP_OPTIONS_EVT_QUEUE_SIZE,
+  APP_OPTIONS_SEGMENT_SIZE,
+  APP_OPTIONS_ADD_SEGMENT_SIZE,
   APP_OPTIONS_PRIVATE_SEGMENT_COUNT,
-  APP_OPTIONS_PRIVATE_SEGMENT_SIZE,
+  APP_OPTIONS_RX_FIFO_SIZE,
+  APP_OPTIONS_TX_FIFO_SIZE,
+  APP_OPTIONS_PREALLOC_FIFO_PAIRS,
   APP_OPTIONS_NAMESPACE,
   APP_OPTIONS_NAMESPACE_SECRET,
-  SESSION_OPTIONS_SEGMENT_SIZE,
-  SESSION_OPTIONS_ADD_SEGMENT_SIZE,
-  SESSION_OPTIONS_RX_FIFO_SIZE,
-  SESSION_OPTIONS_TX_FIFO_SIZE,
-  SESSION_OPTIONS_PREALLOCATED_FIFO_PAIRS,
-  SESSION_OPTIONS_ACCEPT_COOKIE,
-  SESSION_OPTIONS_N_OPTIONS
+  APP_OPTIONS_PROXY_TRANSPORT,
+  APP_OPTIONS_ACCEPT_COOKIE,
+  APP_OPTIONS_N_OPTIONS
 } app_attach_options_index_t;
 
 #define foreach_app_options_flags                              \
   _(ACCEPT_REDIRECT, "Use FIFO with redirects")                        \
   _(ADD_SEGMENT, "Add segment and signal app if needed")       \
-  _(BUILTIN_APP, "Application is builtin")                     \
+  _(IS_BUILTIN, "Application is builtin")                      \
   _(IS_PROXY, "Application is proxying")                               \
   _(USE_GLOBAL_SCOPE, "App can use global session scope")      \
   _(USE_LOCAL_SCOPE, "App can use local session scope")