crypto: Add 192/256-bit key support for SRTP

This commit is contained in:
Aaro Altonen 2021-04-22 12:39:07 +03:00
parent 5c3f76f04d
commit bfaa3536c5
33 changed files with 466 additions and 352 deletions

View File

@ -74,7 +74,7 @@ if (CRYPTOPP_PATH AND NOT DISABLE_CRYPTO)
endif (CRYPTOPP_PATH AND NOT DISABLE_CRYPTO)
if (UNIX)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wuninitialized -Wshadow -O2 -std=c++17 -march=native -DNDEBUG")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wuninitialized -Wshadow -O2 -g -std=c++17 -march=native -DNDEBUG")
if (DISABLE_CRYPTO)
string(APPEND CMAKE_CXX_FLAGS " -D__RTP_NO_CRYPTO__")

View File

@ -135,12 +135,10 @@ Public Member Functions</h2></td></tr>
<p>Add keying information for user-managed SRTP session. </p>
<p>For user-managed SRTP session, the media stream is not started until SRTP key has been added and all calls to <a class="el" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18" title="Send data to remote participant with a custom timestamp.">push_frame()</a> will fail</p>
<p>Currently uvgRTP only supports key length of 16 bytes (128 bits) and salt length of 14 bytes (112 bits).</p>
<p>If the key or salt is longer, it is implicitly truncated to correct length and if the key or salt is shorter, a memory violation may occur</p>
<p>Notice that if user-managed SRTP has been enabled during media stream creation, this function must be called before anything else. All calls to other functions will fail with <a class="el" href="util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a" title="Object has not been initialized.">RTP_NOT_INITIALIZED</a> until the SRTP context has been specified</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td>128-bit long key </td></tr>
<tr><td class="paramname">key</td><td>SRTP master key, default is 128-bit long </td></tr>
<tr><td class="paramname">salt</td><td>112-bit long salt</td></tr>
</table>
</dd>

View File

