session: add support for proxying apps
[vpp.git] / src / vnet / session / application_interface.h
index 5e1fe8e..686b418 100644 (file)
@@ -56,11 +56,7 @@ typedef struct _vnet_bind_args_t
   union
   {
     char *uri;
-    struct
-    {
-      session_endpoint_t sep;
-      transport_proto_t proto;
-    };
+    session_endpoint_t sep;
   };
 
   u32 app_index;
@@ -86,23 +82,14 @@ typedef struct _vnet_unbind_args_t
 
 typedef struct _vnet_connect_args
 {
-  union
-  {
-    char *uri;
-    struct
-    {
-      session_endpoint_t sep;
-      transport_proto_t proto;
-    };
-  };
+  char *uri;
+  session_endpoint_t sep;
   u32 app_index;
   u32 api_context;
 
   /* Used for redirects */
   void *mp;
-
-  /* used for proxy connections */
-  u64 server_handle;
+  u64 session_handle;
 } vnet_connect_args_t;
 
 typedef struct _vnet_disconnect_args_t
@@ -121,6 +108,7 @@ typedef enum
   APP_OPTIONS_PRIVATE_SEGMENT_SIZE,
   APP_OPTIONS_NAMESPACE,
   APP_OPTIONS_NAMESPACE_SECRET,
+  APP_OPTIONS_PROXY_TRANSPORT,
   SESSION_OPTIONS_SEGMENT_SIZE,
   SESSION_OPTIONS_ADD_SEGMENT_SIZE,
   SESSION_OPTIONS_RX_FIFO_SIZE,
@@ -133,7 +121,7 @@ typedef enum
 #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")