milis/talimatname/genel/pjproject-ring/add_dtls_transport.patch

64 lines
1.4 KiB
Diff

--- 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;