@ -106,6 +106,12 @@ $(function() {
<li>RCE_SRTP_INPLACE_ENCRYPTION
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8">util.hh</a>
</li>
<li>RCE_SRTP_KEYSIZE_192
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73">util.hh</a>
</li>
<li>RCE_SRTP_KEYSIZE_256
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0">util.hh</a>
</li>
<li>RCE_SRTP_KMNGMNT_USER
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773">util.hh</a>
</li>

View File

@ -106,6 +106,12 @@ $(function() {
<li>RCE_SRTP_INPLACE_ENCRYPTION
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8">util.hh</a>
</li>
<li>RCE_SRTP_KEYSIZE_192
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73">util.hh</a>
</li>
<li>RCE_SRTP_KEYSIZE_256
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0">util.hh</a>
</li>
<li>RCE_SRTP_KMNGMNT_USER
: <a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773">util.hh</a>
</li>

View File

@ -112,110 +112,110 @@ $(function() {
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment"> * Other error return codes are defined in {conn,writer,reader,srtp}.hh */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; rtp_error_t init(uvgrtp::zrtp *zrtp);</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed"> 71</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">add_srtp_ctx</a>(uint8_t *key, uint8_t *salt);</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18"> 95</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e"> 119</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc"> 150</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b"> 181</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f"> 191</a></span>&#160; uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f">pull_frame</a>();</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736"> 204</a></span>&#160; uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736">pull_frame</a>(<span class="keywordtype">size_t</span> timeout);</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27"> 224</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">install_receive_hook</a>(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, uvgrtp::frame::rtp_frame *));</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; </div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="comment">/* If system call dispatcher is enabled and calling application has special requirements</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;<span class="comment"> * for the deallocation of a frame, it may install a deallocation hook which is called</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;<span class="comment"> * when SCD has processed the frame</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;<span class="comment"> * Return RTP_OK on success</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="comment"> * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; rtp_error_t install_deallocation_hook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *));</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="comment">/* If needed, a notification hook can be installed to uvgRTP that can be used as</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;<span class="comment"> * an information side channel to the internal state of the library.</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed"> 65</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">add_srtp_ctx</a>(uint8_t *key, uint8_t *salt);</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18"> 89</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e"> 113</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc"> 144</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc">push_frame</a>(uint8_t *data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b"> 175</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b">push_frame</a>(std::unique_ptr&lt;uint8_t[]&gt; data, <span class="keywordtype">size_t</span> data_len, uint32_t ts, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f"> 185</a></span>&#160; uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f">pull_frame</a>();</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736"> 198</a></span>&#160; uvgrtp::frame::rtp_frame *<a class="code" href="classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736">pull_frame</a>(<span class="keywordtype">size_t</span> timeout);</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27"> 218</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27">install_receive_hook</a>(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, uvgrtp::frame::rtp_frame *));</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">/* If system call dispatcher is enabled and calling application has special requirements</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;<span class="comment"> * for the deallocation of a frame, it may install a deallocation hook which is called</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;<span class="comment"> * when SCD has processed the frame</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;<span class="comment"> * Return RTP_OK on success</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;<span class="comment"> * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; rtp_error_t install_deallocation_hook(<span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *));</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="comment">/* If needed, a notification hook can be installed to uvgRTP that can be used as</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;<span class="comment"> * an information side channel to the internal state of the library.</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="comment"> * When uvgRTP encouters a situation it doesn&#39;t know how to react to,</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;<span class="comment"> * it calls the notify hook with certain notify reason number (src/util.hh).</span></div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;<span class="comment"> * Upon receiving a notification, application may ignore it or act on it somehow</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;<span class="comment"> * Currently only one notification type is supported and only receiver uses notifications</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;<span class="comment"> * When uvgRTP encouters a situation it doesn&#39;t know how to react to,</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="comment"> * it calls the notify hook with certain notify reason number (src/util.hh).</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;<span class="comment"> * Upon receiving a notification, application may ignore it or act on it somehow</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160;<span class="comment"> * Currently only one notification type is supported and only receiver uses notifications</span></div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;<span class="comment"> * &quot;arg&quot; is optional argument that is passed to hook when it is called. It may be nullptr</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;<span class="comment"> * Return RTP_OK on success</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;<span class="comment"> * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; rtp_error_t install_notify_hook(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, <span class="keywordtype">int</span>));</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5"> 261</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5">configure_ctx</a>(<span class="keywordtype">int</span> flag, ssize_t value);</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; </div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="comment">/* Setter and getter for media-specific config that can be used f.ex with Opus */</span></div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keywordtype">void</span> set_media_config(<span class="keywordtype">void</span> *config);</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keywordtype">void</span> *get_media_config();</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">/* Get unique key of the media stream</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;<span class="comment"> * Used by session to index media streams */</span></div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; uint32_t get_key();</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; </div>
<div class="line"><a name="l00285"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2"> 285</a></span>&#160; <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a> *<a class="code" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">get_rtcp</a>();</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;<span class="comment"> * &quot;arg&quot; is optional argument that is passed to hook when it is called. It may be nullptr</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;<span class="comment"> * Return RTP_OK on success</span></div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;<span class="comment"> * Return RTP_INVALID_VALUE if &quot;hook&quot; is nullptr */</span></div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; rtp_error_t install_notify_hook(<span class="keywordtype">void</span> *arg, <span class="keywordtype">void</span> (*hook)(<span class="keywordtype">void</span> *, <span class="keywordtype">int</span>));</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5"> 255</a></span>&#160; rtp_error_t <a class="code" href="classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5">configure_ctx</a>(<span class="keywordtype">int</span> flag, ssize_t value);</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; <span class="comment">/* Setter and getter for media-specific config that can be used f.ex with Opus */</span></div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="keywordtype">void</span> set_media_config(<span class="keywordtype">void</span> *config);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="keywordtype">void</span> *get_media_config();</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="comment">/* Get unique key of the media stream</span></div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;<span class="comment"> * Used by session to index media streams */</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; uint32_t get_key();</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; </div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2"> 279</a></span>&#160; <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a> *<a class="code" href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">get_rtcp</a>();</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <span class="comment">/* Initialize the connection by initializing the socket</span></div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160;<span class="comment"> * and binding ourselves to specified interface and creating</span></div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="comment"> * an outgoing address */</span></div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; rtp_error_t init_connection();</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="comment">/* Initialize the connection by initializing the socket</span></div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;<span class="comment"> * and binding ourselves to specified interface and creating</span></div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="comment"> * an outgoing address */</span></div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; rtp_error_t init_connection();</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="comment">/* Create the media object for the stream */</span></div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; rtp_error_t create_media(rtp_format_t fmt);</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <span class="comment">/* free all allocated resources */</span></div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; rtp_error_t free_resources(rtp_error_t ret);</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="comment">/* Create the media object for the stream */</span></div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; rtp_error_t create_media(rtp_format_t fmt);</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; </div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="comment">/* free all allocated resources */</span></div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; rtp_error_t free_resources(rtp_error_t ret);</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; </div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; uint32_t key_;</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; uint32_t key_;</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; uvgrtp::srtp *srtp_;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; uvgrtp::srtcp *srtcp_;</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; uvgrtp::socket *socket_;</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; uvgrtp::rtp *rtp_;</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a> *rtcp_;</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; </div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; uvgrtp::srtp *srtp_;</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; uvgrtp::srtcp *srtcp_;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; uvgrtp::socket *socket_;</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; uvgrtp::rtp *rtp_;</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <a class="code" href="classuvgrtp_1_1rtcp.html">uvgrtp::rtcp</a> *rtcp_;</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; </div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; sockaddr_in addr_out_;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; std::string addr_;</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; std::string laddr_;</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="keywordtype">int</span> src_port_;</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keywordtype">int</span> dst_port_;</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; rtp_format_t fmt_;</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordtype">int</span> flags_;</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; sockaddr_in addr_out_;</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; std::string addr_;</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; std::string laddr_;</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="keywordtype">int</span> src_port_;</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="keywordtype">int</span> dst_port_;</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; rtp_format_t fmt_;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <span class="keywordtype">int</span> flags_;</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="comment">/* Media context config (SCD etc.) */</span></div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; rtp_ctx_conf_t ctx_config_;</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="comment">/* Media config f.ex. for Opus */</span></div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordtype">void</span> *media_config_;</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="comment">/* Media context config (SCD etc.) */</span></div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; rtp_ctx_conf_t ctx_config_;</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="comment">/* Has the media stream been initialized */</span></div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; <span class="keywordtype">bool</span> initialized_;</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; </div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="comment">/* Media config f.ex. for Opus */</span></div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="keywordtype">void</span> *media_config_;</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; </div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; <span class="comment">/* Has the media stream been initialized */</span></div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="keywordtype">bool</span> initialized_;</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; </div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="comment">/* Primary handler keys for the RTP packet dispatcher */</span></div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; uint32_t rtp_handler_key_;</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; uint32_t zrtp_handler_key_;</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="comment">/* Primary handler keys for the RTP packet dispatcher */</span></div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; uint32_t rtp_handler_key_;</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; uint32_t zrtp_handler_key_;</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="comment">/* RTP packet dispatcher for the receiver */</span></div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; uvgrtp::pkt_dispatcher *pkt_dispatcher_;</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="comment">/* Media object associated with this media stream. */</span></div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; uvgrtp::formats::media *media_;</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="comment">/* RTP packet dispatcher for the receiver */</span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; uvgrtp::pkt_dispatcher *pkt_dispatcher_;</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="comment">/* Media object associated with this media stream. */</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; uvgrtp::formats::media *media_;</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; </div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="comment">/* Thread that keeps the holepunched connection open for unidirectional streams */</span></div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; uvgrtp::holepuncher *holepuncher_;</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; };</div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;};</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; </div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;<span class="keyword">namespace </span>uvg_rtp = uvgrtp;</div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="comment">/* Thread that keeps the holepunched connection open for unidirectional streams */</span></div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; uvgrtp::holepuncher *holepuncher_;</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; };</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;};</div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; </div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;<span class="keyword">namespace </span>uvg_rtp = uvgrtp;</div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html">uvgrtp::media_stream</a></div><div class="ttdef"><b>Definition:</b> media_stream.hh:18</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a0950a91bd645cbf842d8218ae4171aed"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed">uvgrtp::media_stream::add_srtp_ctx</a></div><div class="ttdeci">rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt)</div><div class="ttdoc">Add keying information for user-managed SRTP session.</div></div>
<div class="ttc" id="aclassuvgrtp_1_1media__stream_html_a1134ff0271ad54bf1e07feed422118c2"><div class="ttname"><a href="classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2">uvgrtp::media_stream::get_rtcp</a></div><div class="ttdeci">uvgrtp::rtcp * get_rtcp()</div><div class="ttdoc">Get pointer to the RTCP object of the media stream.</div></div>

View File

@ -14,37 +14,39 @@ var searchData=
['rce_5fsrtp_27',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]],
['rce_5fsrtp_5fauthenticate_5frtp_28',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]],
['rce_5fsrtp_5finplace_5fencryption_29',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fuser_30',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fzrtp_31',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]],
['rce_5fsrtp_5fnull_5fcipher_32',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]],
['rce_5fsrtp_5freplay_5fprotection_33',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]],
['rtcp_34',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]],
['rtp_5fauth_5ftag_5fmismatch_35',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]],
['rtp_5fbind_5ferror_36',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]],
['rtp_5fcopy_37',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]],
['rtp_5fctx_5fconfiguration_5fflags_38',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]],
['rtp_5fctx_5fenable_5fflags_39',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]],
['rtp_5ferror_40',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]],
['rtp_5fflags_41',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]],
['rtp_5fformat_42',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]],
['rtp_5fformat_5fgeneric_43',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]],
['rtp_5fformat_5fh264_44',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]],
['rtp_5fformat_5fh265_45',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]],
['rtp_5fformat_5fh266_46',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]],
['rtp_5fformat_5fopus_47',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]],
['rtp_5fgeneric_5ferror_48',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]],
['rtp_5finitialized_49',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]],
['rtp_5finvalid_5fvalue_50',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]],
['rtp_5fmemory_5ferror_51',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]],
['rtp_5fno_5fflags_52',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]],
['rtp_5fnot_5ffound_53',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]],
['rtp_5fnot_5finitialized_54',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]],
['rtp_5fnot_5fsupported_55',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]],
['rtp_5fok_56',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]],
['rtp_5frecv_5ferror_57',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]],
['rtp_5fsend_5ferror_58',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]],
['rtp_5fslice_59',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]],
['rtp_5fsocket_5ferror_60',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]],
['rtp_5fssrc_5fcollision_61',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]],
['rtp_5ftimeout_62',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]]
['rce_5fsrtp_5fkeysize_5f192_30',['RCE_SRTP_KEYSIZE_192',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73',1,'util.hh']]],
['rce_5fsrtp_5fkeysize_5f256_31',['RCE_SRTP_KEYSIZE_256',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fuser_32',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fzrtp_33',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]],
['rce_5fsrtp_5fnull_5fcipher_34',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]],
['rce_5fsrtp_5freplay_5fprotection_35',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]],
['rtcp_36',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]],
['rtp_5fauth_5ftag_5fmismatch_37',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]],
['rtp_5fbind_5ferror_38',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]],
['rtp_5fcopy_39',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]],
['rtp_5fctx_5fconfiguration_5fflags_40',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]],
['rtp_5fctx_5fenable_5fflags_41',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]],
['rtp_5ferror_42',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]],
['rtp_5fflags_43',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]],
['rtp_5fformat_44',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]],
['rtp_5fformat_5fgeneric_45',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]],
['rtp_5fformat_5fh264_46',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]],
['rtp_5fformat_5fh265_47',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]],
['rtp_5fformat_5fh266_48',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]],
['rtp_5fformat_5fopus_49',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]],
['rtp_5fgeneric_5ferror_50',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]],
['rtp_5finitialized_51',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]],
['rtp_5finvalid_5fvalue_52',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]],
['rtp_5fmemory_5ferror_53',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]],
['rtp_5fno_5fflags_54',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]],
['rtp_5fnot_5ffound_55',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]],
['rtp_5fnot_5finitialized_56',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]],
['rtp_5fnot_5fsupported_57',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]],
['rtp_5fok_58',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]],
['rtp_5frecv_5ferror_59',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]],
['rtp_5fsend_5ferror_60',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]],
['rtp_5fslice_61',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]],
['rtp_5fsocket_5ferror_62',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]],
['rtp_5fssrc_5fcollision_63',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]],
['rtp_5ftimeout_64',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]]
];

