Commit dce7e163 authored by Guillaume Beraudo's avatar Guillaume Beraudo

Merge branch 'master' of git://git.linphone.org/ortp into zrtp

Conflicts:
	src/ortp_srtp.c
parents 0bcc03ea 39efbc68
This diff is collapsed.
December 22th, 2011: ortp-0.18.0
- SRTP media encryption
May XXth, 2011: ortp-0.17.0
- RTCP support fixes
- add rtp_session_get_round_trip_propagation()
March 28th, 2011: ortp-0.16.5
- optimisations in session-set intersection computation
......

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oRTP", "oRTP.vcproj", "{4A07BB2B-F56E-4F1B-A719-D28B782AC128}"
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oRTP", "oRTP.vcxproj", "{4A07BB2B-F56E-4F1B-A719-D28B782AC128}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......
......@@ -210,10 +210,18 @@
RelativePath="..\..\src\jitterctl.c"
>
</File>
<File
RelativePath="..\..\src\netsim.c"
>
</File>
<File
RelativePath="..\..\src\ortp.c"
>
</File>
<File
RelativePath="..\..\src\ortp_srtp.c"
>
</File>
<File
RelativePath="..\..\src\payloadtype.c"
>
......@@ -312,6 +320,10 @@
RelativePath="..\..\include\ortp\ortp.h"
>
</File>
<File
RelativePath="..\..\include\ortp\ortp_srtp.h"
>
</File>
<File
RelativePath="..\..\include\ortp\payloadtype.h"
>
......@@ -356,10 +368,6 @@
RelativePath="..\..\include\ortp\sessionset.h"
>
</File>
<File
RelativePath="..\..\include\ortp\srtp.h"
>
</File>
<File
RelativePath="..\..\include\ortp\str_utils.h"
>
......
LIBRARY ortp
EXPORTS
ortp_init
ortp_scheduler_init
ortp_exit
ortp_get_scheduler
ortp_set_log_file
ortp_set_log_level_mask
ortp_logv_out
ortp_set_log_handler
ortp_strdup_printf
ortp_logv
ortp_get_global_stats
ortp_global_stats_display
session_set_new
session_set_select
session_set_destroy
rtp_stats_display
rtp_session_get_stats
rtp_session_init
rtp_session_new
rtp_session_set_scheduling_mode
rtp_session_set_blocking_mode
rtp_session_set_profile
rtp_session_get_profile
rtp_session_set_data
rtp_session_set_ssrc_changed_threshold
rtp_session_signal_connect
rtp_session_signal_disconnect_by_callback
rtp_session_set_ssrc
rtp_session_set_seq_number
rtp_session_get_seq_number
rtp_session_set_jitter_compensation
rtp_session_set_local_addr
rtp_session_set_remote_addr
rtp_session_enable_adaptive_jitter_compensation
rtp_session_set_recv_buf_size
rtp_session_send_with_ts
rtp_session_sendm_with_ts
rtp_session_set_sockets
rtp_session_get_rtp_socket
rtp_session_get_rtcp_socket
rtp_session_set_payload_type
rtp_session_get_send_profile
rtp_session_set_send_payload_type
rtp_session_get_send_payload_type
rtp_session_set_recv_payload_type
rtp_session_get_recv_payload_type
rtp_session_enable_network_simulation
rtp_session_recv_with_ts
rtp_session_recvm_with_ts
rtp_session_create_packet
rtp_session_get_current_send_ts
rtp_session_get_current_recv_ts
rtp_session_reset
rtp_session_uninit
rtp_session_destroy
rtp_add_csrc
rtp_session_send_dtmf
rtp_session_add_telephone_event
rtp_session_create_telephone_event_packet
rtp_session_set_source_description
rtp_session_set_symmetric_rtp
rtp_profile_new
rtp_profile_set_payload
rtp_profile_clone_full
rtp_profile_destroy
rtp_profile_get_payload_from_rtpmap
rtp_profile_get_payload_from_mime
payload_type_set_send_fmtp
payload_type_clone
fmtp_get_value
ortp_free
ortp_malloc
ortp_strdup
ortp_realloc
ortp_malloc0
freemsg
dupmsg
allocb
getq
putq
msgpullup
qinit
flushq
msgdsize
peekq
freeb
dupb
concatb
esballoc
copyb
copymsg
WIN_thread_create
WIN_thread_join
WIN_cond_init
WIN_mutex_init
WIN_mutex_unlock
WIN_cond_wait
WIN_mutex_lock
WIN_cond_destroy
WIN_mutex_destroy
WIN_cond_signal
__ortp_log_mask
rtp_session_register_event_queue
rtp_session_unregister_event_queue
ortp_ev_queue_new
ortp_ev_queue_flush
ortp_ev_queue_get
ortp_ev_queue_destroy
ortp_event_get_type
ortp_event_get_data
ortp_event_destroy
stunParseHostName
stunParseServerName
sendMessage
stunEncodeMessage
stunBuildReqSimple
stunParseMessage
stunServerProcessMsg
stunNatType
stunTest
stunOpenSocket
stunOpenSocketPair
stunCalculateIntegrity_shortterm
stunCalculateIntegrity_longterm
stunCalculateFingerprint
getWinSocketError
rtp_session_set_transports
rtp_session_set_dscp
rtp_session_compute_recv_bandwidth
rtp_session_compute_send_bandwidth
rtcp_next_packet
rtcp_is_SDES
rtcp_sdes_parse
rtcp_is_SR
rtcp_SR_get_ssrc
rtcp_SR_get_report_block
rtcp_SR_get_sender_info
rtcp_is_RR
rtcp_RR_get_ssrc
rtcp_RR_get_report_block
rtcp_is_BYE
rtcp_BYE_get_ssrc
rtcp_BYE_get_reason
rtcp_is_APP
rtcp_APP_get_subtype
rtcp_APP_get_ssrc
rtcp_APP_get_name
rtcp_APP_get_data
rtp_session_flush_sockets
rtp_session_resync
rtp_session_set_remote_addr_and_port
rtp_session_set_time_jump_limit
rtp_session_enable_rtcp
rtp_session_enable_jitter_buffer
rtp_session_set_rtp_socket_recv_buffer_size
rtp_session_set_rtp_socket_send_buffer_size
rtp_session_set_jitter_buffer_params
rtp_session_get_round_trip_propagation
rtp_session_set_rtcp_report_interval
rtp_get_payload
rtp_get_extheader
rtp_session_set_remote_addr_full
rtp_session_send_rtcp_APP
b64_decode
b64_encode
payload_type_new
payload_type_set_recv_fmtp
rtp_session_get_local_port
rtp_session_get_jitter_buffer_params
turnAllocateSocketPair
ortp_shm_open
ortp_shm_close
ortp_pipe_read
ortp_pipe_write
ortp_client_pipe_connect
ortp_client_pipe_close
ortp_file_exist
ortp_zrtp_available
ortp_zrtp_context_new
ortp_zrtp_multistream_new
ortp_zrtp_sas_verified
ortp_zrtp_sas_reset_verified
ortp_zrtp_context_destroy
\ No newline at end of file
LIBRARY ortp
EXPORTS
ortp_init
ortp_scheduler_init
ortp_exit
ortp_get_scheduler
ortp_set_log_file
ortp_set_log_level_mask
ortp_logv_out
ortp_set_log_handler
ortp_strdup_printf
ortp_logv
ortp_get_global_stats
ortp_global_stats_display
session_set_new
session_set_select
session_set_destroy
rtp_stats_display
rtp_session_get_stats
rtp_session_init
rtp_session_new
rtp_session_set_scheduling_mode
rtp_session_set_blocking_mode
rtp_session_set_profile
rtp_session_get_profile
rtp_session_set_data
rtp_session_set_ssrc_changed_threshold
rtp_session_signal_connect
rtp_session_signal_disconnect_by_callback
rtp_session_set_ssrc
rtp_session_set_seq_number
rtp_session_get_seq_number
rtp_session_set_jitter_compensation
rtp_session_set_local_addr
rtp_session_set_remote_addr
rtp_session_enable_adaptive_jitter_compensation
rtp_session_set_recv_buf_size
rtp_session_send_with_ts
rtp_session_sendm_with_ts
rtp_session_set_sockets
rtp_session_get_rtp_socket
rtp_session_get_rtcp_socket
rtp_session_set_payload_type
rtp_session_get_send_profile
rtp_session_set_send_payload_type
rtp_session_get_send_payload_type
rtp_session_set_recv_payload_type
rtp_session_get_recv_payload_type
rtp_session_recv_with_ts
rtp_session_recvm_with_ts
rtp_session_create_packet
rtp_session_get_current_send_ts
rtp_session_get_current_recv_ts
rtp_session_reset
rtp_session_uninit
rtp_session_destroy
rtp_add_csrc
rtp_session_send_dtmf
rtp_session_add_telephone_event
rtp_session_create_telephone_event_packet
rtp_session_set_source_description
rtp_session_set_symmetric_rtp
rtp_profile_new
rtp_profile_set_payload
rtp_profile_clone_full
rtp_profile_destroy
rtp_profile_get_payload_from_rtpmap
rtp_profile_get_payload_from_mime
payload_type_set_send_fmtp
payload_type_clone
fmtp_get_value
ortp_free
ortp_malloc
ortp_strdup
ortp_realloc
ortp_malloc0
freemsg
dupmsg
allocb
getq
putq
msgpullup
qinit
flushq
msgdsize
peekq
freeb
dupb
concatb
esballoc
copyb
copymsg
WIN_thread_create
WIN_thread_join
WIN_cond_init
WIN_mutex_init
WIN_mutex_unlock
WIN_cond_wait
WIN_mutex_lock
WIN_cond_destroy
WIN_mutex_destroy
WIN_cond_signal
__ortp_log_mask
rtp_session_register_event_queue
rtp_session_unregister_event_queue
ortp_ev_queue_new
ortp_ev_queue_flush
ortp_ev_queue_get
ortp_ev_queue_destroy
ortp_event_get_type
ortp_event_get_data
ortp_event_destroy
stunParseHostName
stunParseServerName
sendMessage
stunEncodeMessage
stunBuildReqSimple
stunParseMessage
stunServerProcessMsg
stunNatType
stunTest
stunOpenSocket
stunOpenSocketPair
stunCalculateIntegrity_shortterm
stunCalculateIntegrity_longterm
stunCalculateFingerprint
getWinSocketError
rtp_session_set_transports
rtp_session_set_dscp
rtp_session_compute_recv_bandwidth
rtp_session_compute_send_bandwidth
rtcp_next_packet
rtcp_is_SDES
rtcp_sdes_parse
rtcp_is_SR
rtcp_SR_get_ssrc
rtcp_SR_get_report_block
rtcp_SR_get_sender_info
rtcp_is_RR
rtcp_RR_get_ssrc
rtcp_RR_get_report_block
rtcp_is_BYE
rtcp_BYE_get_ssrc
rtcp_BYE_get_reason
rtcp_is_APP
rtcp_APP_get_subtype
rtcp_APP_get_ssrc
rtcp_APP_get_name
rtcp_APP_get_data
rtp_session_flush_sockets
rtp_session_resync
rtp_session_set_remote_addr_and_port
rtp_session_set_time_jump_limit
rtp_session_enable_rtcp
rtp_session_enable_jitter_buffer
rtp_session_set_rtp_socket_recv_buffer_size
rtp_session_set_rtp_socket_send_buffer_size
rtp_session_set_jitter_buffer_params
rtp_session_get_round_trip_propagation
rtp_session_set_rtcp_report_interval
rtp_get_payload
rtp_get_extheader
rtp_session_set_remote_addr_full
rtp_session_send_rtcp_APP
b64_decode
b64_encode
payload_type_new
payload_type_set_recv_fmtp
rtp_session_get_local_port
rtp_session_get_jitter_buffer_params
turnAllocateSocketPair
ortp_shm_open
ortp_shm_close
ortp_pipe_read
ortp_pipe_write
ortp_client_pipe_connect
ortp_client_pipe_close
ortp_file_exist
ortp_zrtp_available
ortp_zrtp_context_new
ortp_zrtp_multistream_new
ortp_zrtp_sas_verified
ortp_zrtp_sas_reset_verified
ortp_zrtp_context_destroy
srtp_transport_new
ortp_srtp_init
rtp_session_get_send_ssrc
ortp_srtp_create_configure_session
rtp_session_get_send_ssrc
ortp_srtp_supported
rtp_session_pick_with_cseq
rtp_session_enable_network_simulation
ortp_crypto_get_random
dnl Process this file with autoconf to produce a configure script.
AC_INIT([ortp],[0.17.0])
AC_INIT([ortp],[0.18.0])
AC_CANONICAL_SYSTEM
dnl Source packaging numbers
......@@ -302,7 +302,7 @@ AC_ARG_ENABLE(ssl-hmac,
no) ssl_hmac_enabled=no;;
*) AC_MSG_ERROR("Bad value for --enable-ssl-hmac");;
esac],
[ssl_hmac_enabled=yes])
[ssl_hmac_enabled=no])
if test "$ssl_hmac_enabled" = "yes" ; then
AC_CHECK_HEADERS(openssl/hmac.h openssl/md5.h)
......
......@@ -92,6 +92,7 @@ typedef struct _RtpTransport
int (*t_sendto)(struct _RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen);
int (*t_recvfrom)(struct _RtpTransport *t, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen);
struct _RtpSession *session;//<back pointer to the owning session, set by oRTP
void (*t_close)(struct _RtpTransport *transport, void *userData);
} RtpTransport;
typedef struct _OrtpNetworkSimulatorParams{
......
......@@ -12,7 +12,7 @@
Summary: Real-time Transport Protocol Stack
Name: ortp
Version: @ORTP_PKGCONFIG_VERSION@
Release: 1
Release: 2
License: LGPL
Group: Applications/Communications
URL: http://linphone.org/ortp/
......
......@@ -30,7 +30,6 @@
#undef PACKAGE_VERSION
#include "ortp/ortp_srtp.h"
#ifdef HAVE_SRTP
#include "ortp/b64.h"
......@@ -138,14 +137,14 @@ srtcp_getsocket(RtpTransport *t)
**/
int srtp_transport_new(srtp_t srtp, RtpTransport **rtpt, RtpTransport **rtcpt ){
if (rtpt) {
(*rtpt)=ortp_new(RtpTransport,1);
(*rtpt)=ortp_new0(RtpTransport,1);
(*rtpt)->data=srtp;
(*rtpt)->t_getsocket=srtp_getsocket;
(*rtpt)->t_sendto=srtp_sendto;
(*rtpt)->t_recvfrom=srtp_recvfrom;
}
if (rtcpt) {
(*rtcpt)=ortp_new(RtpTransport,1);
(*rtcpt)=ortp_new0(RtpTransport,1);
(*rtcpt)->data=srtp;
(*rtcpt)->t_getsocket=srtcp_getsocket;
(*rtcpt)->t_sendto=srtcp_sendto;
......@@ -193,14 +192,17 @@ static bool_t ortp_init_srtp_policy(srtp_t srtp, srtp_policy_t* policy, enum ort
crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy->rtp);
// srtp doc says: not adapted to rtcp...
crypto_policy_set_aes_cm_128_hmac_sha1_32(&policy->rtcp);
break;
case AES_128_NO_AUTH:
crypto_policy_set_aes_cm_128_null_auth(&policy->rtp);
// srtp doc says: not adapted to rtcp...
crypto_policy_set_aes_cm_128_null_auth(&policy->rtcp);
break;
case NO_CIPHER_SHA1_80:
crypto_policy_set_null_cipher_hmac_sha1_80(&policy->rtp);
crypto_policy_set_null_cipher_hmac_sha1_80(&policy->rtcp);
case AES_128_SHA1_80:
break;
case AES_128_SHA1_80: /*default mode*/
default:
crypto_policy_set_rtp_default(&policy->rtp);
crypto_policy_set_rtcp_default(&policy->rtcp);
......
......@@ -63,7 +63,7 @@ const rtcp_common_header_t * rtcp_get_common_header(const mblk_t *m){
bool_t rtcp_is_SR(const mblk_t *m){
const rtcp_common_header_t *ch=rtcp_get_common_header(m);
if (ch!=NULL && rtcp_common_header_get_packet_type(ch)==RTCP_SR){
if (msgdsize(m)<sizeof(rtcp_sr_t)){
if (msgdsize(m)<(sizeof(rtcp_sr_t)-sizeof(report_block_t))){
ortp_warning("Too short RTCP SR packet.");
return FALSE;
}
......
......@@ -1326,8 +1326,13 @@ void rtp_session_release_sockets(RtpSession *session){
if (session->rtcp.socket!=(ortp_socket_t)-1) close_socket (session->rtcp.socket);
session->rtp.socket=-1;
session->rtcp.socket=-1;
if (session->rtp.tr && session->rtp.tr->t_close)
session->rtp.tr->t_close(session->rtp.tr, session->rtp.tr->data);
session->rtp.tr = 0;
if (session->rtcp.tr && session->rtcp.tr->t_close)
session->rtcp.tr->t_close(session->rtcp.tr, session->rtcp.tr->data);
session->rtcp.tr = 0;
/* don't discard remote addresses, then can be preserved for next use.
......
......@@ -1085,7 +1085,8 @@ static void process_rtcp_packet( RtpSession *session, mblk_t *block ) {
/* compound rtcp packet can be composed by more than one rtcp message */
do{
struct timeval reception_date;
const report_block_t *rb;
/* Getting the reception date from the main clock */
gettimeofday( &reception_date, NULL );
......@@ -1114,9 +1115,10 @@ static void process_rtcp_packet( RtpSession *session, mblk_t *block ) {
/* This value will help in processing the DLSR of the next RTCP report ( see report_block_init() in rtcp.cc ) */
rtpstream->last_rcv_SR_time.tv_usec = reception_date.tv_usec;
rtpstream->last_rcv_SR_time.tv_sec = reception_date.tv_sec;
compute_rtt(session,&reception_date,&sr->rb[0]);
rb=rtcp_SR_get_report_block(block,0);
if (rb) compute_rtt(session,&reception_date,rb);
}else if ( rtcp_is_RR(block)){
const report_block_t *rb=rtcp_RR_get_report_block(block,0);
rb=rtcp_RR_get_report_block(block,0);
if (rb) compute_rtt(session,&reception_date,rb);
}
}while (rtcp_next_packet(block));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment