aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r--src/vnet/session/application.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index 6fb0f066ad3..8e5c2de0494 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -20,12 +20,6 @@
#include <vnet/session/session.h>
#include <vnet/session/segment_manager.h>
#include <vnet/session/application_namespace.h>
-typedef enum
-{
- APP_SERVER,
- APP_CLIENT,
- APP_N_TYPES
-} application_type_t;
typedef struct _stream_session_cb_vft
{
@@ -49,8 +43,11 @@ typedef struct _stream_session_cb_vft
/** Notify app that session was reset */
void (*session_reset_callback) (stream_session_t * s);
- /** Direct RX callback, for built-in servers */
- int (*builtin_server_rx_callback) (stream_session_t * session);
+ /** Direct RX callback for built-in application */
+ int (*builtin_app_rx_callback) (stream_session_t * session);
+
+ /** Direct TX callback for built-in application */
+ int (*builtin_app_tx_callback) (stream_session_t * session);
} session_cb_vft_t;
@@ -118,6 +115,16 @@ typedef struct _application
/** Hash table of the app's local connects */
uword *local_connects;
+
+ /*
+ * TLS Specific
+ */
+
+ /** Certificate to be used for listen sessions */
+ u8 *tls_cert;
+
+ /** PEM encoded key */
+ u8 *tls_key;
} application_t;
#define APP_INVALID_INDEX ((u32)~0)
@@ -152,6 +159,8 @@ segment_manager_t *application_get_listen_segment_manager (application_t *
ls);
segment_manager_t *application_get_connect_segment_manager (application_t *
app);
+int application_alloc_connects_segment_manager (application_t * app);
+
int application_is_proxy (application_t * app);
int application_is_builtin (application_t * app);
int application_is_builtin_proxy (application_t * app);
@@ -245,6 +254,13 @@ application_local_session_listener_has_transport (local_session_t * ls)
return (tp != TRANSPORT_PROTO_NONE);
}
+void send_local_session_disconnect_callback (u32 app_index,
+ local_session_t * ls);
+
+int application_connect (u32 client_index, u32 api_context,
+ session_endpoint_t * sep);
+
+uword unformat_application_proto (unformat_input_t * input, va_list * args);
#endif /* SRC_VNET_SESSION_APPLICATION_H_ */