View File

@ -1,8 +1,8 @@
var searchData=
[
['send_5fapp_5fpacket_63',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]],
['send_5fbye_5fpacket_64',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]],
['send_5fsdes_5fpacket_65',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]],
['session_66',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]],
['set_5fts_5finfo_67',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]]
['send_5fapp_5fpacket_65',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]],
['send_5fbye_5fpacket_66',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]],
['send_5fsdes_5fpacket_67',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]],
['session_68',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]],
['set_5fts_5finfo_69',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]]
];

View File

@ -1,5 +1,5 @@
var searchData=
[
['util_2ehh_68',['util.hh',['../util_8hh.html',1,'']]],
['uvgrtp_20public_20api_20documentation_69',['uvgRTP public API documentation',['../index.html',1,'']]]
['util_2ehh_70',['util.hh',['../util_8hh.html',1,'']]],
['uvgrtp_20public_20api_20documentation_71',['uvgRTP public API documentation',['../index.html',1,'']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['_7econtext_70',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]]
['_7econtext_72',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['context_71',['context',['../classuvgrtp_1_1context.html',1,'uvgrtp']]]
['context_73',['context',['../classuvgrtp_1_1context.html',1,'uvgrtp']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['media_5fstream_72',['media_stream',['../classuvgrtp_1_1media__stream.html',1,'uvgrtp']]]
['media_5fstream_74',['media_stream',['../classuvgrtp_1_1media__stream.html',1,'uvgrtp']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['rtcp_73',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]]
['rtcp_75',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['session_74',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]]
['session_76',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]]
];

View File

@ -1,8 +1,8 @@
var searchData=
[
['rtp_5fctx_5fconfiguration_5fflags_96',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]],
['rtp_5fctx_5fenable_5fflags_97',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]],
['rtp_5ferror_98',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]],
['rtp_5fflags_99',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]],
['rtp_5fformat_100',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]]
['rtp_5fctx_5fconfiguration_5fflags_98',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]],
['rtp_5fctx_5fenable_5fflags_99',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]],
['rtp_5ferror_100',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]],
['rtp_5fflags_101',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]],
['rtp_5fformat_102',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]]
];

View File

