summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application_interface.h')
-rw-r--r--src/vnet/session/application_interface.h45
1 files changed, 33 insertions, 12 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index a5f2b9a6a1a..2c497531533 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -28,6 +28,27 @@ typedef enum _session_api_proto
SESSION_PROTO_UDP
} session_api_proto_t;
+typedef struct _vnet_app_attach_args_t
+{
+ u32 api_client_index;
+ u64 *options;
+ session_cb_vft_t *session_cb_vft;
+
+ /*
+ * Results
+ */
+ u8 *segment_name;
+ u32 segment_name_length;
+ u32 segment_size;
+ u64 app_event_queue_address;
+ u32 app_index;
+} vnet_app_attach_args_t;
+
+typedef struct _vnet_app_detach_args_t
+{
+ u32 app_index;
+} vnet_app_detach_args_t;
+
typedef struct _vnet_bind_args_t
{
union
@@ -40,9 +61,7 @@ typedef struct _vnet_bind_args_t
};
};
- u32 api_client_index;
- u64 *options;
- session_cb_vft_t *session_cb_vft;
+ u32 app_index;
/*
* Results
@@ -60,7 +79,7 @@ typedef struct _vnet_unbind_args_t
char *uri;
u64 handle;
};
- u32 api_client_index;
+ u32 app_index;
} vnet_unbind_args_t;
typedef struct _vnet_connect_args
@@ -74,10 +93,8 @@ typedef struct _vnet_connect_args
session_api_proto_t proto;
};
};
- u32 api_client_index;
+ u32 app_index;
u32 api_context;
- u64 *options;
- session_cb_vft_t *session_cb_vft;
/* Used for redirects */
void *mp;
@@ -86,12 +103,13 @@ typedef struct _vnet_connect_args
typedef struct _vnet_disconnect_args_t
{
u64 handle;
- u32 api_client_index;
+ u32 app_index;
} vnet_disconnect_args_t;
-/* Bind / connect options */
+/* Application attach options */
typedef enum
{
+ APP_EVT_QUEUE_SIZE,
SESSION_OPTIONS_FLAGS,
SESSION_OPTIONS_SEGMENT_SIZE,
SESSION_OPTIONS_ADD_SEGMENT_SIZE,
@@ -99,7 +117,7 @@ typedef enum
SESSION_OPTIONS_TX_FIFO_SIZE,
SESSION_OPTIONS_ACCEPT_COOKIE,
SESSION_OPTIONS_N_OPTIONS
-} session_options_index_t;
+} app_attach_options_index_t;
/** Server can handle delegated connect requests from local clients */
#define SESSION_OPTIONS_FLAGS_USE_FIFO (1<<0)
@@ -109,10 +127,13 @@ typedef enum
#define VNET_CONNECT_REDIRECTED 123
+int vnet_application_attach (vnet_app_attach_args_t * a);
+int vnet_application_detach (vnet_app_detach_args_t * a);
+
int vnet_bind_uri (vnet_bind_args_t *);
-int vnet_unbind_uri (char *uri, u32 api_client_index);
+int vnet_unbind_uri (vnet_unbind_args_t * a);
int vnet_connect_uri (vnet_connect_args_t * a);
-int vnet_disconnect_session (u32 session_index, u32 thread_index);
+int vnet_disconnect_session (vnet_disconnect_args_t * a);
int vnet_bind (vnet_bind_args_t * a);
int vnet_connect (vnet_connect_args_t * a);