aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-01-06 17:35:17 -0800
committerDave Wallace <dwallacelf@gmail.com>2021-05-25 21:18:54 +0000
commit6621abf49aec6d764e654316ff75274c75d4c1a1 (patch)
tree918ce456d904d3cf192e8f79ba6b8c6609f7129d /src/vcl
parent6bb77dec7074e6b7b27d6bc94238bcddda375a66 (diff)
srtp: basic implementation based on libsrtp2
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic5e99938a5f130e83de6d590d2f89252d055bceb
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_private.h3
-rw-r--r--src/vcl/vppcom.c7
-rw-r--r--src/vcl/vppcom.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index f68ab45171e..628b7310788 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -626,7 +626,8 @@ 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 || proto == VPPCOM_PROTO_DTLS;
+ return proto == VPPCOM_PROTO_UDP || proto == VPPCOM_PROTO_DTLS ||
+ proto == VPPCOM_PROTO_SRTP;
}
static inline u8
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 0713a7b2d33..b3efdcd9817 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1666,6 +1666,10 @@ vppcom_unformat_proto (uint8_t * proto, char *proto_str)
*proto = VPPCOM_PROTO_DTLS;
else if (!strcmp (proto_str, "dtls"))
*proto = VPPCOM_PROTO_DTLS;
+ else if (!strcmp (proto_str, "SRTP"))
+ *proto = VPPCOM_PROTO_SRTP;
+ else if (!strcmp (proto_str, "srtp"))
+ *proto = VPPCOM_PROTO_SRTP;
else
return 1;
return 0;
@@ -4128,6 +4132,9 @@ vppcom_proto_str (vppcom_proto_t proto)
case VPPCOM_PROTO_DTLS:
proto_str = "DTLS";
break;
+ case VPPCOM_PROTO_SRTP:
+ proto_str = "SRTP";
+ break;
default:
proto_str = "UNKNOWN";
break;
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 72e5d46bc8f..ae157ccc8b4 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -53,6 +53,7 @@ extern "C"
VPPCOM_PROTO_TLS,
VPPCOM_PROTO_QUIC,
VPPCOM_PROTO_DTLS,
+ VPPCOM_PROTO_SRTP,
} vppcom_proto_t;
typedef enum