@ -1,44 +1,46 @@
var searchData=
[
['rcc_5fdyn_5fpayload_5ftype_101',['RCC_DYN_PAYLOAD_TYPE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617',1,'util.hh']]],
['rcc_5fmtu_5fsize_102',['RCC_MTU_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83',1,'util.hh']]],
['rcc_5fpkt_5fmax_5fdelay_103',['RCC_PKT_MAX_DELAY',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135',1,'util.hh']]],
['rcc_5fudp_5frcv_5fbuf_5fsize_104',['RCC_UDP_RCV_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663',1,'util.hh']]],
['rcc_5fudp_5fsnd_5fbuf_5fsize_105',['RCC_UDP_SND_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b',1,'util.hh']]],
['rce_5ffragment_5fgeneric_106',['RCE_FRAGMENT_GENERIC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5b0a8dbb22c20ebe8c0711541fb68a79',1,'util.hh']]],
['rce_5fh26x_5fprepend_5fsc_107',['RCE_H26X_PREPEND_SC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa75a655a9170ae88e07e993c1dd7ca4f7',1,'util.hh']]],
['rce_5fholepunch_5fkeepalive_108',['RCE_HOLEPUNCH_KEEPALIVE',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95',1,'util.hh']]],
['rce_5fno_5fh26x_5fintra_5fdelay_109',['RCE_NO_H26X_INTRA_DELAY',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5e9f19a63c964806ac9ff4ee089745e0',1,'util.hh']]],
['rce_5fno_5fsystem_5fcall_5fclustering_110',['RCE_NO_SYSTEM_CALL_CLUSTERING',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0',1,'util.hh']]],
['rce_5frtcp_111',['RCE_RTCP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d',1,'util.hh']]],
['rce_5fsrtp_112',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]],
['rce_5fsrtp_5fauthenticate_5frtp_113',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]],
['rce_5fsrtp_5finplace_5fencryption_114',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fuser_115',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fzrtp_116',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]],
['rce_5fsrtp_5fnull_5fcipher_117',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]],
['rce_5fsrtp_5freplay_5fprotection_118',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]],
['rtp_5fauth_5ftag_5fmismatch_119',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]],
['rtp_5fbind_5ferror_120',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]],
['rtp_5fcopy_121',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]],
['rtp_5fformat_5fgeneric_122',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]],
['rtp_5fformat_5fh264_123',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]],
['rtp_5fformat_5fh265_124',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]],
['rtp_5fformat_5fh266_125',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]],
['rtp_5fformat_5fopus_126',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]],
['rtp_5fgeneric_5ferror_127',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]],
['rtp_5finitialized_128',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]],
['rtp_5finvalid_5fvalue_129',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]],
['rtp_5fmemory_5ferror_130',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]],
['rtp_5fno_5fflags_131',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]],
['rtp_5fnot_5ffound_132',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]],
['rtp_5fnot_5finitialized_133',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]],
['rtp_5fnot_5fsupported_134',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]],
['rtp_5fok_135',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]],
['rtp_5frecv_5ferror_136',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]],
['rtp_5fsend_5ferror_137',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]],
['rtp_5fslice_138',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]],
['rtp_5fsocket_5ferror_139',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]],
['rtp_5fssrc_5fcollision_140',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]],
['rtp_5ftimeout_141',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]]
['rcc_5fdyn_5fpayload_5ftype_103',['RCC_DYN_PAYLOAD_TYPE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617',1,'util.hh']]],
['rcc_5fmtu_5fsize_104',['RCC_MTU_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83',1,'util.hh']]],
['rcc_5fpkt_5fmax_5fdelay_105',['RCC_PKT_MAX_DELAY',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135',1,'util.hh']]],
['rcc_5fudp_5frcv_5fbuf_5fsize_106',['RCC_UDP_RCV_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663',1,'util.hh']]],
['rcc_5fudp_5fsnd_5fbuf_5fsize_107',['RCC_UDP_SND_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b',1,'util.hh']]],
['rce_5ffragment_5fgeneric_108',['RCE_FRAGMENT_GENERIC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5b0a8dbb22c20ebe8c0711541fb68a79',1,'util.hh']]],
['rce_5fh26x_5fprepend_5fsc_109',['RCE_H26X_PREPEND_SC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa75a655a9170ae88e07e993c1dd7ca4f7',1,'util.hh']]],
['rce_5fholepunch_5fkeepalive_110',['RCE_HOLEPUNCH_KEEPALIVE',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95',1,'util.hh']]],
['rce_5fno_5fh26x_5fintra_5fdelay_111',['RCE_NO_H26X_INTRA_DELAY',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5e9f19a63c964806ac9ff4ee089745e0',1,'util.hh']]],
['rce_5fno_5fsystem_5fcall_5fclustering_112',['RCE_NO_SYSTEM_CALL_CLUSTERING',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0',1,'util.hh']]],
['rce_5frtcp_113',['RCE_RTCP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d',1,'util.hh']]],
['rce_5fsrtp_114',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]],
['rce_5fsrtp_5fauthenticate_5frtp_115',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]],
['rce_5fsrtp_5finplace_5fencryption_116',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]],
['rce_5fsrtp_5fkeysize_5f192_117',['RCE_SRTP_KEYSIZE_192',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73',1,'util.hh']]],
['rce_5fsrtp_5fkeysize_5f256_118',['RCE_SRTP_KEYSIZE_256',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fuser_119',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]],
['rce_5fsrtp_5fkmngmnt_5fzrtp_120',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]],
['rce_5fsrtp_5fnull_5fcipher_121',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]],
['rce_5fsrtp_5freplay_5fprotection_122',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]],
['rtp_5fauth_5ftag_5fmismatch_123',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]],
['rtp_5fbind_5ferror_124',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]],
['rtp_5fcopy_125',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]],
['rtp_5fformat_5fgeneric_126',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]],
['rtp_5fformat_5fh264_127',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]],
['rtp_5fformat_5fh265_128',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]],
['rtp_5fformat_5fh266_129',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]],
['rtp_5fformat_5fopus_130',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]],
['rtp_5fgeneric_5ferror_131',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]],
['rtp_5finitialized_132',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]],
['rtp_5finvalid_5fvalue_133',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]],
['rtp_5fmemory_5ferror_134',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]],
['rtp_5fno_5fflags_135',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]],
['rtp_5fnot_5ffound_136',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]],
['rtp_5fnot_5finitialized_137',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]],
['rtp_5fnot_5fsupported_138',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]],
['rtp_5fok_139',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]],
['rtp_5frecv_5ferror_140',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]],
['rtp_5fsend_5ferror_141',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]],
['rtp_5fslice_142',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]],
['rtp_5fsocket_5ferror_143',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]],
['rtp_5fssrc_5fcollision_144',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]],
['rtp_5ftimeout_145',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['util_2ehh_75',['util.hh',['../util_8hh.html',1,'']]]
['util_2ehh_77',['util.hh',['../util_8hh.html',1,'']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['add_5fsrtp_5fctx_76',['add_srtp_ctx',['../classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed',1,'uvgrtp::media_stream']]]
['add_5fsrtp_5fctx_78',['add_srtp_ctx',['../classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed',1,'uvgrtp::media_stream']]]
];

View File

@ -1,7 +1,7 @@
var searchData=
[
['configure_5fctx_77',['configure_ctx',['../classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5',1,'uvgrtp::media_stream']]],
['context_78',['context',['../classuvgrtp_1_1context.html#a98be18c2848404549cfadf910ba1573a',1,'uvgrtp::context']]],
['create_5fsession_79',['create_session',['../classuvgrtp_1_1context.html#aa109aa2a419933359d225d19bcf3b2f9',1,'uvgrtp::context::create_session(std::string addr)'],['../classuvgrtp_1_1context.html#a0007eebfd5131bf0930cfedc0c4018e8',1,'uvgrtp::context::create_session(std::string remote_addr, std::string local_addr)']]],
['create_5fstream_80',['create_stream',['../classuvgrtp_1_1session.html#a71aad1226214b1b0b1ba60a46c048ab2',1,'uvgrtp::session']]]
['configure_5fctx_79',['configure_ctx',['../classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5',1,'uvgrtp::media_stream']]],
['context_80',['context',['../classuvgrtp_1_1context.html#a98be18c2848404549cfadf910ba1573a',1,'uvgrtp::context']]],
['create_5fsession_81',['create_session',['../classuvgrtp_1_1context.html#aa109aa2a419933359d225d19bcf3b2f9',1,'uvgrtp::context::create_session(std::string addr)'],['../classuvgrtp_1_1context.html#a0007eebfd5131bf0930cfedc0c4018e8',1,'uvgrtp::context::create_session(std::string remote_addr, std::string local_addr)']]],
['create_5fstream_82',['create_stream',['../classuvgrtp_1_1session.html#a71aad1226214b1b0b1ba60a46c048ab2',1,'uvgrtp::session']]]
];

View File

@ -1,5 +1,5 @@
var searchData=
[
['destroy_5fsession_81',['destroy_session',['../classuvgrtp_1_1context.html#a61daf2f3cdcdf2542ee997ab6de5efa9',1,'uvgrtp::context']]],
['destroy_5fstream_82',['destroy_stream',['../classuvgrtp_1_1session.html#a291629a3bfb910463b88d8edb3984149',1,'uvgrtp::session']]]
['destroy_5fsession_83',['destroy_session',['../classuvgrtp_1_1context.html#a61daf2f3cdcdf2542ee997ab6de5efa9',1,'uvgrtp::context']]],
['destroy_5fstream_84',['destroy_stream',['../classuvgrtp_1_1session.html#a291629a3bfb910463b88d8edb3984149',1,'uvgrtp::session']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['get_5frtcp_83',['get_rtcp',['../classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2',1,'uvgrtp::media_stream']]]
['get_5frtcp_85',['get_rtcp',['../classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2',1,'uvgrtp::media_stream']]]
];

View File

@ -1,8 +1,8 @@
var searchData=
[
['install_5fapp_5fhook_84',['install_app_hook',['../classuvgrtp_1_1rtcp.html#a977c99cfaa1442553ab12d4c140bbb0f',1,'uvgrtp::rtcp']]],
['install_5freceive_5fhook_85',['install_receive_hook',['../classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27',1,'uvgrtp::media_stream']]],
['install_5freceiver_5fhook_86',['install_receiver_hook',['../classuvgrtp_1_1rtcp.html#a04c887fe95173d55294f57d639a1f602',1,'uvgrtp::rtcp']]],
['install_5fsdes_5fhook_87',['install_sdes_hook',['../classuvgrtp_1_1rtcp.html#ad694a3a869b1c28309e1f2db6d7c2e50',1,'uvgrtp::rtcp']]],
['install_5fsender_5fhook_88',['install_sender_hook',['../classuvgrtp_1_1rtcp.html#a4a262a814ffa3093ac6829c90b0b3fd1',1,'uvgrtp::rtcp']]]
['install_5fapp_5fhook_86',['install_app_hook',['../classuvgrtp_1_1rtcp.html#a977c99cfaa1442553ab12d4c140bbb0f',1,'uvgrtp::rtcp']]],
['install_5freceive_5fhook_87',['install_receive_hook',['../classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27',1,'uvgrtp::media_stream']]],
['install_5freceiver_5fhook_88',['install_receiver_hook',['../classuvgrtp_1_1rtcp.html#a04c887fe95173d55294f57d639a1f602',1,'uvgrtp::rtcp']]],
['install_5fsdes_5fhook_89',['install_sdes_hook',['../classuvgrtp_1_1rtcp.html#ad694a3a869b1c28309e1f2db6d7c2e50',1,'uvgrtp::rtcp']]],
['install_5fsender_5fhook_90',['install_sender_hook',['../classuvgrtp_1_1rtcp.html#a4a262a814ffa3093ac6829c90b0b3fd1',1,'uvgrtp::rtcp']]]
];

View File

@ -1,5 +1,5 @@
var searchData=
[
['pull_5fframe_89',['pull_frame',['../classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f',1,'uvgrtp::media_stream::pull_frame()'],['../classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736',1,'uvgrtp::media_stream::pull_frame(size_t timeout)']]],
['push_5fframe_90',['push_frame',['../classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e',1,'uvgrtp::media_stream::push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags)'],['../classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b',1,'uvgrtp::media_stream::push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, uint32_t ts, int flags)']]]
['pull_5fframe_91',['pull_frame',['../classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f',1,'uvgrtp::media_stream::pull_frame()'],['../classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736',1,'uvgrtp::media_stream::pull_frame(size_t timeout)']]],
['push_5fframe_92',['push_frame',['../classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e',1,'uvgrtp::media_stream::push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags)'],['../classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b',1,'uvgrtp::media_stream::push_frame(std::unique_ptr&lt; uint8_t[]&gt; data, size_t data_len, uint32_t ts, int flags)']]]
];

View File

@ -1,7 +1,7 @@
var searchData=
[
['send_5fapp_5fpacket_91',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]],
['send_5fbye_5fpacket_92',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]],
['send_5fsdes_5fpacket_93',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]],
['set_5fts_5finfo_94',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]]
['send_5fapp_5fpacket_93',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]],
['send_5fbye_5fpacket_94',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]],
['send_5fsdes_5fpacket_95',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]],
['set_5fts_5finfo_96',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['_7econtext_95',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]]
['_7econtext_97',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]]
];

View File

@ -1,4 +1,4 @@
var searchData=
[
['uvgrtp_20public_20api_20documentation_142',['uvgRTP public API documentation',['../index.html',1,'']]]
['uvgrtp_20public_20api_20documentation_146',['uvgRTP public API documentation',['../index.html',1,'']]]
];

View File

