summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-02-21 12:07:41 -0800
committerDave Barach <openvpp@barachs.net>2018-03-02 12:54:31 +0000
commit371ca50a74a9c4f1b74c4c1b65c6fdec610fcfc3 (patch)
tree947e800faa7846223bdf8fb73429c657ddaf5805 /src/vnet/session/application.h
parent9e6356962a0cbb84f7ea9056b954d65aaa231a61 (diff)
session: first approximation implementation of tls
It consists of two main parts. First, add an application transport type whereby applications can offer transport to other applications. For instance, a tls app can offer transport services to other applications. And second, a tls transport app that leverages the mbedtls library for tls protocol implementation. Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838 Signed-off-by: Florin Coras <fcoras@cisco.com>
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_ */