linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] oRTP set connected and remote addr


From: Max
Subject: [Linphone-developers] oRTP set connected and remote addr
Date: Mon, 19 Sep 2016 14:18:47 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi.

In the example code in src/tests/rtpsend.c and
src/tests/rtpsend_stupid.c first
rtp_session_set_connected_mode(session,TRUE); is called and than
rtp_session_set_remote_addr(session,argv[2],atoi(argv[3]));

while according to documentation I've found at
http://download-mirror.savannah.gnu.org/releases/linphone/ortp/docs/rtpsession_8h.html
(could not find anything on linphone.org unfortunately):

ORTP_PUBLIC void rtp_session_set_connected_mode         (       RtpSession
<http://download-mirror.savannah.gnu.org/releases/linphone/ortp/docs/struct__RtpSession.html>
*       /session/,

        
        bool_t          /yesno/ 

        )       
        

If yesno is TRUE, thus a connect() syscall is done on the socket to the
destination address set by rtp_session_set_remote_addr()
<http://download-mirror.savannah.gnu.org/releases/linphone/ortp/docs/rtpsession_8h.html#aaeef1eec87c3fd8be6d9c4c7bc4f15a9>,
or if the session does symmetric rtp (see
rtp_session_set_symmetric_rtp()
<http://download-mirror.savannah.gnu.org/releases/linphone/ortp/docs/rtpsession_8h.html#a47a76ec033519c67ec320731767e603b>)
a the connect() is done to the source address of the first packet
received. Connecting a socket has effect of rejecting all incoming
packets that don't come from the address specified in connect(). It also
makes ICMP errors (such as connection refused) available to the
application.

If I understand that correctly than call order should be the opposite:
first rtp_session_set_remote_addr(session,argv[2],atoi(argv[3])); and
than rtp_session_set_connected_mode(session,TRUE);

What's the proper call order? Have this been changed compared to older
versions or oRTP? That part of the code in src/tests seems to date back
to 2008.

-- 
Max Suraev <address@hidden> http://www.sysmocom.de/
======================================================================= 
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93 
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B 
* Geschaeftsfuehrer / Managing Director: Harald Welte 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]