⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtptools.html

📁 rtp协议检测工具
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><title>RTP Tools 1.18</title><meta name="author" content="Henning Schulzrinne"><meta name="keywords" content="RTP; rtptools; debugging"></head><body bgcolor="#38B0DE"><h1>RTP Tools (Version 1.18)</h1><font color=red><big>The authors <b>cannot</b> provide support for compiling or running thertptools.  We will gladly accept bug fixes, but all other emailregarding the rtptools will be ignored.</big></font><h2>Description</h2><p>The rtptools distribution consists of a number of small applicationsthat can be used for processing <ahref="http://www.cs.columbia.edu/~hgs/rtp">RTP</a> data.<dl><dt><samp><a href="#rtpplay">rtpplay</a></samp><dd>Play back RTP sessions recorded by <samp><ahref="#rtpdump">rtpdump</a></samp><dt><samp><a href="#rtpsend">rtpsend</a></samp><dd>Generate RTP packets from textual description, generated by handor <samp><a href="#rtpdump">rtpdump</a></samp><dt><samp><a href="#rtpdump">rtpdump</a></samp><dd>Parse and print RTP packets, generating output files suitable for<samp><a href="#rtpplay">rtpplay</a></samp> and <samp><ahref="#rtpsend">rtpsend</a></samp><dt><samp><a href="#rtptrans">rtptrans</a></samp><dd>RTP translator between unicast and multicast networks; alsotranslates between VAT and RTP formats.</dl><h2><a name="installation">Installation</a></h2><p>Sources for a variety of platforms and binaries for Windows NT areavailable from <ahref="http://www.cs.columbia.edu/IRT/software/rtptools/src">http://www.cs.columbia.edu/IRT/rtptools/software/src</a>.<p>The RTP tools should compile on any Posix-compliant platformsupporting sockets, as well as Windows/NT/95/98/2000 (Win32).  They havebeen tested on SunOS 4.1, SunOS 5.x (Solaris), Linux, NT 4.0, SGI Irix,and HP-UX.  Edit the directories and libraries at the top of<samp>Makefile</samp> and type <kbd>make</kbd>.  The compiler mustsupport ANSI C:  <samp>gcc</samp> does, Sun's old<samp>/usr/ucb/cc</samp> does not.<p><em>Note</em>:  You must use the <code>sun4</code> architecture forSunOS 4.1.x and <code>sun5</code> for SunOS 5.x (Solaris).  You will getsystem call errors if you do not.<dl><dt>For Unix systems, type<dd><kbd>./configure; make</kbd></dl><dl><dt>To install RTP tools on WIN32 machine, please follow the following steps:<dd>*.dsp files are project files. *.dsw file and workspace file. <br>User can open the workspace file and use 'batch compile' to compile allthe projects.<ol><li>In Visual C++ 6.0, open workspace file rtptools.dsw.<li>In VC menu Build, use Batch Build to build all the tools.<li>All the rtptools will be created under "debug\" directory.</ol></dl><p>For quite a character, who desire to compile on Borland C++ Builder, please open dump_bcb.bpr, play_bcb.bpr, send_bcb.bpr and trans_bcb.bpr under bcb directory.  Only pressing ctr-F9 needed for compilation, and the tool will be generated on the same directory.<h2><a name="usage">General Usage Hints</a></h2><p>Network addresses can be either multicast or unicast addresses,unless stated otherwise.  They may be specified in dotted-decimalnotation (e.g., 224.2.0.1) or as a host name (e.g.,<samp>lupus.fokus.gmd.de</samp>).  Port numbers must be given as decimalnumbers in the range of 1 to 65535.  Network addresses are specified as<var>destination/port/ttl</var>.  The time-to-live (ttl) value isoptional and only applies to multicast.  <p>For all commands, the flag<samp>-h</samp> or <samp>-?</samp> will print a short usage summary.<p>Unless otherwise noted, input is taken from stdin, and output sent tostdout.  The extension <code>.rtp</code> is suggested for filesgenerated in <code>rtpdump -F dump</code> format.<h2><a name="rtpplay">rtpplay</a></h2><samp>rtpplay</samp> [-T] [-v][<samp>-f</samp> <var>file</var>] [<samp>-p</samp> <var>profile</var>][<samp>-s</samp> <var>sourceport</var>][<samp>-b</samp> <var>begin</var>] [<samp>-e</samp> <var>end</var>]<var>destination/port</var>[<var>/ttl</var>]<p><samp>rtpplay</samp> reads RTP session data, recorded by<samp>rtpdump -F dump</samp> from either the <var>file</var> or stdin,if <var>file</var> is not specified, sending it to network address<var>destination</var> and port <var>port</var> with a time-to-livevalue of <var>ttl</var>.  <p>If the flag <code>-T</code> is given, thetiming between packets corresponds to the arrival timing rather than theRTP timestamps.  Otherwise, for RTP data packets, the timing given bythe RTP timestamps is used, smoothing interarrival jitter and restoringpacket sequence.  RTCP packets are still sent with their originaltiming.  This may cause the relative order of RTP and RTCP packets to bechanged. <p>The source port(localport) for outgoing packets can be set with the<samp>-s</samp> flag. A random port is chosen if this flag is notspecified.<p>The whole file is played unless the <var>begin</var> or<var>end</var> times are specified. Times are measured in seconds andfractions from the beginning of the recording.<p>The RTP clock frequency is read from the <var>profile</var> file ifgiven; the default profile (RFC 1890) is used if not.  The profile filecontains lines with two fields each:  the first is the numeric payloadtype, the second the clock frequency.  The values read from the profilefile are silently ignored if the <code>-T</code> flag is used.<p>If you want to loop a particular file, it is easiest to put the<code>rtpplay</code> command in a shell script. <p>The <samp>-v</samp> flag has rtpplay display the packets generated onstdout.<p><code>rtpplay</code> uses the <code>hsearch (3C)</code> library,which may not be available on all operating systems.<h2><a name="rtpdump">rtpdump</a></h2><samp>rtpdump</samp> [<samp>-F</samp> <var>format</var>] [<samp>-t</samp> <var>duration</var>] [<samp>-x</samp> <var>bytes</var>] [<samp>-f</samp> <var>file</var>] [<samp>-o</samp> <var>outputfile</var>]<var>address/port</var><p><sample>rtpdump</samp> listens on the <var>address</var> and<var>port</var> pair for RTP and RTCP packets and dumps a processedversion to <var>outputfile</var> if specified or stdout otherwise. <p>If <var>file</var> is specified, the file is used instead of thenetwork address.  If no network address is given, file input is expectedfrom stdin.  The file must have been recorded using the rtpdump<code>dump</code> format.  <p>The recording <var>duration</var> is measured in minutes.  <p>From each packet,only the first <var>bytes</var> of the payload are dumped (onlyapplicable for "dump" and "hex" formats).<p>Supported <var>formats</var> are:<p><table border=1><tr><th><samp>format</samp><th>text/binary<th>description<tr><td><samp>dump</samp><td rowspan=3>binary<td>dump in binary format, suitable for <ahref="#rtpplay">rtpplay</a>. The format is as follows:The file starts with<center><code>#!rtpplay1.0</code> <var>address</var>/<var>port</var>\n</center><p>The version number indicates the file format version, not the versionof RTP tools used to generate the file.  The current file format versionis 1.0.<p>This is followed by one binary header (<tt>RD_hdr_t</tt>) and one<tt>RD_packet_t</tt> structure for each received packet.  All fields arein network byte order.  The RTP and RTCP packets are recorded as-is.<pre>typedef struct {  struct timeval start;  /* start of recording (GMT) */  u_int32 source;        /* network source (multicast address) */  u_int16 port;          /* UDP port */} RD_hdr_t;typedef struct {  u_int16 length;    /* length of packet, including this header (may                         be smaller than plen if not whole packet recorded) */  u_int16 plen;      /* actual header+payload length for RTP, 0 for RTCP */  u_int32 offset;    /* milliseconds since the start of recording */} RD_packet_t;</pre><tr><td><samp>header</samp><td>like "dump", but don't save audio/video payload<tr><td><samp>payload</samp><td>only audio/video payload<tr><td><samp>ascii</samp><td rowspan=4>text<td>parsed packets (default), suitable for <code><ahref="#rtpsend">rtpsend</a></code>:<br><pre>844525628.240592 RTP len=176 from=131.136.234.103:46196 v=2 p=0 x=0   cc=0 m=0 pt=5 (IDVI,1,8000) seq=28178 ts=954052737 ssrc=0x124e2b58844525628.243123 RTCP len=128 from=139.88.27.43:53154  (RR ssrc=0x125bd36f p=0 count=1 len=7(ssrc=bc64b658 fraction=0.503906 lost=4291428375 last_seq=308007791  jit=17987961 lsr=2003335488 dlsr=825440558) ) (SDES p=0 count=1 len=23  (src=0x125bd36f CNAME="yywhy@139.88.27.43" NAME="Michael Baldizzi  (NASA LeRC)" TOOL="vat-4.0a8" EMAIL="mbaldizzi@lerc.nasa.gov" ) )</pre><tr><td><samp>hex</samp><td>like <samp>ascii</samp>, but with hex dump of payload<tr><td><samp>rtcp</samp><td>like <samp>ascii</samp>, but only RTCP packets<tr><td><samp>short</samp><td>RTP or vat data in tabular form:  <var>[-]time ts [seq]</var>,where a - indicates a set marker bit. The sequence number<var>seq</var> is only used for RTP packets.<pre>844525727.800600 954849217 30667844525727.837188 954849537 30668844525727.877249 954849857 30669844525727.922518 954850177 30670</pre></table><h2><a name="rtpsend">rtpsend</a></h2><p><var>rtpsend</var> sends an RTP packet stream with configurableparameters.  This is intended to test RTP features.  The RTP or RTCPheaders are read from a file, generated by hand, a test program or <ahref="#rtpdump">rtpdump</a> (format "ascii").<p><samp>rtpsend [-a] [-l]</samp>[<samp>-s</samp> <var>sourceport</var>][<samp>-f</samp> <var>file</var>]<var>destination/port</var>[<var>/ttl</var>]<p>Packets are sent with a time-to-live value <var>ttl</var>.  <p>If data is read from a <var>file</var> instead of stdin, the <samp>-l</samp>(loop) flag resends the same sequence of packets again and again.<p>The source port(localport) for outgoing packets can be set with the<samp>-s</samp> flag. A random port is chosen if this flag is notspecified.<p>If the <samp>-a</samp> flag is specified, <samp>rtpsend</samp>includes a router alert IP option in RTCP packets. This is used by theYESSIR resource reservation protoccol.<p>The file <var>file</var> contains the description of the packets tobe sent.  Within the file, each entry starts with a time value, inseconds, relative to the beginning of the trace.  The time value mustappear at the beginning of a line, without white space.  Within an RTPor RTCP packet description, parameters may appear in any order, withoutwhite space around the equal sign.  Lines are continued with initialwhite space on the next line.  Comment lines start with #.  Strings areenclosed in quotation marks.<pre>&lt;<var>time</var>> RTP    v=&lt;<var>version</var>>   p=&lt;<var>padding</var>>   x=&lt;<var>extension</var>>   m=&lt;<var>marker</var>>   pt=&lt;<var>payload type</var>>   ts=&lt;<var>time stamp</var>>   seq=&lt;<var>sequence number</var>>   ssrc=&lt;<var>SSRC</var>>   cc=&lt;<var>CSRC count</var>>   csrc=&lt;<var>CSRC</var>>   data=&lt;<var>hex payload</var>>   ext_type=&lt;<var>type of extension</var>>   ext_len=&lt;<var>length of extension header</var>>   ext_data=&lt;<var>hex extension data</var>>   len=&lt;<var>packet size in bytes(including header)</var>>&lt;<var>time</var>> RTCP (SDES v=&lt;<var>version</var>>               (src=&lt;source> cname="..." name="...")              (src=&lt;source> ...)            )            (SR v=&lt;<var>version</var>>              ssrc=&lt;<var>SSRC of data source</var>>              p=&lt;<var>padding</var>>              count=&lt;<var>number of sources</var>>              len=&lt;<var>length</var>>              ntp=&lt;<var>NTP timestamp</var>>              psent=&lt;<var>packet sent</var>>              osent=&lt;<var>octets sent</var>>                (ssrc=&lt;<var>SSRC of source</var>>                 fraction=&lt;<var>loss fraction</var>>                 lost=&lt;<var>number lost</var>>                 last_seq=&lt;<var>last sequence number</var>>                 jit=&lt;<var>jitter</var>>                 lsr=&lt;<var>last SR received</var>>                 dlsr=&lt;<var>delay since last SR</var>>                )             )</pre><h2><a name="rtptrans">rtptrans</a></h2><samp>rtptrans</samp> [<var>host</var>]/<var>port</var>[/<var>ttl</var>][<var>host</var>]/<var>port</var>[/<var>ttl</var>] [...]<p>rtptrans RTP/RTCP packets arriving from one of the addresses to allother addresses.  Addresses can be a multicast or unicast.  TTL valuesfor unicast addresses are ignored.  (Actually, doesn't check whetherpackets are RTP or not.)<p>Additionally, the translator can translate VAT packets into RTPpackets.  VAT control packets are translated into RTCP SDES packets witha CNAME and a NAME entry.  However, this is only intended to be used inthe following configuration:  VAT packets arriving on a multicastconnection are translated into RTP and sent over a unicast link.  RTPpackets are not (yet) translated into VAT packets and and all packetsarriving on unicast links are not changed at all.  Therefore, currentlymainly the following topology is supported:  multicast VAT -> translator-> unicast RTP; and on the way back it should lokk like this multicastVAT <- translator <- unicast VAT.  This means that the audio agent onthe unicast link should be able use both VAT and RTP.<h2>Authors</h2><p>The rtptools were written by <ahref="http://www.cs.columbia.edu/~hgs">Henning Schulzrinne</a>, withenhancements by <a href="http://www.cs.columbia.edu/~pingpan">PingPan</a> and <a href="mailto:at541@columbia.edu">Akira Tsukamoto</a>. rtptrans was written by <a href="mailto:sisalem@fokus.gmd.de">DorghamSisalem</a> and enhanced by <a href="mailto:casner@precept.com">SteveCasner</a>.<hr><a href="ChangeLog.html">Program history</a><hr><small>Last updated <script type="text/JavaScript">document.write(document.lastModified)</script>by <a href="http://www.cs.columbia.edu/~hgs">Henning Schulzrinne</a></small></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -