summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.h
diff options
context:
space:
mode:
authorPing Yu <ping.yu@intel.com>2018-11-30 19:16:17 -0500
committerFlorin Coras <florin.coras@gmail.com>2019-01-04 19:55:47 +0000
commit34a3a08d993cbbb3846b83b69b5338d452463e15 (patch)
tree3613106e74772d42036c0d547aaae81898e5aec2 /src/vcl/vppcom.h
parent33331edd3ab8c2c2109203be7568587664f08abc (diff)
Add TLS support for VCL
Ater this patch, vcl_test_client and vcl_test_server can work happily with TLS connection. "-S" is to indicate TLS connection. Change-Id: I761894b0b5929912691625f0fe63604725b55978 Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src/vcl/vppcom.h')
-rw-r--r--src/vcl/vppcom.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 00527f4ecfb..641946be55a 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -48,6 +48,10 @@ typedef enum
{
VPPCOM_PROTO_TCP = 0,
VPPCOM_PROTO_UDP,
+ VPPCOM_PROTO_SCTP,
+ VPPCOM_PROTO_NONE,
+ VPPCOM_PROTO_TLS,
+ VPPCOM_PROTO_UDPC
} vppcom_proto_t;
static inline char *
@@ -58,10 +62,19 @@ vppcom_proto_str (vppcom_proto_t proto)
switch (proto)
{
case VPPCOM_PROTO_TCP:
- proto_str = "VPPCOM_PROTO_TCP";
+ proto_str = "TCP";
break;
case VPPCOM_PROTO_UDP:
- proto_str = "VPPCOM_PROTO_UDP";
+ proto_str = "UDP";
+ break;
+ case VPPCOM_PROTO_SCTP:
+ proto_str = "SCTP";
+ break;
+ case VPPCOM_PROTO_TLS:
+ proto_str = "TLS";
+ break;
+ case VPPCOM_PROTO_UDPC:
+ proto_str = "UDPC";
break;
default:
proto_str = "UNKNOWN";
@@ -271,6 +284,10 @@ extern int vppcom_session_read_segments (uint32_t session_handle,
vppcom_data_segments_t ds);
extern void vppcom_session_free_segments (uint32_t session_handle,
vppcom_data_segments_t ds);
+extern int vppcom_session_tls_add_cert (uint32_t session_handle, char *cert,
+ uint32_t cert_len);
+extern int vppcom_session_tls_add_key (uint32_t session_handle, char *key,
+ uint32_t key_len);
extern int vppcom_data_segment_copy (void *buf, vppcom_data_segments_t ds,
uint32_t max_bytes);