Speaker:Ying-shun Date:2006/11/27

Slides:



Advertisements
Similar presentations
Socket Programming 101 Vivek Ramachandran.
Advertisements

Computer Net Lab/Praktikum Datenverarbeitung 2 1 Overview Sockets Sockets in C Sockets in Delphi.
Ipv4 Socket Address Structure struct in_addr { in_addr_t s_addr; /* 32-bit IPv4 address */ /* network byte ordered */ }; struct sockaddr_in { uint8_t sin_len;
Socket Programming with IPv6. Why IPv6? Addressing and routing scalability Address space exhaustion Host autoconfiguration QoS of flow using flowlabel.
CSE 333 – SECTION 8 Networking and sockets. Overview Network Sockets IP addresses and IP address structures in C/C++ DNS – Resolving DNS names Demos.
Programming with UDP – I Covered Subjects: IPv4 Socket Address Structure Byte Ordering Functions Address Access/Conversion Functions Functions: 1.socket()
doc.: IEEE /157r0 Submission March 2003 Allen Hollister, PlantronicsSlide & VoIP Allen Hollister Plantronics.
CCNA – Network Fundamentals
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
Transmission Control Protocol (TCP) Basics
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
User Control of Streaming Media: RTSP
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #2 Header Compression.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
Tutorial 8 Socket Programming
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
1 Application TCPUDP IPICMPARPRARP Physical network Application TCP/IP Protocol Suite.
Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if.
CSc 461/561 CSc 461/561 Multimedia Systems Part C: 1. RTP/RTCP.
1 Internet Networking Spring 2006 Tutorial 14 Header Compression.
Chapter 3 Review of Protocols And Packet Formats
RTP/RTCP(RFC 1889) Real-time transport protocol (RTP) is the de facto standard media transport protocol in the Internet Media transport: audio, vedio,
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol.
CS 218 F 2003 Nov 3 lecture:  Streaming video/audio  Adaptive encoding (eg, layered encoding)  TCP friendliness References: r J. Padhye, V.Firoiu, D.
CIS679: RTP and RTCP r Review of Last Lecture r Streaming from Web Server r RTP and RTCP.
Guide to TCP/IP, Third Edition
Network Programming Tutorial #9 CPSC 261. A socket is one end of a virtual communication channel Provides network connectivity to any other socket anywhere.
University of Calgary – CPSC 441.  UDP stands for User Datagram Protocol.  A protocol for the Transport Layer in the protocol Stack.  Alternative to.
CS345 Operating Systems Φροντιστήριο Άσκησης 2. Inter-process communication Exchange data among processes Methods –Signal –Pipe –Sockets.
ICMP : Internet Control Message Protocol. Introduction ICMP is often considered part of the IP layer. It communicates error messages and other conditions.
Computer Networks: Multimedia Applications Ivan Marsic Rutgers University Chapter 3 – Multimedia & Real-time Applications.
LWIP TCP/IP Stack 김백규.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
Transmission Control Protocol
Real Time Protocol (RTP) 김 준
Speaker: Wei-Lin Chen Advisor: Quincy Wu Date: 2010/01/07 oRTP - A RTP Library.
Team Members Atcharawan Jansprasert Padmoja Roy Rana Almakabi Ehsan Eslamlouevan Manya Tarawalie.
Queues, Pipes and Sockets. QUEUE A structure with a series of data elements with the first element waiting for an operation Used when an element is not.
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
Internet Protocol Formats. IP (V4) Packet byte 0 byte1 byte 2 byte 3 data... – up to 65 K including heading info Version IHL Serv. Type Total Length Identifcation.
Introduction to Socket
Socket Programming Lab 1 1CS Computer Networks.
Networked Graphics Building Networked Virtual Environments and Networked Games Chapter 13: Application Support Issues.
Client/Server Socket Programming Project
MP2 Discussion Session CS414 Spring 2010 Long Vu 2/16/2010.
CSCI 330 UNIX and Network Programming Unit XV: Transmission Control Protocol.
PLUS 내부 세미나 1/22 The Libnet Library 이병영 2004/05/06.
CSCI 330 UNIX and Network Programming Unit XIV: User Datagram Protocol.
1 Spring Semester 2008, Dept. of Computer Science, Technion Internet Networking recitation #7 Socket Programming.
UDP User Datagram Protocol. About the UDP A commonly used transport protocol Does not guarantee either packet delivery or order The packets may travel.
1-D Interleaved Parity FEC draft-begen-fecframe-interleaved-fec-scheme-00 IETF 72 – July 2008 Ali C. Begen
Speaker: Wei-Lin Chen Advisor: Quincy Wu Date: 2008/12/30.
Lecture 3: Stateless Packet Filtering. 2 Agenda 1 1 Linux file system - networking sk_buff 2 2 Stateless packet filtering 3 3 About next assignment 4.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Jim Fawcett CSE 681 – Software Modeling & Analysis Fall 2002
RTP: A Transport Protocol for Real-Time Applications
Internet Protocol Formats
Process-to-Process Delivery
RTP – Real-time Transport Protocol
Internet Protocol (IP)
UNIX Sockets Outline Homework #1 posted by end of day
Speaker : 施 賢 孝 Adviser :Quincy Wu Date :2007/01/22
Internet Protocol Formats
Internet Networking recitation #8
Presentation transcript:

Speaker:Ying-shun Date:2006/11/27 RTP Library Speaker:Ying-shun Date:2006/11/27

Outline Organization of files Functions - Examples Sample demo References

Organization of the files (1/2) The project is composed of ten files - RTP.c:Sources of the functions of the bookshop. Functions intended for the users of the bookshop - RTP.h:Contains the total structures of the project - Config.h :It contains the symbols of the bookshop - Proto.h:Prototypes of all the functions of the project - Network.c:Sources of functions networks of the bookshop

Organization of the files (2/2) - Network.h:Structures networks of the bookshop - Hdr_Builder.c :Sources of the functions used for the construction of heading RTP. - Macros.h:All the macros project contains - Types.h:Declaration of the types specific to the bookshop

RTP header

Functions(1) Init_Socket(void); int Close_Socket(void); - Initialize the use of the socket int Close_Socket(void); - Close the use of the socket

Functions(2) int RTP_Create(context *the_context) - This function creates a context and adds to the list of the contexts. - A context is a structure containing all the variables of session related to the data flow transmitted by the means of protocol RTP - The RTP_Create function () assigns to the pointer the_context the number context in the list . EX: context_list [4] - >pt = 0

Structure of context typedef struct { int context_num; /* Number of context - sending/ reception */ u_int32 my_ssrc; /* Number SSRC - sending/ reception */ u_int32 sending_pkt_count; /* A number of packages sent - sending/ reception */ u_int32 sending_octet_count; /* A number of bytes sent sending reception */ u_int8 version; /* Version of the protocol - reception */ u_int8 marker; /* Marker flag - reception */ u_int8 padding; /* Length of the padding - reception */ u_int8 CSRClen; /* A number of elements CSRC - sending/reception */ u_int8 pt; /* Type of Payload - sending/ reception */ u_int32 *CSRCList; /* List CSRC sending reception */ u_int32 my_previous_ssrc; /* Currently not used */ u_int32 init_RTP_timestamp; /* Initial value of the timestamp - sending/reception */ u_int32 RTP_timestamp; /* Current value of the timestamp - reception */ u_int32 time_elapsed; /* Time passed since the sending beginning reception */ u_int16 init_seq_no; /* Initial number of sequence - sending reception */ u_int16 seq_no; /* Current number of sequence - sending/ reception */ rtp_ext *hdr_extension; /* Extension of the heading - sending/ reception */ void *conx_data; /* Data networks */ } sess_context_t;

Functions(3) int RTP_Destroy (context cid) - Destroyed the context thus the number is indicated by cid. u_int32 Get_Period_us(u_int8 pt) - Get the period of incrementing of the timestamp according to the type of payload.

Functions(4) int RTP_Add_Send_Addr (context cid, tank *addr, u_int16 port, u_int8 ttl) - Add a recipient to for the next sendings of packages. cid:Number of the context obtained using the RTP_Create function (). addr:Address IP of the target machine. port:Port of the target machine. ttl : Time To Life

Functions(5) int RTP_Send(context cid, u_int32 tsinc, u_int8 marker, u_int16 pti, u_int8 *payload, int len) - Add heading RTP to a package and sends it to all the recipients of the list . cid : Number of the context obtained using the RTP_Create function (). tsinc : Value whose timestamp must be incremented. marker : Value of the flag marker. pti: Type of payload. payload: Contents of the package to be sent. len : Length of the package to be sent.

Example 1 Run Rtp_Example_Send Use ethereal to observe RTP package

Functions(6) int RTP_Receive(context cid, int fd, char *payload, int *len, struct sockaddr *sin) - Parse package RTP to extract heading RTP, and assigns the value to the Context structure.Turn over (0) if heading RTP could not be parser, if not turns over (1) if the operation it passed well cid : Structure context of RTP, who must be initialized with the RTP_create function (), and destroyed with RTP_destroy (). fd : Indentifiant of the socket. payload : Contents of the received package. len : Cut payload. sin :Contents of information of the connection of the customer.

Example 2 Run Rtp_Example_Receiver Observe the package information received in receiver Fetch the information of payload to payload.txt

Sample demo Sender uses RTP package to convey test.wav to receiver Fetch the information(binary) of payload to payload.wav

References http://burns79.free.fr/ http://www.networksorcery.com/enp/protocol/rtp.htm