aboutsummaryrefslogtreecommitdiff
path: root/libraries/pjproject-ring/patches/add_dtls_transport.patch
blob: b7f9f296e794354bc299092b6d3cc7e5e2d5d3a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- a/pjsip/src/pjsip/sip_transport.c
+++ b/pjsip/src/pjsip/sip_transport.c
@@ -183,6 +183,13 @@
 	PJSIP_TRANSPORT_RELIABLE | PJSIP_TRANSPORT_SECURE
     },
     { 
+    PJSIP_TRANSPORT_DTLS,
+	5061, 
+	{"DTLS", 4}, 
+	"DTLS transport", 
+	PJSIP_TRANSPORT_SECURE
+    },
+    { 
 	PJSIP_TRANSPORT_SCTP, 
 	5060, 
 	{"SCTP", 4}, 
@@ -224,6 +231,13 @@
 	"TLS IPv6 transport",
 	PJSIP_TRANSPORT_RELIABLE | PJSIP_TRANSPORT_SECURE
     },
+    {
+	PJSIP_TRANSPORT_DTLS6,
+	5061,
+	{"DTLS", 4},
+	"DTLS IPv6 transport",
+	PJSIP_TRANSPORT_SECURE
+    },
 };
 
 static void tp_state_callback(pjsip_transport *tp,
@@ -249,7 +263,7 @@
  */
 PJ_DEF(pj_status_t) pjsip_transport_register_type( unsigned tp_flag,
 						   const char *tp_name,
-						   int def_port,
+                           int def_port,
 						   int *p_tp_type)
 {
     unsigned i;
--- a/pjsip/include/pjsip/sip_types.h
+++ b/pjsip/include/pjsip/sip_types.h
@@ -73,6 +73,9 @@
     /** TLS. */
     PJSIP_TRANSPORT_TLS,
 
+    /** DTLS. */
+    PJSIP_TRANSPORT_DTLS,
+
     /** SCTP. */
     PJSIP_TRANSPORT_SCTP,
 
@@ -95,7 +98,10 @@
     PJSIP_TRANSPORT_TCP6 = PJSIP_TRANSPORT_TCP + PJSIP_TRANSPORT_IPV6,
 
     /** TLS over IPv6 */
-    PJSIP_TRANSPORT_TLS6 = PJSIP_TRANSPORT_TLS + PJSIP_TRANSPORT_IPV6
+    PJSIP_TRANSPORT_TLS6 = PJSIP_TRANSPORT_TLS + PJSIP_TRANSPORT_IPV6,
+
+    /** DTLS over IPv6 */
+    PJSIP_TRANSPORT_DTLS6 = PJSIP_TRANSPORT_DTLS + PJSIP_TRANSPORT_IPV6
 
 } pjsip_transport_type_e;