aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.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/transport.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/transport.h')
-rw-r--r--src/vnet/session/transport.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 76ee2262ecd..ed9eb02754e 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -25,20 +25,34 @@
*/
typedef struct _transport_connection
{
- ip46_address_t rmt_ip; /**< Remote IP */
- ip46_address_t lcl_ip; /**< Local IP */
- u16 lcl_port; /**< Local port */
- u16 rmt_port; /**< Remote port */
- u8 proto; /**< Protocol id */
- u8 is_ip4; /**< Flag if IP4 connection */
- u32 fib_index; /**< Network namespace */
+ /** Connection ID */
+ union
+ {
+ /*
+ * Network connection ID tuple
+ */
+ struct
+ {
+ ip46_address_t rmt_ip; /**< Remote IP */
+ ip46_address_t lcl_ip; /**< Local IP */
+ u16 lcl_port; /**< Local port */
+ u16 rmt_port; /**< Remote port */
+ u8 proto; /**< Protocol id */
+ u8 is_ip4; /**< Flag if IP4 connection */
+ u32 fib_index; /**< Network namespace */
+ };
+ /*
+ * Opaque connection ID
+ */
+ u8 opaque_conn_id[42];
+ };
u32 s_index; /**< Parent session index */
u32 c_index; /**< Connection index in transport pool */
u32 thread_index; /**< Worker-thread index */
- fib_node_index_t rmt_fei; /**< FIB entry index for rmt */
- dpo_id_t rmt_dpo; /**< Forwarding DPO for rmt */
+ /*fib_node_index_t rmt_fei;
+ dpo_id_t rmt_dpo; */
#if TRANSPORT_DEBUG
elog_track_t elog_track; /**< Event logging */
@@ -64,6 +78,7 @@ typedef struct _transport_connection
#define c_cc_stat_tstamp connection.cc_stat_tstamp
#define c_rmt_fei connection.rmt_fei
#define c_rmt_dpo connection.rmt_dpo
+#define c_opaque_id connection.opaque_conn_id
} transport_connection_t;
typedef enum _transport_proto
@@ -72,6 +87,7 @@ typedef enum _transport_proto
TRANSPORT_PROTO_UDP,
TRANSPORT_PROTO_SCTP,
TRANSPORT_PROTO_NONE,
+ TRANSPORT_PROTO_TLS,
TRANSPORT_N_PROTO
} transport_proto_t;