summaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_private.h5
-rw-r--r--src/vcl/vppcom.c7
-rw-r--r--src/vcl/vppcom.h47
3 files changed, 34 insertions, 25 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index 21853ebdc9a..59bb7621e70 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -542,7 +542,8 @@ static inline u8
vcl_session_has_crypto (vcl_session_t *s)
{
return (s->session_type == VPPCOM_PROTO_TLS ||
- s->session_type == VPPCOM_PROTO_QUIC);
+ s->session_type == VPPCOM_PROTO_QUIC ||
+ s->session_type == VPPCOM_PROTO_DTLS);
}
static inline u8
@@ -608,7 +609,7 @@ vcl_ip_copy_to_ep (ip46_address_t * ip, vppcom_endpt_t * ep, u8 is_ip4)
static inline int
vcl_proto_is_dgram (uint8_t proto)
{
- return proto == VPPCOM_PROTO_UDP;
+ return proto == VPPCOM_PROTO_UDP || proto == VPPCOM_PROTO_DTLS;
}
static inline u8
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 21892438c37..bc83b55d5d0 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1526,6 +1526,10 @@ vppcom_unformat_proto (uint8_t * proto, char *proto_str)
*proto = VPPCOM_PROTO_QUIC;
else if (!strcmp (proto_str, "quic"))
*proto = VPPCOM_PROTO_QUIC;
+ else if (!strcmp (proto_str, "DTLS"))
+ *proto = VPPCOM_PROTO_DTLS;
+ else if (!strcmp (proto_str, "dtls"))
+ *proto = VPPCOM_PROTO_DTLS;
else
return 1;
return 0;
@@ -3933,6 +3937,9 @@ vppcom_proto_str (vppcom_proto_t proto)
case VPPCOM_PROTO_QUIC:
proto_str = "QUIC";
break;
+ case VPPCOM_PROTO_DTLS:
+ proto_str = "DTLS";
+ break;
default:
proto_str = "UNKNOWN";
break;
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 6e3c2784db6..1d2fa5df1ba 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -45,29 +45,30 @@ extern "C"
#define VPPCOM_ENV_VPP_API_SOCKET "VCL_VPP_API_SOCKET"
#define VPPCOM_ENV_VPP_SAPI_SOCKET "VCL_VPP_SAPI_SOCKET"
-typedef enum
-{
- VPPCOM_PROTO_TCP = 0,
- VPPCOM_PROTO_UDP,
- VPPCOM_PROTO_NONE,
- VPPCOM_PROTO_TLS,
- VPPCOM_PROTO_QUIC,
-} vppcom_proto_t;
-
-typedef enum
-{
- VPPCOM_IS_IP6 = 0,
- VPPCOM_IS_IP4,
-} vppcom_is_ip4_t;
-
-typedef struct vppcom_endpt_t_
-{
- uint8_t is_cut_thru;
- uint8_t is_ip4;
- uint8_t *ip;
- uint16_t port;
- uint64_t parent_handle;
-} vppcom_endpt_t;
+ typedef enum
+ {
+ VPPCOM_PROTO_TCP = 0,
+ VPPCOM_PROTO_UDP,
+ VPPCOM_PROTO_NONE,
+ VPPCOM_PROTO_TLS,
+ VPPCOM_PROTO_QUIC,
+ VPPCOM_PROTO_DTLS,
+ } vppcom_proto_t;
+
+ typedef enum
+ {
+ VPPCOM_IS_IP6 = 0,
+ VPPCOM_IS_IP4,
+ } vppcom_is_ip4_t;
+
+ typedef struct vppcom_endpt_t_
+ {
+ uint8_t is_cut_thru;
+ uint8_t is_ip4;
+ uint8_t *ip;
+ uint16_t port;
+ uint64_t parent_handle;
+ } vppcom_endpt_t;
typedef uint32_t vcl_session_handle_t;