@ -190,7 +190,11 @@ Enumerations</h2></td></tr>
, <br />
&#160;&#160;<a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95">RCE_HOLEPUNCH_KEEPALIVE</a> = 1 &lt;&lt; 14
, <br />
&#160;&#160;<b>RCE_LAST</b> = 1 &lt;&lt; 15
&#160;&#160;<a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73">RCE_SRTP_KEYSIZE_192</a> = 1 &lt;&lt; 15
, <br />
&#160;&#160;<a class="el" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0">RCE_SRTP_KEYSIZE_256</a> = 1 &lt;&lt; 16
, <br />
&#160;&#160;<b>RCE_LAST</b> = 1 &lt;&lt; 17
<br />
}</td></tr>
<tr class="memdesc:a15b2d6364db6065a482c99827f4bd2af"><td class="mdescLeft">&#160;</td><td class="mdescRight">RTP context enable flags. <a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af">More...</a><br /></td></tr>
@ -307,6 +311,10 @@ Enumerations</h2></td></tr>
</td></tr>
<tr><td class="fieldname"><a id="a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95"></a>RCE_HOLEPUNCH_KEEPALIVE&#160;</td><td class="fielddoc"><p>If the Mediastream object is used as a unidirectional stream but holepunching has been enabled, this flag can be used to make uvgRTP periodically send a short UDP datagram to keep the hole in the firewall open </p>
</td></tr>
<tr><td class="fieldname"><a id="a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73"></a>RCE_SRTP_KEYSIZE_192&#160;</td><td class="fielddoc"><p>Use 192-bit keys with SRTP </p>
</td></tr>
<tr><td class="fieldname"><a id="a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0"></a>RCE_SRTP_KEYSIZE_256&#160;</td><td class="fielddoc"><p>Use 256-bit keys with SRTP </p>
</td></tr>
</table>
</div>

View File

