Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 7c0c66d6521a2c8efa0ef6bf03291d7f > files > 691

jrtplib-devel-3.7.1-7.fc12.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>jrtplib: src/rtpudpv6transmitter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="jrtplib.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_e5298977290e638844c8018a73ab0caf.html">src</a>
  </div>
</div>
<div class="contents">
<h1>rtpudpv6transmitter.h</h1><a href="rtpudpv6transmitter_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  This file is a part of JRTPLIB</span>
<a name="l00004"></a>00004 <span class="comment">  Copyright (c) 1999-2007 Jori Liesenborgs</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Contact: jori.liesenborgs@gmail.com</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">  This library was developed at the "Expertisecentrum Digitale Media"</span>
<a name="l00009"></a>00009 <span class="comment">  (http://www.edm.uhasselt.be), a research center of the Hasselt University</span>
<a name="l00010"></a>00010 <span class="comment">  (http://www.uhasselt.be). The library is based upon work done for </span>
<a name="l00011"></a>00011 <span class="comment">  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">  Permission is hereby granted, free of charge, to any person obtaining a</span>
<a name="l00014"></a>00014 <span class="comment">  copy of this software and associated documentation files (the "Software"),</span>
<a name="l00015"></a>00015 <span class="comment">  to deal in the Software without restriction, including without limitation</span>
<a name="l00016"></a>00016 <span class="comment">  the rights to use, copy, modify, merge, publish, distribute, sublicense,</span>
<a name="l00017"></a>00017 <span class="comment">  and/or sell copies of the Software, and to permit persons to whom the</span>
<a name="l00018"></a>00018 <span class="comment">  Software is furnished to do so, subject to the following conditions:</span>
<a name="l00019"></a>00019 <span class="comment"></span>
<a name="l00020"></a>00020 <span class="comment">  The above copyright notice and this permission notice shall be included</span>
<a name="l00021"></a>00021 <span class="comment">  in all copies or substantial portions of the Software.</span>
<a name="l00022"></a>00022 <span class="comment"></span>
<a name="l00023"></a>00023 <span class="comment">  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span>
<a name="l00024"></a>00024 <span class="comment">  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a name="l00025"></a>00025 <span class="comment">  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span>
<a name="l00026"></a>00026 <span class="comment">  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a name="l00027"></a>00027 <span class="comment">  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span>
<a name="l00028"></a>00028 <span class="comment">  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS</span>
<a name="l00029"></a>00029 <span class="comment">  IN THE SOFTWARE.</span>
<a name="l00030"></a>00030 <span class="comment"></span>
<a name="l00031"></a>00031 <span class="comment">*/</span>
<a name="l00032"></a>00032 
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef RTPUDPV6TRANSMITTER_H</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#define RTPUDPV6TRANSMITTER_H</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#include "rtpconfig.h"</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="preprocessor">#ifdef RTP_SUPPORT_IPV6</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="rtptransmitter_8h.html">rtptransmitter.h</a>"</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="rtpipv6destination_8h.html">rtpipv6destination.h</a>"</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="rtphashtable_8h.html">rtphashtable.h</a>"</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include "<a class="code" href="rtpkeyhashtable_8h.html">rtpkeyhashtable.h</a>"</span>
<a name="l00049"></a>00049 <span class="preprocessor">#if ! (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">        #include &lt;netinet/in.h&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#endif // WIN32</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="preprocessor">#ifdef RTP_SUPPORT_THREAD</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">        #include &lt;jmutex.h&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#endif // RTP_SUPPORT_THREAD</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00059"></a>00059 <span class="preprocessor">#define RTPUDPV6TRANS_HASHSIZE                                                                          8317</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define RTPUDPV6TRANS_DEFAULTPORTBASE                                                           5000</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00062"></a>00062 <span class="preprocessor">#define RTPUDPV6TRANS_RTPRECEIVEBUFFER                                                  32768</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define RTPUDPV6TRANS_RTCPRECEIVEBUFFER                                                 32768</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#define RTPUDPV6TRANS_RTPTRANSMITBUFFER                                                 32768</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define RTPUDPV6TRANS_RTCPTRANSMITBUFFER                                                32768</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>
<a name="l00068"></a><a class="code" href="classRTPUDPv6TransmissionParams.html">00068</a> <span class="keyword">class </span><a class="code" href="classRTPUDPv6TransmissionParams.html" title="Parameters for the UDP over IPv6 transmitter.">RTPUDPv6TransmissionParams</a> : <span class="keyword">public</span> <a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a>
<a name="l00069"></a>00069 {
<a name="l00070"></a>00070 <span class="keyword">public</span>:
<a name="l00071"></a>00071         <a class="code" href="classRTPUDPv6TransmissionParams.html" title="Parameters for the UDP over IPv6 transmitter.">RTPUDPv6TransmissionParams</a>():<a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a>(<a class="code" href="classRTPTransmitter.html#00529bcf331e3d3dc57c4ebb476f1fd2842860772368b19de0c1de091df76f9f" title="Specifies the internal UDP over IPv6 transmitter.">RTPTransmitter::IPv6UDPProto</a>)        { portbase = RTPUDPV6TRANS_DEFAULTPORTBASE; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0 ; i &lt; 16 ; i++) bindIP.s6_addr[i] = 0; multicastTTL = 1; mcastifidx = 0; rtpsendbuf = RTPUDPV6TRANS_RTPTRANSMITBUFFER; rtprecvbuf= RTPUDPV6TRANS_RTPRECEIVEBUFFER; rtcpsendbuf = RTPUDPV6TRANS_RTCPTRANSMITBUFFER; rtcprecvbuf = RTPUDPV6TRANS_RTCPRECEIVEBUFFER; }
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#70f30219701c8731ff0226c2dc758bc3">00074</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#70f30219701c8731ff0226c2dc758bc3" title="Sets the IP address which is used to bind the sockets to ip.">SetBindIP</a>(in6_addr ip)                                                                                     { bindIP = ip; }
<a name="l00075"></a>00075 
<a name="l00077"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#e0b9ca2d1cacbd37b2105cf128510675">00077</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#e0b9ca2d1cacbd37b2105cf128510675" title="Sets the multicast interface index.">SetMulticastInterfaceIndex</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx)                                       { mcastifidx = idx; }
<a name="l00078"></a>00078 
<a name="l00080"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#bf0c3cdf389e61d892518a85f17567b8">00080</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#bf0c3cdf389e61d892518a85f17567b8" title="Sets the RTP portbase to pbase.">SetPortbase</a>(uint16_t pbase)                                                                        { portbase = pbase; }
<a name="l00081"></a>00081 
<a name="l00083"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#fae8cc1b401afedc02a8c91e117512c6">00083</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#fae8cc1b401afedc02a8c91e117512c6" title="Sets the multicast TTL to be used to mcastTTL.">SetMulticastTTL</a>(uint8_t mcastTTL)                                                          { multicastTTL = mcastTTL; }
<a name="l00084"></a>00084 
<a name="l00086"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#4b49cc96607244d4c87380125fb9cd95">00086</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#4b49cc96607244d4c87380125fb9cd95" title="Passes a list of IP addresses which will be used as the local IP addresses.">SetLocalIPList</a>(std::list&lt;in6_addr&gt; &amp;iplist)                                        { localIPs = iplist; } 
<a name="l00087"></a>00087 
<a name="l00092"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#e508deee4f4c944ba461b667fd0b3898">00092</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#e508deee4f4c944ba461b667fd0b3898" title="Clears the list of local IP addresses.">ClearLocalIPList</a>()                                                                                         { localIPs.clear(); }
<a name="l00093"></a>00093 
<a name="l00095"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#8d23d94d5e21ae504f791ade41cc6fb6">00095</a>         in6_addr <a class="code" href="classRTPUDPv6TransmissionParams.html#8d23d94d5e21ae504f791ade41cc6fb6" title="Returns the IP address which will be used to bind the sockets.">GetBindIP</a>()<span class="keyword"> const                                                                                      </span>{ <span class="keywordflow">return</span> bindIP; }
<a name="l00096"></a>00096 
<a name="l00098"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#a8eaa8b5487565c5d8fd4f03b42a3e73">00098</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#a8eaa8b5487565c5d8fd4f03b42a3e73" title="Returns the multicast interface index.">GetMulticastInterfaceIndex</a>()<span class="keyword"> const                                         </span>{ <span class="keywordflow">return</span> mcastifidx; }
<a name="l00099"></a>00099 
<a name="l00101"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#de2ee488cdde0867bd59aa96974f936c">00101</a>         uint16_t <a class="code" href="classRTPUDPv6TransmissionParams.html#de2ee488cdde0867bd59aa96974f936c" title="Returns the RTP portbase which will be used (default is 5000).">GetPortbase</a>()<span class="keyword"> const                                                                            </span>{ <span class="keywordflow">return</span> portbase; }
<a name="l00102"></a>00102 
<a name="l00104"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#35b1ddd0f2003fd123ef37d8c2da8a89">00104</a>         uint8_t <a class="code" href="classRTPUDPv6TransmissionParams.html#35b1ddd0f2003fd123ef37d8c2da8a89" title="Returns the multicast TTL which will be used (default is 1).">GetMulticastTTL</a>()<span class="keyword"> const                                                                         </span>{ <span class="keywordflow">return</span> multicastTTL; }
<a name="l00105"></a>00105 
<a name="l00107"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#0f9f05249646b6de0efcfca30317cf77">00107</a>         <span class="keyword">const</span> std::list&lt;in6_addr&gt; &amp;<a class="code" href="classRTPUDPv6TransmissionParams.html#0f9f05249646b6de0efcfca30317cf77" title="Returns the list of local IP addresses.">GetLocalIPList</a>()<span class="keyword"> const                                       </span>{ <span class="keywordflow">return</span> localIPs; }
<a name="l00108"></a>00108 
<a name="l00110"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#ce9df1ba6e1d35b33650406f7f0ab7db">00110</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#ce9df1ba6e1d35b33650406f7f0ab7db" title="Sets the RTP socket&amp;#39;s send buffer size.">SetRTPSendBuffer</a>(<span class="keywordtype">int</span> s)                                                            { rtpsendbuf = s; }
<a name="l00111"></a>00111 
<a name="l00113"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#f72fca9bf8a1b244b755509317732d1f">00113</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#f72fca9bf8a1b244b755509317732d1f" title="Sets the RTP socket&amp;#39;s receive buffer size.">SetRTPReceiveBuffer</a>(<span class="keywordtype">int</span> s)                                                         { rtprecvbuf = s; }
<a name="l00114"></a>00114 
<a name="l00116"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#de4f69ea330d8287f490fab002af6ba7">00116</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#de4f69ea330d8287f490fab002af6ba7" title="Sets the RTCP socket&amp;#39;s send buffer size.">SetRTCPSendBuffer</a>(<span class="keywordtype">int</span> s)                                                           { rtcpsendbuf = s; }
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#f793b8b31e499cb27750ba7a55a2dbf7">00119</a>         <span class="keywordtype">void</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#f793b8b31e499cb27750ba7a55a2dbf7" title="Sets the RTCP socket&amp;#39;s receive buffer size.">SetRTCPReceiveBuffer</a>(<span class="keywordtype">int</span> s)                                                        { rtcprecvbuf = s; }
<a name="l00120"></a>00120 
<a name="l00122"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#bbbcbc505927b11a0bad32bafaba6100">00122</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#bbbcbc505927b11a0bad32bafaba6100" title="Returns the RTP socket&amp;#39;s send buffer size.">GetRTPSendBuffer</a>()<span class="keyword"> const                                                            </span>{ <span class="keywordflow">return</span> rtpsendbuf; }
<a name="l00123"></a>00123 
<a name="l00125"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#fd839af744a8d2a7e6b122e8a70e67d7">00125</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#fd839af744a8d2a7e6b122e8a70e67d7" title="Returns the RTP socket&amp;#39;s receive buffer size.">GetRTPReceiveBuffer</a>()<span class="keyword"> const                                                         </span>{ <span class="keywordflow">return</span> rtprecvbuf; }
<a name="l00126"></a>00126 
<a name="l00128"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#4fb82370681948295a9189029d46117a">00128</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#4fb82370681948295a9189029d46117a" title="Returns the RTCP socket&amp;#39;s send buffer size.">GetRTCPSendBuffer</a>()<span class="keyword"> const                                                           </span>{ <span class="keywordflow">return</span> rtcpsendbuf; }
<a name="l00129"></a>00129 
<a name="l00131"></a><a class="code" href="classRTPUDPv6TransmissionParams.html#2378d61a9a806aa65bcc5134647af524">00131</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionParams.html#2378d61a9a806aa65bcc5134647af524" title="Returns the RTCP socket&amp;#39;s receive buffer size.">GetRTCPReceiveBuffer</a>()<span class="keyword"> const                                                        </span>{ <span class="keywordflow">return</span> rtcprecvbuf; }
<a name="l00132"></a>00132 <span class="keyword">private</span>:
<a name="l00133"></a>00133         uint16_t portbase;
<a name="l00134"></a>00134         in6_addr bindIP;
<a name="l00135"></a>00135         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mcastifidx;
<a name="l00136"></a>00136         std::list&lt;in6_addr&gt; localIPs;
<a name="l00137"></a>00137         uint8_t multicastTTL;
<a name="l00138"></a>00138         <span class="keywordtype">int</span> rtpsendbuf, rtprecvbuf;
<a name="l00139"></a>00139         <span class="keywordtype">int</span> rtcpsendbuf, rtcprecvbuf;
<a name="l00140"></a>00140 };
<a name="l00141"></a>00141 
<a name="l00143"></a><a class="code" href="classRTPUDPv6TransmissionInfo.html">00143</a> <span class="keyword">class </span><a class="code" href="classRTPUDPv6TransmissionInfo.html" title="Additional information about the UDP over IPv6 transmitter.">RTPUDPv6TransmissionInfo</a> : <span class="keyword">public</span> <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a>
<a name="l00144"></a>00144 {
<a name="l00145"></a>00145 <span class="keyword">public</span>:
<a name="l00146"></a>00146 <span class="preprocessor">#if ! (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span>        <a class="code" href="classRTPUDPv6TransmissionInfo.html" title="Additional information about the UDP over IPv6 transmitter.">RTPUDPv6TransmissionInfo</a>(std::list&lt;in6_addr&gt; iplist,<span class="keywordtype">int</span> rtpsock,<span class="keywordtype">int</span> rtcpsock) : <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a>(<a class="code" href="classRTPTransmitter.html#00529bcf331e3d3dc57c4ebb476f1fd2842860772368b19de0c1de091df76f9f" title="Specifies the internal UDP over IPv6 transmitter.">RTPTransmitter::IPv6UDPProto</a>) 
<a name="l00148"></a>00148 <span class="preprocessor">#else</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span>        <a class="code" href="classRTPUDPv6TransmissionInfo.html" title="Additional information about the UDP over IPv6 transmitter.">RTPUDPv6TransmissionInfo</a>(std::list&lt;in6_addr&gt; iplist,SOCKET rtpsock,SOCKET rtcpsock) : <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a>(<a class="code" href="classRTPTransmitter.html#00529bcf331e3d3dc57c4ebb476f1fd2842860772368b19de0c1de091df76f9f" title="Specifies the internal UDP over IPv6 transmitter.">RTPTransmitter::IPv6UDPProto</a>) 
<a name="l00150"></a>00150 <span class="preprocessor">#endif  // WIN32</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span>                                                                                                                        { localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; }
<a name="l00152"></a>00152 
<a name="l00153"></a>00153         ~RTPUDPv6TransmissionInfo()                                                             { }
<a name="l00154"></a>00154 
<a name="l00156"></a><a class="code" href="classRTPUDPv6TransmissionInfo.html#2098be3eb81f5cfe7b77072ce1186b6f">00156</a>         std::list&lt;in6_addr&gt; <a class="code" href="classRTPUDPv6TransmissionInfo.html#2098be3eb81f5cfe7b77072ce1186b6f" title="Returns the list of IPv6 addresses the transmitter considers to be the local IP addresses...">GetLocalIPList</a>()<span class="keyword"> const                              </span>{ <span class="keywordflow">return</span> localIPlist; }
<a name="l00157"></a>00157 <span class="preprocessor">#if ! (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00158"></a>00158 <span class="preprocessor"></span>
<a name="l00159"></a><a class="code" href="classRTPUDPv6TransmissionInfo.html#00d2d06e85245544870e534e546a5461">00159</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionInfo.html#00d2d06e85245544870e534e546a5461" title="Returns the socket descriptor used for receiving and transmitting RTP packets.">GetRTPSocket</a>()<span class="keyword"> const                                                                </span>{ <span class="keywordflow">return</span> rtpsocket; }
<a name="l00160"></a>00160 
<a name="l00162"></a><a class="code" href="classRTPUDPv6TransmissionInfo.html#ea680219f1061b7160cecfa12e7af577">00162</a>         <span class="keywordtype">int</span> <a class="code" href="classRTPUDPv6TransmissionInfo.html#ea680219f1061b7160cecfa12e7af577" title="Returns the socket descriptor used for receiving and transmitting RTCP packets.">GetRTCPSocket</a>()<span class="keyword"> const                                                               </span>{ <span class="keywordflow">return</span> rtcpsocket; }
<a name="l00163"></a>00163 <span class="preprocessor">#else</span>
<a name="l00164"></a>00164 <span class="preprocessor"></span>        SOCKET <a class="code" href="classRTPUDPv6TransmissionInfo.html#00d2d06e85245544870e534e546a5461" title="Returns the socket descriptor used for receiving and transmitting RTP packets.">GetRTPSocket</a>()<span class="keyword"> const                                                             </span>{ <span class="keywordflow">return</span> rtpsocket; }
<a name="l00165"></a>00165         SOCKET <a class="code" href="classRTPUDPv6TransmissionInfo.html#ea680219f1061b7160cecfa12e7af577" title="Returns the socket descriptor used for receiving and transmitting RTCP packets.">GetRTCPSocket</a>()<span class="keyword"> const                                                    </span>{ <span class="keywordflow">return</span> rtcpsocket; }
<a name="l00166"></a>00166 <span class="preprocessor">#endif // WIN32</span>
<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="keyword">private</span>:
<a name="l00168"></a>00168         std::list&lt;in6_addr&gt; localIPlist;
<a name="l00169"></a>00169 <span class="preprocessor">#if ! (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00170"></a>00170 <span class="preprocessor"></span>        <span class="keywordtype">int</span> rtpsocket,rtcpsocket;
<a name="l00171"></a>00171 <span class="preprocessor">#else</span>
<a name="l00172"></a>00172 <span class="preprocessor"></span>        SOCKET rtpsocket,rtcpsocket;
<a name="l00173"></a>00173 <span class="preprocessor">#endif // WIN32</span>
<a name="l00174"></a>00174 <span class="preprocessor"></span>};
<a name="l00175"></a>00175                 
<a name="l00176"></a>00176 <span class="keyword">class </span>RTPUDPv6Trans_GetHashIndex_IPv6Dest
<a name="l00177"></a>00177 {
<a name="l00178"></a>00178 <span class="keyword">public</span>:
<a name="l00179"></a>00179         <span class="keyword">static</span> <span class="keywordtype">int</span> GetIndex(<span class="keyword">const</span> RTPIPv6Destination &amp;d)                                        { in6_addr ip = d.GetIP(); <span class="keywordflow">return</span> ((((uint32_t)ip.s6_addr[12])&lt;&lt;24)|(((uint32_t)ip.s6_addr[13])&lt;&lt;16)|(((uint32_t)ip.s6_addr[14])&lt;&lt;8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; }
<a name="l00180"></a>00180 };
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="keyword">class </span>RTPUDPv6Trans_GetHashIndex_in6_addr
<a name="l00183"></a>00183 {
<a name="l00184"></a>00184 <span class="keyword">public</span>:
<a name="l00185"></a>00185         <span class="keyword">static</span> <span class="keywordtype">int</span> GetIndex(<span class="keyword">const</span> in6_addr &amp;ip)                                                 { <span class="keywordflow">return</span> ((((uint32_t)ip.s6_addr[12])&lt;&lt;24)|(((uint32_t)ip.s6_addr[13])&lt;&lt;16)|(((uint32_t)ip.s6_addr[14])&lt;&lt;8)|((uint32_t)ip.s6_addr[15]))%RTPUDPV6TRANS_HASHSIZE; }
<a name="l00186"></a>00186 };
<a name="l00187"></a>00187 
<a name="l00188"></a>00188 <span class="preprocessor">#define RTPUDPV6TRANS_HEADERSIZE                                                                (40+8)</span>
<a name="l00189"></a>00189 <span class="preprocessor"></span>        
<a name="l00197"></a><a class="code" href="classRTPUDPv6Transmitter.html">00197</a> <span class="keyword">class </span><a class="code" href="classRTPUDPv6Transmitter.html" title="An UDP over IPv6 transmitter.">RTPUDPv6Transmitter</a> : <span class="keyword">public</span> <a class="code" href="classRTPTransmitter.html" title="Abstract class from which actual transmission components should be derived.">RTPTransmitter</a>
<a name="l00198"></a>00198 {
<a name="l00199"></a>00199 <span class="keyword">public</span>:
<a name="l00200"></a>00200         <a class="code" href="classRTPUDPv6Transmitter.html" title="An UDP over IPv6 transmitter.">RTPUDPv6Transmitter</a>(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr);
<a name="l00201"></a>00201         ~<a class="code" href="classRTPUDPv6Transmitter.html" title="An UDP over IPv6 transmitter.">RTPUDPv6Transmitter</a>();
<a name="l00202"></a>00202 
<a name="l00203"></a>00203         <span class="keywordtype">int</span> Init(<span class="keywordtype">bool</span> treadsafe);
<a name="l00204"></a>00204         <span class="keywordtype">int</span> Create(<span class="keywordtype">size_t</span> maxpacksize,<span class="keyword">const</span> <a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a> *transparams);
<a name="l00205"></a>00205         <span class="keywordtype">void</span> Destroy();
<a name="l00206"></a>00206         <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a> *GetTransmissionInfo();
<a name="l00207"></a>00207 
<a name="l00208"></a>00208         <span class="keywordtype">int</span> GetLocalHostName(uint8_t *buffer,<span class="keywordtype">size_t</span> *bufferlength);
<a name="l00209"></a>00209         <span class="keywordtype">bool</span> ComesFromThisTransmitter(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> *addr);
<a name="l00210"></a>00210         <span class="keywordtype">size_t</span> GetHeaderOverhead()                                                              { <span class="keywordflow">return</span> RTPUDPV6TRANS_HEADERSIZE; }
<a name="l00211"></a>00211         
<a name="l00212"></a>00212         <span class="keywordtype">int</span> Poll();
<a name="l00213"></a>00213         <span class="keywordtype">int</span> WaitForIncomingData(<span class="keyword">const</span> <a class="code" href="classRTPTime.html" title="This class is used to specify wallclock time, delay intervals etc.">RTPTime</a> &amp;delay,<span class="keywordtype">bool</span> *dataavailable = 0);
<a name="l00214"></a>00214         <span class="keywordtype">int</span> AbortWait();
<a name="l00215"></a>00215         
<a name="l00216"></a>00216         <span class="keywordtype">int</span> SendRTPData(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len);   
<a name="l00217"></a>00217         <span class="keywordtype">int</span> SendRTCPData(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len);
<a name="l00218"></a>00218 
<a name="l00219"></a>00219         <span class="keywordtype">int</span> AddDestination(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00220"></a>00220         <span class="keywordtype">int</span> DeleteDestination(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00221"></a>00221         <span class="keywordtype">void</span> ClearDestinations();
<a name="l00222"></a>00222 
<a name="l00223"></a>00223         <span class="keywordtype">bool</span> SupportsMulticasting();
<a name="l00224"></a>00224         <span class="keywordtype">int</span> JoinMulticastGroup(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00225"></a>00225         <span class="keywordtype">int</span> LeaveMulticastGroup(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00226"></a>00226         <span class="keywordtype">void</span> LeaveAllMulticastGroups();
<a name="l00227"></a>00227 
<a name="l00228"></a>00228         <span class="keywordtype">int</span> SetReceiveMode(<a class="code" href="classRTPTransmitter.html#bae77e9adf52db77f5ea29757dfa6386" title="Three kind of receive modes can be specified.">RTPTransmitter::ReceiveMode</a> m);
<a name="l00229"></a>00229         <span class="keywordtype">int</span> AddToIgnoreList(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00230"></a>00230         <span class="keywordtype">int</span> DeleteFromIgnoreList(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00231"></a>00231         <span class="keywordtype">void</span> ClearIgnoreList();
<a name="l00232"></a>00232         <span class="keywordtype">int</span> AddToAcceptList(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00233"></a>00233         <span class="keywordtype">int</span> DeleteFromAcceptList(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &amp;addr);
<a name="l00234"></a>00234         <span class="keywordtype">void</span> ClearAcceptList();
<a name="l00235"></a>00235         <span class="keywordtype">int</span> SetMaximumPacketSize(<span class="keywordtype">size_t</span> s);     
<a name="l00236"></a>00236         
<a name="l00237"></a>00237         <span class="keywordtype">bool</span> NewDataAvailable();
<a name="l00238"></a>00238         <a class="code" href="classRTPRawPacket.html" title="This class is used by the transmission component to store the incoming RTP and RTCP...">RTPRawPacket</a> *GetNextPacket();
<a name="l00239"></a>00239 <span class="preprocessor">#ifdef RTPDEBUG</span>
<a name="l00240"></a>00240 <span class="preprocessor"></span>        <span class="keywordtype">void</span> Dump();
<a name="l00241"></a>00241 <span class="preprocessor">#endif // RTPDEBUG</span>
<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="keyword">private</span>:
<a name="l00243"></a>00243         <span class="keywordtype">int</span> CreateLocalIPList();
<a name="l00244"></a>00244         <span class="keywordtype">bool</span> GetLocalIPList_Interfaces();
<a name="l00245"></a>00245         <span class="keywordtype">void</span> GetLocalIPList_DNS();
<a name="l00246"></a>00246         <span class="keywordtype">void</span> AddLoopbackAddress();
<a name="l00247"></a>00247         <span class="keywordtype">void</span> FlushPackets();
<a name="l00248"></a>00248         <span class="keywordtype">int</span> PollSocket(<span class="keywordtype">bool</span> rtp);
<a name="l00249"></a>00249         <span class="keywordtype">int</span> ProcessAddAcceptIgnoreEntry(in6_addr ip,uint16_t port);
<a name="l00250"></a>00250         <span class="keywordtype">int</span> ProcessDeleteAcceptIgnoreEntry(in6_addr ip,uint16_t port);
<a name="l00251"></a>00251 <span class="preprocessor">#ifdef RTP_SUPPORT_IPV6MULTICAST</span>
<a name="l00252"></a>00252 <span class="preprocessor"></span>        <span class="keywordtype">bool</span> SetMulticastTTL(uint8_t ttl);
<a name="l00253"></a>00253 <span class="preprocessor">#endif // RTP_SUPPORT_IPV6MULTICAST</span>
<a name="l00254"></a>00254 <span class="preprocessor"></span>        <span class="keywordtype">bool</span> ShouldAcceptData(in6_addr srcip,uint16_t srcport);
<a name="l00255"></a>00255         <span class="keywordtype">void</span> ClearAcceptIgnoreInfo();
<a name="l00256"></a>00256         
<a name="l00257"></a>00257         <span class="keywordtype">bool</span> init;
<a name="l00258"></a>00258         <span class="keywordtype">bool</span> created;
<a name="l00259"></a>00259         <span class="keywordtype">bool</span> waitingfordata;
<a name="l00260"></a>00260 <span class="preprocessor">#if (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00261"></a>00261 <span class="preprocessor"></span>        SOCKET rtpsock,rtcpsock;
<a name="l00262"></a>00262 <span class="preprocessor">#else // not using winsock</span>
<a name="l00263"></a>00263 <span class="preprocessor"></span>        <span class="keywordtype">int</span> rtpsock,rtcpsock;
<a name="l00264"></a>00264 <span class="preprocessor">#endif // WIN32</span>
<a name="l00265"></a>00265 <span class="preprocessor"></span>        in6_addr bindIP;
<a name="l00266"></a>00266         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mcastifidx;
<a name="l00267"></a>00267         std::list&lt;in6_addr&gt; localIPs;
<a name="l00268"></a>00268         uint16_t portbase;
<a name="l00269"></a>00269         uint8_t multicastTTL;
<a name="l00270"></a>00270         <a class="code" href="classRTPTransmitter.html#bae77e9adf52db77f5ea29757dfa6386" title="Three kind of receive modes can be specified.">RTPTransmitter::ReceiveMode</a> receivemode;
<a name="l00271"></a>00271 
<a name="l00272"></a>00272         uint8_t *localhostname;
<a name="l00273"></a>00273         <span class="keywordtype">size_t</span> localhostnamelength;
<a name="l00274"></a>00274         
<a name="l00275"></a>00275         RTPHashTable&lt;const RTPIPv6Destination,RTPUDPv6Trans_GetHashIndex_IPv6Dest,RTPUDPV6TRANS_HASHSIZE&gt; destinations;
<a name="l00276"></a>00276 <span class="preprocessor">#ifdef RTP_SUPPORT_IPV6MULTICAST</span>
<a name="l00277"></a>00277 <span class="preprocessor"></span>        RTPHashTable&lt;const in6_addr,RTPUDPv6Trans_GetHashIndex_in6_addr,RTPUDPV6TRANS_HASHSIZE&gt; multicastgroups;
<a name="l00278"></a>00278 <span class="preprocessor">#endif // RTP_SUPPORT_IPV6MULTICAST</span>
<a name="l00279"></a>00279 <span class="preprocessor"></span>        std::list&lt;RTPRawPacket*&gt; rawpacketlist;
<a name="l00280"></a>00280 
<a name="l00281"></a>00281         <span class="keywordtype">bool</span> supportsmulticasting;
<a name="l00282"></a>00282         <span class="keywordtype">size_t</span> maxpacksize;
<a name="l00283"></a>00283 
<a name="l00284"></a>00284         <span class="keyword">class </span>PortInfo
<a name="l00285"></a>00285         {
<a name="l00286"></a>00286         <span class="keyword">public</span>:
<a name="l00287"></a>00287                 PortInfo() { all = <span class="keyword">false</span>; }
<a name="l00288"></a>00288                 
<a name="l00289"></a>00289                 <span class="keywordtype">bool</span> all;
<a name="l00290"></a>00290                 std::list&lt;uint16_t&gt; portlist;
<a name="l00291"></a>00291         };
<a name="l00292"></a>00292 
<a name="l00293"></a>00293         RTPKeyHashTable&lt;const in6_addr,PortInfo*,RTPUDPv6Trans_GetHashIndex_in6_addr,RTPUDPV6TRANS_HASHSIZE&gt; acceptignoreinfo;
<a name="l00294"></a>00294 
<a name="l00295"></a>00295         <span class="comment">// notification descriptors for AbortWait (0 is for reading, 1 for writing)</span>
<a name="l00296"></a>00296 <span class="preprocessor">#if (defined(WIN32) || defined(_WIN32_WCE))</span>
<a name="l00297"></a>00297 <span class="preprocessor"></span>        SOCKET abortdesc[2];
<a name="l00298"></a>00298 <span class="preprocessor">#else</span>
<a name="l00299"></a>00299 <span class="preprocessor"></span>        <span class="keywordtype">int</span> abortdesc[2];
<a name="l00300"></a>00300 <span class="preprocessor">#endif // WIN32</span>
<a name="l00301"></a>00301 <span class="preprocessor"></span>        <span class="keywordtype">int</span> CreateAbortDescriptors();
<a name="l00302"></a>00302         <span class="keywordtype">void</span> DestroyAbortDescriptors();
<a name="l00303"></a>00303         <span class="keywordtype">void</span> AbortWaitInternal();
<a name="l00304"></a>00304 <span class="preprocessor">#ifdef RTP_SUPPORT_THREAD</span>
<a name="l00305"></a>00305 <span class="preprocessor"></span>        JMutex mainmutex,waitmutex;
<a name="l00306"></a>00306         <span class="keywordtype">int</span> threadsafe;
<a name="l00307"></a>00307 <span class="preprocessor">#endif // RTP_SUPPORT_THREAD</span>
<a name="l00308"></a>00308 <span class="preprocessor"></span>};
<a name="l00309"></a>00309 
<a name="l00310"></a>00310 <span class="preprocessor">#endif // RTP_SUPPORT_IPV6</span>
<a name="l00311"></a>00311 <span class="preprocessor"></span>
<a name="l00312"></a>00312 <span class="preprocessor">#endif // RTPUDPV6TRANSMITTER_H</span>
<a name="l00313"></a>00313 <span class="preprocessor"></span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 09:42:08 2009 for jrtplib by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>