1 porting voip applications to dccp speaker: jia-yu wang adviser: quincy wu school: national chi nan...
TRANSCRIPT
![Page 1: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/1.jpg)
1
Porting VoIP Applications to DCCP
Speaker: Jia-Yu Wang
Adviser: Quincy Wu
School: National Chi Nan University
![Page 2: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/2.jpg)
2
Outline
Introduction Linphone
The architecture of Linphone Linphone original Function call Porting Linphone to DCCP Implementing DCCP Function call
Implementation Conclusion Reference
![Page 3: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/3.jpg)
3
Introduction
Datagram Congestion Control Protocol (RFC 4340)
TCP UDP DCCP
Reliable Yes No No
Connection-Oriented Yes No Yes
Congestion Control Yes No Yes
Sequence Number Yes No Yes
![Page 4: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/4.jpg)
4
Introduction (Cont.)
Unreliable No re-transmissions
Reliable handshakes for connection setup and teardown
Modular congestion control Can detect congestion and take avoiding action Different algorithms can be selected – CCID
TCP-like (CCID2) TCP Friendly Rate Control (CCID3)
Packet sequence numbers
![Page 5: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/5.jpg)
5
Introduction (Cont.)
DCCP Applications Video streaming Audio streaming IP Telephony
![Page 6: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/6.jpg)
6
SIP (Session Initiation Protocol)
INVITE
180 Ringing
200 OK
ACK
BYE
200 OK
Media Session (RTP)
Client Server
![Page 7: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/7.jpg)
7
RTP (Real-time Transport Protocol) over DCCP
RTP
UDP
IP
Data link layerPhysical layer
DCCP
Network layer
Transport layer
Application layer
![Page 8: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/8.jpg)
8
DCCP Connection
Client Server
(1) Initiation
1.DCCP-Request
2.DCCP-Response
3.DCCP-Ack
(2) Data transfer
4.DCCP-Data, DCCP-Ack, DCCP-DataAck
5.DCCP-Data, DCCP-Ack, DCCP-DataAck
6.DCCP-CloseReq
(3) Termination
7.DCCP-Close
8.DCCP-Reset
![Page 9: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/9.jpg)
9
Linphone
Linphone is an internet phone
Linphone complies to the SIP protocol
Linphone is free-software (or open-source), you can download and redistribute it freely
![Page 10: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/10.jpg)
10
The architecture of Linphone
Linphone
console
coreapi
eXosip2 mediastreamer2
osip2 oRTP
gnome
![Page 11: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/11.jpg)
11
coreapi/linphonecore.clinphone_core_init_media_streams()
mediastreamer2/src/audiostream.caudio_stream_new()
mediastreamer2/src/audiostream.ccreate_duplex_rtpsession()
oRTP/src/rtpsession_inet.crtp_session_set_local_addr()
oRTP/src/rtpsession_inet.ccreate_and_bind()
coreapi/linphonecore.clinphone_core_start_media_streams()
mediastreamer2/src/audiostream.caudio_stream_start_now()
mediastreamer2/src/msrtp.creceiver_process()
mediastreamer2/src/msrtp.csender_process()
oRTP/src/rtpsession.crtp_session_recvm_with_ts()
oRTP/src/rtpsession.crtp_session_sendm_with_ts()
oRTP/src/rtpsession_inet.crtp_session_rtp_recv()
oRTP/src/rtpsession_inet.crtp_session_rtp_send()
mediastreamer2/src/audiostream.caudio_stream_start_full()
oRTP/src/rtpsession_inet.crtp_session_set_remote_addr()
mediastreamer2/src/msrtp.creceiver_preprocess()
Linphone original Function call
1.Create socket and RTP session
2.Set RTP session
3.Receive and Send RTP packets
![Page 12: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/12.jpg)
12
Porting Linphone to DCCP
Create 2 RTP Session DCCP connection is uni-directional
Connection-Oriented Receiver socket need to use Blocking for accept Receiver socket need to accept the establishment
of waiting for sender socket connect Set socket parameters
Socket parameters need to use DCCP protocol
![Page 13: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/13.jpg)
13
Implementing DCCP Function call
coreapi/linphonecore.clinphone_core_init_media_streams()
mediastreamer2/src/audiostream.caudio_stream_new()
oRTP/src/rtpsession_inet.crtp_session_set_local_addr()
coreapi/linphonecore.clinphone_core_start_media_streams()
mediastreamer2/src/audiostream.ccreate_duplex_rtpsession_recv()
mediastreamer2/src/audiostream.ccreate_duplex_rtpsession_send()
oRTP/src/rtpsession_inet.ccreate_and_bind_recv()
oRTP/rtpsession_inet.ccreate_and_bind_recv()
SOCK_DCCP=6;SOL_DCCP=269;DCCP_SOCKOPT_PACKET_SIZE=1;DCCP_SOCKOPT_SERVICE=2;IPPROTO_DCCP=33;
socket(ai_family, SOCK_DCCP, IPPROTO_DCCP);setsockopt(sock,SOL_DCCP,DCCP_SOCKOPT_PACKET_SIZE, (char*)&pkt_size,sizeof(pkt_size));setsockopt(sock,SOL_DCCP,DCCP_SOCKOPT_SERVICE,(char*)&pkt_size,sizeof(pkt_size));
![Page 14: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/14.jpg)
14
Implementing DCCP Function call (Cont.)
coreapi/linphonecore.clinphone_core_start_media_streams()
Accept & connect
mediastreamer2/src/audiostream.caudio_stream_start_now()
oRTP/src/rtpsession_inet.ccreate_and_bind_random()
mediastreamer2/src/msrtp.csender_preprocess()connect()
oRTP/src/rtpsession_inet.crtp_session_rtp_recv_accept()
oRTP/src/rtpsession_inet.crtp_session_set_remote_addr()
oRTP/src/rtpsession_inet.crtp_session_set_local_addr()
mediastreamer2/src/msrtp.creceiver_preprocess()
oRTP/src/rtpsession_inet.ccreate_and_bind()
mediastreamer2/src/audiostream.ccreate_duplex_rtpsession2()
mediastreamer2/src/audiostream.caudio_stream_start_full_recv()
mediastreamer2/src/audiostream.caudio_stream_start_full_send()
oRTP/src/rtpsession_inet.ccreate_and_bind_send()
![Page 15: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/15.jpg)
15
Implementing DCCP Function call (Cont.)
mediastreamer2/src/msrtp.creceiver_process()
mediastreamer2/src/msrtp.csender_process()
oRTP/src/rtpsession.crtp_session_recvm_with_ts()
oRTP/src/rtpsession.crtp_session_sendm_with_ts()
oRTP/src/rtpsession_inet.crtp_session_rtp_recv()
oRTP/src/rtpsession_inet.crtp_session_rtp_send()
Accept & connect
![Page 16: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/16.jpg)
16
Implementation
![Page 17: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/17.jpg)
17
Experimental Result
IPERF to generate the TCP flow oRTP to generate DCCP (CCID2) flow and UDP flow Bandwidth : 10Mb/s , Total Time : 30 seconds. Repeating test : 100
TCP 7.74 Mbit/s
DCCP 2.02 Mbit/s
TCP 0.10 Mbit/s
UDP 9.66 Mbit/s
![Page 18: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/18.jpg)
18
Conclusion
Implementing RTP over DCCP
Porting Linphone to DCCP
![Page 19: 1 Porting VoIP Applications to DCCP Speaker: Jia-Yu Wang Adviser: Quincy Wu School: National Chi Nan University](https://reader036.vdocuments.us/reader036/viewer/2022081503/56649ef65503460f94c09aeb/html5/thumbnails/19.jpg)
19
Reference
Datagram Congestion Control Protocol (RFC 4340) CCID2-TCP-like Congestion Control (RFC 4341) CCID3-TCP-Friendly Rate Control (TFRC) (RFC4342) RTP and the Datagram Congestion Control Protocol (DCCP)
draft-ietf-dccp-rtp-07.txt Linphone
http://www.linphone.org/index.php/eng