@ -187,89 +187,94 @@ $(function() {
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95"> 221</a></span>&#160; <a class="code" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95">RCE_HOLEPUNCH_KEEPALIVE</a> = 1 &lt;&lt; 14,</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; RCE_LAST = 1 &lt;&lt; 15,</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;};</div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73"> 224</a></span>&#160; <a class="code" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73">RCE_SRTP_KEYSIZE_192</a> = 1 &lt;&lt; 15,</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587f"> 233</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587f">RTP_CTX_CONFIGURATION_FLAGS</a> {</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; RCC_NO_FLAGS = 0,</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663"> 242</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663">RCC_UDP_RCV_BUF_SIZE</a> = 1,</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; </div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b"> 250</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b">RCC_UDP_SND_BUF_SIZE</a> = 2,</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135"> 258</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135">RCC_PKT_MAX_DELAY</a> = 3,</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617"> 262</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617">RCC_DYN_PAYLOAD_TYPE</a> = 4,</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83"> 272</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a> = 5,</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; RCC_LAST</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;};</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;<span class="keyword">enum</span> NOTIFY_REASON {</div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0"> 227</a></span>&#160; <a class="code" href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0">RCE_SRTP_KEYSIZE_256</a> = 1 &lt;&lt; 16,</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; RCE_LAST = 1 &lt;&lt; 17,</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;};</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587f"> 239</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587f">RTP_CTX_CONFIGURATION_FLAGS</a> {</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; RCC_NO_FLAGS = 0,</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663"> 248</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663">RCC_UDP_RCV_BUF_SIZE</a> = 1,</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b"> 256</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b">RCC_UDP_SND_BUF_SIZE</a> = 2,</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; </div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135"> 264</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135">RCC_PKT_MAX_DELAY</a> = 3,</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617"> 268</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617">RCC_DYN_PAYLOAD_TYPE</a> = 4,</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83"> 278</a></span>&#160; <a class="code" href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a> = 5,</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; </div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <span class="comment">/* Timer for the active frame has expired and it has been dropped */</span></div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; NR_FRAME_DROPPED = 0,</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;};</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="comment">/* see src/util.hh for more information */</span></div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>rtp_ctx_conf {</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keywordtype">int</span> flags;</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; ssize_t ctx_values[RCC_LAST];</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;} rtp_ctx_conf_t;</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; RCC_LAST</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;};</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;<span class="keyword">enum</span> NOTIFY_REASON {</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="comment">/* Timer for the active frame has expired and it has been dropped */</span></div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; NR_FRAME_DROPPED = 0,</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;};</div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="keyword">extern</span> thread_local rtp_error_t rtp_errno;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;<span class="preprocessor">#define TIME_DIFF(s, e, u) ((ssize_t)std::chrono::duration_cast&lt;std::chrono::u&gt;(e - s).count())</span></div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; </div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;<span class="preprocessor">#define SET_NEXT_FIELD_32(a, p, v) do { *(uint32_t *)&amp;(a)[p] = (v); p += 4; } while (0)</span></div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;<span class="preprocessor">#define SET_FIELD_32(a, i, v) do { *(uint32_t *)&amp;(a)[i] = (v); } while (0)</span></div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> hex_dump(uint8_t *buf, <span class="keywordtype">size_t</span> len)</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;{</div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <span class="keywordflow">if</span> (!buf)</div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; len; i += 10) {</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;\t&quot;</span>);</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k = i; k &lt; i + 10; ++k) {</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;0x%02x &quot;</span>, buf[k]);</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; }</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; }</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;}</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; </div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> set_bytes(<span class="keywordtype">int</span> *ptr, <span class="keywordtype">int</span> nbytes)</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;{</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordflow">if</span> (ptr)</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; *ptr = nbytes;</div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;<span class="comment">/* see src/util.hh for more information */</span></div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>rtp_ctx_conf {</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="keywordtype">int</span> flags;</div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; ssize_t ctx_values[RCC_LAST];</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;} rtp_ctx_conf_t;</div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; </div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;<span class="keyword">extern</span> thread_local rtp_error_t rtp_errno;</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;<span class="preprocessor">#define TIME_DIFF(s, e, u) ((ssize_t)std::chrono::duration_cast&lt;std::chrono::u&gt;(e - s).count())</span></div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;<span class="preprocessor">#define SET_NEXT_FIELD_32(a, p, v) do { *(uint32_t *)&amp;(a)[p] = (v); p += 4; } while (0)</span></div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;<span class="preprocessor">#define SET_FIELD_32(a, i, v) do { *(uint32_t *)&amp;(a)[i] = (v); } while (0)</span></div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> hex_dump(uint8_t *buf, <span class="keywordtype">size_t</span> len)</div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;{</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="keywordflow">if</span> (!buf)</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; </div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; len; i += 10) {</div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;\t&quot;</span>);</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k = i; k &lt; i + 10; ++k) {</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;0x%02x &quot;</span>, buf[k]);</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; }</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; fprintf(stderr, <span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; }</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;}</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; </div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> *memdup(<span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">size_t</span> len)</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> set_bytes(<span class="keywordtype">int</span> *ptr, <span class="keywordtype">int</span> nbytes)</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160;{</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; uint8_t *dst = <span class="keyword">new</span> uint8_t[len];</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; std::memcpy(dst, src, len);</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="keywordflow">return</span> dst;</div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;}</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> std::string generate_string(<span class="keywordtype">size_t</span> length)</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;{</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <span class="keyword">auto</span> randchar = []() -&gt; <span class="keywordtype">char</span></div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; {</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> charset[] =</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <span class="stringliteral">&quot;0123456789&quot;</span></div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; <span class="stringliteral">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; <span class="stringliteral">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span>;</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> max_index = (<span class="keyword">sizeof</span>(charset) - 1);</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="keywordflow">return</span> charset[ rand() % max_index ];</div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; };</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; </div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; std::string str(length, 0);</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; std::generate_n(str.begin(), length, randchar);</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="keywordflow">return</span> str;</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;}</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="keywordflow">if</span> (ptr)</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; *ptr = nbytes;</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;}</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> *memdup(<span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">size_t</span> len)</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;{</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; uint8_t *dst = <span class="keyword">new</span> uint8_t[len];</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; std::memcpy(dst, src, len);</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="keywordflow">return</span> dst;</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;}</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> std::string generate_string(<span class="keywordtype">size_t</span> length)</div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;{</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keyword">auto</span> randchar = []() -&gt; <span class="keywordtype">char</span></div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; {</div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> charset[] =</div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="stringliteral">&quot;0123456789&quot;</span></div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; <span class="stringliteral">&quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;</span></div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="stringliteral">&quot;abcdefghijklmnopqrstuvwxyz&quot;</span>;</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> max_index = (<span class="keyword">sizeof</span>(charset) - 1);</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="keywordflow">return</span> charset[ rand() % max_index ];</div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; };</div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; </div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; std::string str(length, 0);</div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; std::generate_n(str.begin(), length, randchar);</div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; <span class="keywordflow">return</span> str;</div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;}</div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2af"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2af">RTP_CTX_ENABLE_FLAGS</a></div><div class="ttdeci">RTP_CTX_ENABLE_FLAGS</div><div class="ttdoc">RTP context enable flags.</div><div class="ttdef"><b>Definition:</b> util.hh:118</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0">RCE_SRTP_KEYSIZE_256</a></div><div class="ttdeci">@ RCE_SRTP_KEYSIZE_256</div><div class="ttdef"><b>Definition:</b> util.hh:227</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8">RCE_SRTP_INPLACE_ENCRYPTION</a></div><div class="ttdeci">@ RCE_SRTP_INPLACE_ENCRYPTION</div><div class="ttdef"><b>Definition:</b> util.hh:191</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75">RCE_SRTP_KMNGMNT_ZRTP</a></div><div class="ttdeci">@ RCE_SRTP_KMNGMNT_ZRTP</div><div class="ttdef"><b>Definition:</b> util.hh:135</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773">RCE_SRTP_KMNGMNT_USER</a></div><div class="ttdeci">@ RCE_SRTP_KMNGMNT_USER</div><div class="ttdef"><b>Definition:</b> util.hh:145</div></div>
@ -282,6 +287,7 @@ $(function() {
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d">RCE_RTCP</a></div><div class="ttdeci">@ RCE_RTCP</div><div class="ttdef"><b>Definition:</b> util.hh:212</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0">RCE_NO_SYSTEM_CALL_CLUSTERING</a></div><div class="ttdeci">@ RCE_NO_SYSTEM_CALL_CLUSTERING</div><div class="ttdef"><b>Definition:</b> util.hh:194</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1">RCE_SRTP_REPLAY_PROTECTION</a></div><div class="ttdeci">@ RCE_SRTP_REPLAY_PROTECTION</div><div class="ttdef"><b>Definition:</b> util.hh:208</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73">RCE_SRTP_KEYSIZE_192</a></div><div class="ttdeci">@ RCE_SRTP_KEYSIZE_192</div><div class="ttdef"><b>Definition:</b> util.hh:224</div></div>
<div class="ttc" id="autil_8hh_html_a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b"><div class="ttname"><a href="util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b">RCE_SRTP</a></div><div class="ttdeci">@ RCE_SRTP</div><div class="ttdef"><b>Definition:</b> util.hh:125</div></div>
<div class="ttc" id="autil_8hh_html_a313c6640ac5ed9384184a94ec57a9a96"><div class="ttname"><a href="util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96">RTP_FORMAT</a></div><div class="ttdeci">RTP_FORMAT</div><div class="ttdoc">These flags are given to uvgrtp::session::create_stream()</div><div class="ttdef"><b>Definition:</b> util.hh:85</div></div>
<div class="ttc" id="autil_8hh_html_a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d"><div class="ttname"><a href="util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d">RTP_FORMAT_H266</a></div><div class="ttdeci">@ RTP_FORMAT_H266</div><div class="ttdoc">H.266/VVC.</div><div class="ttdef"><b>Definition:</b> util.hh:89</div></div>
@ -305,12 +311,12 @@ $(function() {
<div class="ttc" id="autil_8hh_html_aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348"><div class="ttname"><a href="util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348">RTP_MEMORY_ERROR</a></div><div class="ttdeci">@ RTP_MEMORY_ERROR</div><div class="ttdoc">Memory allocation failed.</div><div class="ttdef"><b>Definition:</b> util.hh:69</div></div>
<div class="ttc" id="autil_8hh_html_aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902"><div class="ttname"><a href="util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902">RTP_TIMEOUT</a></div><div class="ttdeci">@ RTP_TIMEOUT</div><div class="ttdoc">Operation timed out.</div><div class="ttdef"><b>Definition:</b> util.hh:75</div></div>
<div class="ttc" id="autil_8hh_html_aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19"><div class="ttname"><a href="util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19">RTP_GENERIC_ERROR</a></div><div class="ttdeci">@ RTP_GENERIC_ERROR</div><div class="ttdoc">Generic error condition.</div><div class="ttdef"><b>Definition:</b> util.hh:64</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587f"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587f">RTP_CTX_CONFIGURATION_FLAGS</a></div><div class="ttdeci">RTP_CTX_CONFIGURATION_FLAGS</div><div class="ttdoc">RTP context configuration flags.</div><div class="ttdef"><b>Definition:</b> util.hh:233</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135">RCC_PKT_MAX_DELAY</a></div><div class="ttdeci">@ RCC_PKT_MAX_DELAY</div><div class="ttdef"><b>Definition:</b> util.hh:258</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></div><div class="ttdeci">@ RCC_MTU_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:272</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663">RCC_UDP_RCV_BUF_SIZE</a></div><div class="ttdeci">@ RCC_UDP_RCV_BUF_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:242</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617">RCC_DYN_PAYLOAD_TYPE</a></div><div class="ttdeci">@ RCC_DYN_PAYLOAD_TYPE</div><div class="ttdef"><b>Definition:</b> util.hh:262</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b">RCC_UDP_SND_BUF_SIZE</a></div><div class="ttdeci">@ RCC_UDP_SND_BUF_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:250</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587f"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587f">RTP_CTX_CONFIGURATION_FLAGS</a></div><div class="ttdeci">RTP_CTX_CONFIGURATION_FLAGS</div><div class="ttdoc">RTP context configuration flags.</div><div class="ttdef"><b>Definition:</b> util.hh:239</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135">RCC_PKT_MAX_DELAY</a></div><div class="ttdeci">@ RCC_PKT_MAX_DELAY</div><div class="ttdef"><b>Definition:</b> util.hh:264</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83">RCC_MTU_SIZE</a></div><div class="ttdeci">@ RCC_MTU_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:278</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663">RCC_UDP_RCV_BUF_SIZE</a></div><div class="ttdeci">@ RCC_UDP_RCV_BUF_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:248</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617">RCC_DYN_PAYLOAD_TYPE</a></div><div class="ttdeci">@ RCC_DYN_PAYLOAD_TYPE</div><div class="ttdef"><b>Definition:</b> util.hh:268</div></div>
<div class="ttc" id="autil_8hh_html_aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b"><div class="ttname"><a href="util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b">RCC_UDP_SND_BUF_SIZE</a></div><div class="ttdeci">@ RCC_UDP_SND_BUF_SIZE</div><div class="ttdef"><b>Definition:</b> util.hh:256</div></div>
<div class="ttc" id="autil_8hh_html_af03a75996471fc531742cd640c7caf2d"><div class="ttname"><a href="util_8hh.html#af03a75996471fc531742cd640c7caf2d">RTP_FLAGS</a></div><div class="ttdeci">RTP_FLAGS</div><div class="ttdoc">These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.</div><div class="ttdef"><b>Definition:</b> util.hh:99</div></div>
<div class="ttc" id="autil_8hh_html_af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6"><div class="ttname"><a href="util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6">RTP_NO_FLAGS</a></div><div class="ttdeci">@ RTP_NO_FLAGS</div><div class="ttdef"><b>Definition:</b> util.hh:101</div></div>
<div class="ttc" id="autil_8hh_html_af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a"><div class="ttname"><a href="util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a">RTP_COPY</a></div><div class="ttdeci">@ RTP_COPY</div><div class="ttdef"><b>Definition:</b> util.hh:107</div></div>

View File

@ -50,17 +50,11 @@ namespace uvgrtp {
* \details For user-managed SRTP session, the media stream is not started
* until SRTP key has been added and all calls to push_frame() will fail
*
* Currently uvgRTP only supports key length of 16 bytes (128 bits)
* and salt length of 14 bytes (112 bits).
*
* If the key or salt is longer, it is implicitly truncated to correct length
* and if the key or salt is shorter, a memory violation may occur
*
* Notice that if user-managed SRTP has been enabled during media stream creation,
* this function must be called before anything else. All calls to other functions
* will fail with ::RTP_NOT_INITIALIZED until the SRTP context has been specified
*
* \param key 128-bit long key
* \param key SRTP master key, default is 128-bit long
* \param salt 112-bit long salt
*
* \return RTP error code

View File

@ -19,9 +19,17 @@
#include "../util.hh"
#include "../zrtp.hh"
enum {
AES128_KEY_SIZE = 16,
AES192_KEY_SIZE = 24,
AES256_KEY_SIZE = 32
};
#define AES_KEY_LENGTH 16 /* 128 bits */
#define HMAC_KEY_LENGTH 32 /* 256 bits */
#define SALT_LENGTH 14 /* 112 bits */
#define AUTH_LENGTH 16
#define IV_LENGTH 16
#define AUTH_TAG_LENGTH 10
#define SRTCP_INDEX_LENGTH 4
@ -37,6 +45,8 @@ namespace uvgrtp {
enum ETYPE {
AES_128 = 0,
AES_192 = 1,
AES_256 = 2
};
enum HTYPE {
@ -61,26 +71,26 @@ namespace uvgrtp {
/* Keys negotiated by ZRTP */
struct {
/* Our master key and salt */
uint8_t local_key[AES_KEY_LENGTH];
uint8_t *local_key;
uint8_t local_salt[SALT_LENGTH];
/* Remote's master key and salt */
uint8_t remote_key[AES_KEY_LENGTH];
uint8_t *remote_key;
uint8_t remote_salt[SALT_LENGTH];
} master;
/* Used to encrypt/authenticate packets sent by us */
struct {
uint8_t enc_key[AES_KEY_LENGTH];
uint8_t auth_key[AES_KEY_LENGTH];
uint8_t salt_key[AES_KEY_LENGTH]; /* TODO: make sure this is correct */
uint8_t *enc_key;
uint8_t auth_key[AUTH_LENGTH];
uint8_t salt_key[SALT_LENGTH];
} local;
/* Used to decrypt/Authenticate packets sent by remote */
struct {
uint8_t enc_key[AES_KEY_LENGTH];
uint8_t auth_key[AES_KEY_LENGTH];
uint8_t salt_key[AES_KEY_LENGTH];
uint8_t *enc_key;
uint8_t auth_key[AUTH_LENGTH];
uint8_t salt_key[SALT_LENGTH];
} remote;
} srtp_key_ctx_t;
@ -127,8 +137,8 @@ namespace uvgrtp {
/* Setup Secure RTP/RTCP connection using user-managed keys
*
* Length of "key" must be AES_KEY_LENGTH (16 bytes)
* Length of "salt" must be SALT_LENGTH (14 bytes)
* Length of the "key" must be either 128, 192, or 256 bits
* Length of "salt" must be SALT_LENGTH (14 bytes, 112 bits)
*
* Return RTP_OK if SRTP setup was successful
* Return RTP_INVALID_VALUE if "key" or "salt" is nullptr
@ -158,7 +168,11 @@ namespace uvgrtp {
rtp_error_t create_iv(uint8_t *out, uint32_t ssrc, uint64_t index, uint8_t *salt);
/* Internal init method that initialize the SRTP context using values in key_ctx_.master */
rtp_error_t init(int type, int flags);
rtp_error_t init(int type, int flags, size_t key_size);
/* Allocate space for master/session encryption keys */
rtp_error_t allocate_crypto_ctx(size_t key_size);
/* SRTP context containing all session information and keys */
srtp_ctx_t *srtp_ctx_;

View File

@ -220,7 +220,13 @@ enum RTP_CTX_ENABLE_FLAGS {
* in the firewall open */
RCE_HOLEPUNCH_KEEPALIVE = 1 << 14,
RCE_LAST = 1 << 15,
/** Use 192-bit keys with SRTP */
RCE_SRTP_KEYSIZE_192 = 1 << 15,
/** Use 256-bit keys with SRTP */
RCE_SRTP_KEYSIZE_256 = 1 << 16,
RCE_LAST = 1 << 17,
};
/**

View File

@ -13,6 +13,11 @@ uvgrtp::base_srtp::base_srtp():
uvgrtp::base_srtp::~base_srtp()
{
delete[] srtp_ctx_->key_ctx.master.local_key;
delete[] srtp_ctx_->key_ctx.master.remote_key;
delete[] srtp_ctx_->key_ctx.local.enc_key;
delete[] srtp_ctx_->key_ctx.remote.enc_key;
delete srtp_ctx_;
}
bool uvgrtp::base_srtp::use_null_cipher()
@ -32,15 +37,18 @@ uvgrtp::srtp_ctx_t *uvgrtp::base_srtp::get_ctx()
rtp_error_t uvgrtp::base_srtp::derive_key(int label, uint8_t *key, uint8_t *salt, uint8_t *out, size_t out_len)
{
uint8_t input[AES_KEY_LENGTH] = { 0 };
memcpy(input, salt, SALT_LENGTH);
uint8_t input[IV_LENGTH] = { 0 };
uint8_t ks[AES128_KEY_SIZE] = { 0 };
input[7] ^= label;
memcpy(input, salt, SALT_LENGTH);
memset(out, 0, out_len);
uvgrtp::crypto::aes::ecb ecb(key, AES_KEY_LENGTH);
ecb.encrypt(out, input, AES_KEY_LENGTH);
input[7] ^= label;
uvgrtp::crypto::aes::ecb ecb(key, srtp_ctx_->n_e);
ecb.encrypt(ks, input, IV_LENGTH);
memcpy(out, ks, out_len);
return RTP_OK;
}
@ -52,7 +60,7 @@ rtp_error_t uvgrtp::base_srtp::create_iv(uint8_t *out, uint32_t ssrc, uint64_t i
uint8_t buf[8];
int i;
memset(out, 0, AES_KEY_LENGTH);
memset(out, 0, IV_LENGTH);
memcpy(&out[4], &ssrc, sizeof(uint32_t));
memcpy(buf, &index, sizeof(uint64_t));
@ -82,14 +90,27 @@ bool uvgrtp::base_srtp::is_replayed_packet(uint8_t *digest)
return false;
}
rtp_error_t uvgrtp::base_srtp::init(int type, int flags)
rtp_error_t uvgrtp::base_srtp::init(int type, int flags, size_t key_size)
{
srtp_ctx_->roc = 0;
srtp_ctx_->rts = 0;
srtp_ctx_->type = type;
srtp_ctx_->enc = AES_128;
srtp_ctx_->hmac = HMAC_SHA1;
switch (key_size) {
case AES128_KEY_SIZE:
srtp_ctx_->enc = AES_128;
break;
case AES192_KEY_SIZE:
srtp_ctx_->enc = AES_192;
break;
case AES256_KEY_SIZE:
srtp_ctx_->enc = AES_256;
break;
}
srtp_ctx_->mki_size = 0;
srtp_ctx_->mki_present = false;
srtp_ctx_->mki = nullptr;
@ -98,7 +119,7 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags)
srtp_ctx_->master_salt = srtp_ctx_->key_ctx.master.local_salt;
srtp_ctx_->mk_cnt = 0;
srtp_ctx_->n_e = AES_KEY_LENGTH;
srtp_ctx_->n_e = key_size;
srtp_ctx_->n_a = HMAC_KEY_LENGTH;
srtp_ctx_->s_l = 0;
@ -129,14 +150,14 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags)
srtp_ctx_->key_ctx.master.local_key,
srtp_ctx_->key_ctx.master.local_salt,
srtp_ctx_->key_ctx.local.enc_key,
AES_KEY_LENGTH
key_size
);
(void)derive_key(
label_auth,
srtp_ctx_->key_ctx.master.local_key,
srtp_ctx_->key_ctx.master.local_salt,
srtp_ctx_->key_ctx.local.auth_key,
AES_KEY_LENGTH
AUTH_LENGTH
);
(void)derive_key(
label_salt,
@ -152,14 +173,14 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags)
srtp_ctx_->key_ctx.master.remote_key,
srtp_ctx_->key_ctx.master.remote_salt,
srtp_ctx_->key_ctx.remote.enc_key,
AES_KEY_LENGTH
key_size
);
(void)derive_key(
label_auth,
srtp_ctx_->key_ctx.master.remote_key,
srtp_ctx_->key_ctx.master.remote_salt,
srtp_ctx_->key_ctx.remote.auth_key,
AES_KEY_LENGTH
AUTH_LENGTH
);
(void)derive_key(
label_salt,
@ -172,6 +193,40 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags)
return RTP_OK;
}
rtp_error_t uvgrtp::base_srtp::allocate_crypto_ctx(size_t key_size)
{
if (!(srtp_ctx_->key_ctx.master.local_key = new uint8_t[key_size])) {
LOG_ERROR("Failed to allocate space for local master key");
return RTP_MEMORY_ERROR;
}
if (!(srtp_ctx_->key_ctx.master.remote_key = new uint8_t[key_size])) {
LOG_ERROR("Failed to allocate space for remote master key");
delete[] srtp_ctx_->key_ctx.master.local_key;
return RTP_MEMORY_ERROR;
}
if (!(srtp_ctx_->key_ctx.local.enc_key = new uint8_t[key_size])) {
LOG_ERROR("Failed to allocate space for local session key");
delete[] srtp_ctx_->key_ctx.master.local_key;
delete[] srtp_ctx_->key_ctx.master.remote_key;
return RTP_MEMORY_ERROR;
}
if (!(srtp_ctx_->key_ctx.remote.enc_key = new uint8_t[key_size])) {
LOG_ERROR("Failed to allocate space for remote session key");
delete[] srtp_ctx_->key_ctx.master.local_key;
delete[] srtp_ctx_->key_ctx.master.remote_key;
delete[] srtp_ctx_->key_ctx.local.enc_key;
return RTP_MEMORY_ERROR;
}
return RTP_OK;
}
rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp, uvgrtp::zrtp *zrtp)
{
(void)rtp;
@ -179,12 +234,17 @@ rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp,
if (!zrtp)
return RTP_INVALID_VALUE;
rtp_error_t ret = allocate_crypto_ctx(AES128_KEY_SIZE);
if (ret != RTP_OK)
return ret;
/* ZRTP key derivation function expects the keys lengths to be given in bits */
rtp_error_t ret = zrtp->get_srtp_keys(
srtp_ctx_->key_ctx.master.local_key, AES_KEY_LENGTH * 8,
srtp_ctx_->key_ctx.master.remote_key, AES_KEY_LENGTH * 8,
srtp_ctx_->key_ctx.master.local_salt, SALT_LENGTH * 8,
srtp_ctx_->key_ctx.master.remote_salt, SALT_LENGTH * 8
ret = zrtp->get_srtp_keys(
srtp_ctx_->key_ctx.master.local_key, AES128_KEY_SIZE * 8,
srtp_ctx_->key_ctx.master.remote_key, AES128_KEY_SIZE * 8,
srtp_ctx_->key_ctx.master.local_salt, SALT_LENGTH * 8,
srtp_ctx_->key_ctx.master.remote_salt, SALT_LENGTH * 8
);
if (ret != RTP_OK) {
@ -192,18 +252,30 @@ rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp,
return ret;
}
return init(type, flags);
return init(type, flags, AES128_KEY_SIZE);
}
rtp_error_t uvgrtp::base_srtp::init_user(int type, int flags, uint8_t *key, uint8_t *salt)
{
rtp_error_t ret;
if (!key || !salt)
return RTP_INVALID_VALUE;
memcpy(srtp_ctx_->key_ctx.master.local_key, key, AES_KEY_LENGTH);
memcpy(srtp_ctx_->key_ctx.master.remote_key, key, AES_KEY_LENGTH);
size_t key_size = AES128_KEY_SIZE;
if (flags & RCE_SRTP_KEYSIZE_192)
key_size = AES192_KEY_SIZE;
else if (flags & RCE_SRTP_KEYSIZE_256)
key_size = AES256_KEY_SIZE;
if ((ret = allocate_crypto_ctx(key_size)) != RTP_OK)
return ret;
memcpy(srtp_ctx_->key_ctx.master.local_key, key, key_size);
memcpy(srtp_ctx_->key_ctx.master.remote_key, key, key_size);
memcpy(srtp_ctx_->key_ctx.master.local_salt, salt, SALT_LENGTH);
memcpy(srtp_ctx_->key_ctx.master.remote_salt, salt, SALT_LENGTH);
return init(type, flags);
return init(type, flags, key_size);
}

View File

@ -17,14 +17,14 @@ rtp_error_t uvgrtp::srtcp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer,
if (use_null_cipher_)
return RTP_OK;
uint8_t iv[16] = { 0 };
uint8_t iv[IV_LENGTH] = { 0 };
if (create_iv(iv, ssrc, seq, srtp_ctx_->key_ctx.local.salt_key) != RTP_OK) {
LOG_ERROR("Failed to create IV, unable to encrypt the RTP packet!");
return RTP_INVALID_VALUE;
}
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, sizeof(srtp_ctx_->key_ctx.local.enc_key), iv);
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, srtp_ctx_->n_e, iv);
ctr.encrypt(buffer, buffer, len);
return RTP_OK;
@ -65,14 +65,14 @@ rtp_error_t uvgrtp::srtcp::verify_auth_tag(uint8_t *buffer, size_t len)
rtp_error_t uvgrtp::srtcp::decrypt(uint32_t ssrc, uint32_t seq, uint8_t *buffer, size_t size)
{
uint8_t iv[16] = { 0 };
uint8_t iv[IV_LENGTH] = { 0 };
if (create_iv(iv, ssrc, seq, srtp_ctx_->key_ctx.remote.salt_key) != RTP_OK) {
LOG_ERROR("Failed to create IV, unable to encrypt the RTP packet!");
return RTP_INVALID_VALUE;
}
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.remote.enc_key, sizeof(srtp_ctx_->key_ctx.remote.enc_key), iv);
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.remote.enc_key, srtp_ctx_->n_e, iv);
/* skip header and sender ssrc */
ctr.decrypt(&buffer[8], &buffer[8], size - 8 - AUTH_TAG_LENGTH - SRTCP_INDEX_LENGTH);

View File

@ -20,7 +20,7 @@ rtp_error_t uvgrtp::srtp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer,
if (use_null_cipher_)
return RTP_OK;
uint8_t iv[16] = { 0 };
uint8_t iv[IV_LENGTH] = { 0 };
uint64_t index = (((uint64_t)srtp_ctx_->roc) << 16) + seq;
/* Sequence number has wrapped around, update Roll-over Counter */
@ -32,7 +32,7 @@ rtp_error_t uvgrtp::srtp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer,
return RTP_INVALID_VALUE;
}
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, sizeof(srtp_ctx_->key_ctx.local.enc_key), iv);
uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, srtp_ctx_->n_e, iv);
ctr.encrypt(buffer, buffer, len);
return RTP_OK;
@ -49,7 +49,7 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f
/* Calculate authentication tag for the packet and compare it against the one we received */
if (srtp->authenticate_rtp()) {
uint8_t digest[10] = { 0 };
auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.remote.auth_key, AES_KEY_LENGTH);
auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.remote.auth_key, AUTH_LENGTH);
hmac_sha1.update(frame->dgram, frame->dgram_size - AUTH_TAG_LENGTH);
hmac_sha1.update((uint8_t *)&ctx->roc, sizeof(ctx->roc));
@ -70,11 +70,11 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f
if (srtp->use_null_cipher())
return RTP_PKT_NOT_HANDLED;
uint8_t iv[16] = { 0 };
uint16_t seq = frame->header.seq;
uint32_t ssrc = frame->header.ssrc;
uint32_t ts = frame->header.timestamp;
uint64_t index = 0;
uint8_t iv[IV_LENGTH] = { 0 };
uint16_t seq = frame->header.seq;
uint32_t ssrc = frame->header.ssrc;
uint32_t ts = frame->header.timestamp;
uint64_t index = 0;
/* as the sequence number approaches 0xffff and is close to wrapping around,
* special care must be taken to use correct roll-over counter as it's entirely
@ -103,7 +103,7 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f
return RTP_GENERIC_ERROR;
}
uvgrtp::crypto::aes::ctr ctr(ctx->key_ctx.remote.enc_key, sizeof(ctx->key_ctx.remote.enc_key), iv);
uvgrtp::crypto::aes::ctr ctr(ctx->key_ctx.remote.enc_key, ctx->n_e, iv);
ctr.decrypt(frame->payload, frame->payload, frame->payload_len);
return RTP_PKT_MODIFIED;
@ -116,7 +116,7 @@ rtp_error_t uvgrtp::srtp::send_packet_handler(void *arg, uvgrtp::buf_vec& buffer
auto ctx = srtp->get_ctx();
auto off = srtp->authenticate_rtp() ? 2 : 1;
auto data = buffers.at(buffers.size() - off);
auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.local.auth_key, AES_KEY_LENGTH);
auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.local.auth_key, AUTH_LENGTH);
rtp_error_t ret = RTP_OK;
if (srtp->use_null_cipher())