Imported Upstream version 0.1.16
[platform/upstream/libnice.git] / docs / reference / libnice / html / libnice-ICE.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>ICE: libnice Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="libnice Reference Manual">
8 <link rel="up" href="ch04.html" title="STUN usages">
9 <link rel="prev" href="libnice-Bind.html" title="Bind">
10 <link rel="next" href="libnice-TURN.html" title="TURN">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#libnice-ICE.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="libnice-Bind.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="libnice-TURN.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="libnice-ICE"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="libnice-ICE.top_of_page"></a>ICE</span></h2>
30 <p>ICE — STUN ICE Usage</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="libnice-ICE.stability-level"></a><h2>Stability Level</h2>
36 <acronym title="The intention of a Stable interface is to enable arbitrary third parties to
37 develop applications to these interfaces, release them, and have confidence that
38 they will run on all minor releases of the product (after the one in which the
39 interface was introduced, and within the same major release). Even at a major
40 release, incompatible changes are expected to be rare, and to have strong
41 justifications.
42 "><span class="acronym">Stable</span></acronym>, unless otherwise indicated
43 </div>
44 <div class="refsect1">
45 <a name="libnice-ICE.functions"></a><h2>Functions</h2>
46 <div class="informaltable"><table class="informaltable" width="100%" border="0">
47 <colgroup>
48 <col width="150px" class="functions_return">
49 <col class="functions_name">
50 </colgroup>
51 <tbody>
52 <tr>
53 <td class="function_type">
54 <span class="returnvalue">size_t</span>
55 </td>
56 <td class="function_name">
57 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create" title="stun_usage_ice_conncheck_create ()">stun_usage_ice_conncheck_create</a> <span class="c_punctuation">()</span>
58 </td>
59 </tr>
60 <tr>
61 <td class="function_type">
62 <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a>
63 </td>
64 <td class="function_name">
65 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()">stun_usage_ice_conncheck_process</a> <span class="c_punctuation">()</span>
66 </td>
67 </tr>
68 <tr>
69 <td class="function_type">
70 <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a>
71 </td>
72 <td class="function_name">
73 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create-reply" title="stun_usage_ice_conncheck_create_reply ()">stun_usage_ice_conncheck_create_reply</a> <span class="c_punctuation">()</span>
74 </td>
75 </tr>
76 <tr>
77 <td class="function_type">
78 <span class="returnvalue">uint32_t</span>
79 </td>
80 <td class="function_name">
81 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()">stun_usage_ice_conncheck_priority</a> <span class="c_punctuation">()</span>
82 </td>
83 </tr>
84 <tr>
85 <td class="function_type">
86 <span class="returnvalue">bool</span>
87 </td>
88 <td class="function_name">
89 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-use-candidate" title="stun_usage_ice_conncheck_use_candidate ()">stun_usage_ice_conncheck_use_candidate</a> <span class="c_punctuation">()</span>
90 </td>
91 </tr>
92 </tbody>
93 </table></div>
94 </div>
95 <div class="refsect1">
96 <a name="libnice-ICE.other"></a><h2>Types and Values</h2>
97 <div class="informaltable"><table class="informaltable" width="100%" border="0">
98 <colgroup>
99 <col width="150px" class="name">
100 <col class="description">
101 </colgroup>
102 <tbody>
103 <tr>
104 <td class="datatype_keyword">enum</td>
105 <td class="function_name"><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility">StunUsageIceCompatibility</a></td>
106 </tr>
107 <tr>
108 <td class="datatype_keyword">enum</td>
109 <td class="function_name"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn">StunUsageIceReturn</a></td>
110 </tr>
111 </tbody>
112 </table></div>
113 </div>
114 <div class="refsect1">
115 <a name="libnice-ICE.includes"></a><h2>Includes</h2>
116 <pre class="synopsis">#include &lt;stun/usages/ice.h&gt;
117 </pre>
118 </div>
119 <div class="refsect1">
120 <a name="libnice-ICE.description"></a><h2>Description</h2>
121 <p>The STUN ICE usage allows for easily creating and parsing STUN Binding
122 requests and responses used for ICE connectivity checks. The API allows you
123 to create a connectivity check message, parse a response or create a reply
124 to an incoming connectivity check request.</p>
125 </div>
126 <div class="refsect1">
127 <a name="libnice-ICE.functions_details"></a><h2>Functions</h2>
128 <div class="refsect2">
129 <a name="stun-usage-ice-conncheck-create"></a><h3>stun_usage_ice_conncheck_create ()</h3>
130 <pre class="programlisting"><span class="returnvalue">size_t</span>
131 stun_usage_ice_conncheck_create (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>,
132                                  <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
133                                  <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>,
134                                  <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>,
135                                  <em class="parameter"><code>const <span class="type">uint8_t</span> *username</code></em>,
136                                  <em class="parameter"><code>const <span class="type">size_t</span> username_len</code></em>,
137                                  <em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>,
138                                  <em class="parameter"><code>const <span class="type">size_t</span> password_len</code></em>,
139                                  <em class="parameter"><code><span class="type">bool</span> cand_use</code></em>,
140                                  <em class="parameter"><code><span class="type">bool</span> controlling</code></em>,
141                                  <em class="parameter"><code><span class="type">uint32_t</span> priority</code></em>,
142                                  <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
143                                  <em class="parameter"><code>const <span class="type">char</span> *candidate_identifier</code></em>,
144                                  <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre>
145 <p>Builds an ICE connectivity check STUN message.
146 If the compatibility is not <a class="link" href="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"><span class="type">STUN_USAGE_ICE_COMPATIBILITY_RFC5245</span></a>, the
147 <em class="parameter"><code>cand_use</code></em>
148 , <em class="parameter"><code>controlling</code></em>
149 , <em class="parameter"><code>priority</code></em>
150  and <em class="parameter"><code>tie</code></em>
151  arguments are not used.
152 If the compatibility is not <a class="link" href="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-MSICE2:CAPS"><span class="type">STUN_USAGE_ICE_COMPATIBILITY_MSICE2</span></a>, the
153 <em class="parameter"><code>candidate_identifier</code></em>
154  argument is not used.</p>
155 <div class="refsect3">
156 <a name="stun-usage-ice-conncheck-create.parameters"></a><h4>Parameters</h4>
157 <div class="informaltable"><table class="informaltable" width="100%" border="0">
158 <colgroup>
159 <col width="150px" class="parameters_name">
160 <col class="parameters_description">
161 <col width="200px" class="parameters_annotations">
162 </colgroup>
163 <tbody>
164 <tr>
165 <td class="parameter_name"><p>agent</p></td>
166 <td class="parameter_description"><p>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request</p></td>
167 <td class="parameter_annotations"> </td>
168 </tr>
169 <tr>
170 <td class="parameter_name"><p>msg</p></td>
171 <td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to build</p></td>
172 <td class="parameter_annotations"> </td>
173 </tr>
174 <tr>
175 <td class="parameter_name"><p>buffer</p></td>
176 <td class="parameter_description"><p>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
177 <td class="parameter_annotations"> </td>
178 </tr>
179 <tr>
180 <td class="parameter_name"><p>buffer_len</p></td>
181 <td class="parameter_description"><p>The size of the <em class="parameter"><code>buffer</code></em>
182 </p></td>
183 <td class="parameter_annotations"> </td>
184 </tr>
185 <tr>
186 <td class="parameter_name"><p>username</p></td>
187 <td class="parameter_description"><p>The username to use in the request</p></td>
188 <td class="parameter_annotations"> </td>
189 </tr>
190 <tr>
191 <td class="parameter_name"><p>username_len</p></td>
192 <td class="parameter_description"><p>The length of <em class="parameter"><code>username</code></em>
193 </p></td>
194 <td class="parameter_annotations"> </td>
195 </tr>
196 <tr>
197 <td class="parameter_name"><p>password</p></td>
198 <td class="parameter_description"><p>The key to use for building the MESSAGE-INTEGRITY</p></td>
199 <td class="parameter_annotations"> </td>
200 </tr>
201 <tr>
202 <td class="parameter_name"><p>password_len</p></td>
203 <td class="parameter_description"><p>The length of <em class="parameter"><code>password</code></em>
204 </p></td>
205 <td class="parameter_annotations"> </td>
206 </tr>
207 <tr>
208 <td class="parameter_name"><p>cand_use</p></td>
209 <td class="parameter_description"><p>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to append the USE-CANDIDATE flag to the request</p></td>
210 <td class="parameter_annotations"> </td>
211 </tr>
212 <tr>
213 <td class="parameter_name"><p>controlling</p></td>
214 <td class="parameter_description"><p>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
215 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent.</p></td>
216 <td class="parameter_annotations"> </td>
217 </tr>
218 <tr>
219 <td class="parameter_name"><p>priority</p></td>
220 <td class="parameter_description"><p>The value of the PRIORITY attribute</p></td>
221 <td class="parameter_annotations"> </td>
222 </tr>
223 <tr>
224 <td class="parameter_name"><p>tie</p></td>
225 <td class="parameter_description"><p>The value of the tie-breaker to put in the ICE-CONTROLLED or
226 ICE-CONTROLLING attribute</p></td>
227 <td class="parameter_annotations"> </td>
228 </tr>
229 <tr>
230 <td class="parameter_name"><p>candidate_identifier</p></td>
231 <td class="parameter_description"><p>The foundation value to put in the
232 CANDIDATE-IDENTIFIER attribute</p></td>
233 <td class="parameter_annotations"> </td>
234 </tr>
235 <tr>
236 <td class="parameter_name"><p>compatibility</p></td>
237 <td class="parameter_description"><p>The compatibility mode to use for building the conncheck
238 request</p></td>
239 <td class="parameter_annotations"> </td>
240 </tr>
241 </tbody>
242 </table></div>
243 </div>
244 <div class="refsect3">
245 <a name="stun-usage-ice-conncheck-create.returns"></a><h4>Returns</h4>
246 <p> The length of the message built.</p>
247 </div>
248 </div>
249 <hr>
250 <div class="refsect2">
251 <a name="stun-usage-ice-conncheck-process"></a><h3>stun_usage_ice_conncheck_process ()</h3>
252 <pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a>
253 stun_usage_ice_conncheck_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
254                                   <em class="parameter"><code><span class="type">struct sockaddr_storage</span> *addr</code></em>,
255                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/camel/camel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> *addrlen</code></em>,
256                                   <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre>
257 <p>Process an ICE connectivity check STUN message and retrieve the
258 mapped address from the message</p>
259 <p> See also <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()"><code class="function">stun_usage_ice_conncheck_priority()</code></a> and
260 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-use-candidate" title="stun_usage_ice_conncheck_use_candidate ()"><code class="function">stun_usage_ice_conncheck_use_candidate()</code></a> </p>
261 <div class="refsect3">
262 <a name="stun-usage-ice-conncheck-process.parameters"></a><h4>Parameters</h4>
263 <div class="informaltable"><table class="informaltable" width="100%" border="0">
264 <colgroup>
265 <col width="150px" class="parameters_name">
266 <col class="parameters_description">
267 <col width="200px" class="parameters_annotations">
268 </colgroup>
269 <tbody>
270 <tr>
271 <td class="parameter_name"><p>msg</p></td>
272 <td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to process</p></td>
273 <td class="parameter_annotations"> </td>
274 </tr>
275 <tr>
276 <td class="parameter_name"><p>addr</p></td>
277 <td class="parameter_description"><p>A pointer to a <a href="/usr/share/gtk-doc/html/camel/camel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> structure to fill with the mapped address
278 that the STUN connectivity check response contains</p></td>
279 <td class="parameter_annotations"> </td>
280 </tr>
281 <tr>
282 <td class="parameter_name"><p>addrlen</p></td>
283 <td class="parameter_description"><p>The length of <em class="parameter"><code>addr</code></em>
284 </p></td>
285 <td class="parameter_annotations"> </td>
286 </tr>
287 <tr>
288 <td class="parameter_name"><p>compatibility</p></td>
289 <td class="parameter_description"><p>The compatibility mode to use for processing the conncheck
290 response</p></td>
291 <td class="parameter_annotations"> </td>
292 </tr>
293 </tbody>
294 </table></div>
295 </div>
296 <div class="refsect3">
297 <a name="stun-usage-ice-conncheck-process.returns"></a><h4>Returns</h4>
298 <p> A <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="type">StunUsageIceReturn</span></a> value</p>
299 </div>
300 </div>
301 <hr>
302 <div class="refsect2">
303 <a name="stun-usage-ice-conncheck-create-reply"></a><h3>stun_usage_ice_conncheck_create_reply ()</h3>
304 <pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a>
305 stun_usage_ice_conncheck_create_reply (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>,
306                                        <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *req</code></em>,
307                                        <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
308                                        <em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>,
309                                        <em class="parameter"><code><span class="type">size_t</span> *plen</code></em>,
310                                        <em class="parameter"><code>const <span class="type">struct sockaddr_storage</span> *src</code></em>,
311                                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/camel/camel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> srclen</code></em>,
312                                        <em class="parameter"><code><span class="type">bool</span> *control</code></em>,
313                                        <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
314                                        <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre>
315 <p>Tries to parse a STUN connectivity check request and builds a
316 response accordingly.</p>
317 <div class="note"><p>
318      In case of error, the <em class="parameter"><code>msg</code></em> is filled with the appropriate error response
319      to be sent and the value of <em class="parameter"><code>plen</code></em> is set to the size of that message.
320      If <em class="parameter"><code>plen</code></em> has a size of 0, then no error response should be sent.
321    </p></div>
322 <div class="refsect3">
323 <a name="stun-usage-ice-conncheck-create-reply.parameters"></a><h4>Parameters</h4>
324 <div class="informaltable"><table class="informaltable" width="100%" border="0">
325 <colgroup>
326 <col width="150px" class="parameters_name">
327 <col class="parameters_description">
328 <col width="200px" class="parameters_annotations">
329 </colgroup>
330 <tbody>
331 <tr>
332 <td class="parameter_name"><p>agent</p></td>
333 <td class="parameter_description"><p>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the response</p></td>
334 <td class="parameter_annotations"> </td>
335 </tr>
336 <tr>
337 <td class="parameter_name"><p>req</p></td>
338 <td class="parameter_description"><p>The original STUN request to reply to</p></td>
339 <td class="parameter_annotations"> </td>
340 </tr>
341 <tr>
342 <td class="parameter_name"><p>msg</p></td>
343 <td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to build</p></td>
344 <td class="parameter_annotations"> </td>
345 </tr>
346 <tr>
347 <td class="parameter_name"><p>buf</p></td>
348 <td class="parameter_description"><p>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
349 <td class="parameter_annotations"> </td>
350 </tr>
351 <tr>
352 <td class="parameter_name"><p>plen</p></td>
353 <td class="parameter_description"><p>A pointer containing the size of the <em class="parameter"><code>buffer</code></em>
354 on input.
355 Will contain the length of the message built on output.</p></td>
356 <td class="parameter_annotations"> </td>
357 </tr>
358 <tr>
359 <td class="parameter_name"><p>src</p></td>
360 <td class="parameter_description"><p>A pointer to a <a href="/usr/share/gtk-doc/html/camel/camel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> structure containing the source address from
361 which the request was received. Will be used as the mapped address in the
362 response</p></td>
363 <td class="parameter_annotations"> </td>
364 </tr>
365 <tr>
366 <td class="parameter_name"><p>srclen</p></td>
367 <td class="parameter_description"><p>The length of <em class="parameter"><code>addr</code></em>
368 </p></td>
369 <td class="parameter_annotations"> </td>
370 </tr>
371 <tr>
372 <td class="parameter_name"><p>control</p></td>
373 <td class="parameter_description"><p>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
374 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent.</p></td>
375 <td class="parameter_annotations"> </td>
376 </tr>
377 <tr>
378 <td class="parameter_name"><p>tie</p></td>
379 <td class="parameter_description"><p>The value of the tie-breaker to put in the ICE-CONTROLLED or
380 ICE-CONTROLLING attribute</p></td>
381 <td class="parameter_annotations"> </td>
382 </tr>
383 <tr>
384 <td class="parameter_name"><p>compatibility</p></td>
385 <td class="parameter_description"><p>The compatibility mode to use for building the conncheck
386 response</p></td>
387 <td class="parameter_annotations"> </td>
388 </tr>
389 </tbody>
390 </table></div>
391 </div>
392 <div class="refsect3">
393 <a name="stun-usage-ice-conncheck-create-reply.returns"></a><h4>Returns</h4>
394 <p> A <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="type">StunUsageIceReturn</span></a> value</p>
395 </div>
396 </div>
397 <hr>
398 <div class="refsect2">
399 <a name="stun-usage-ice-conncheck-priority"></a><h3>stun_usage_ice_conncheck_priority ()</h3>
400 <pre class="programlisting"><span class="returnvalue">uint32_t</span>
401 stun_usage_ice_conncheck_priority (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
402 <p>Extracts the priority from a STUN message.</p>
403 <div class="refsect3">
404 <a name="stun-usage-ice-conncheck-priority.parameters"></a><h4>Parameters</h4>
405 <div class="informaltable"><table class="informaltable" width="100%" border="0">
406 <colgroup>
407 <col width="150px" class="parameters_name">
408 <col class="parameters_description">
409 <col width="200px" class="parameters_annotations">
410 </colgroup>
411 <tbody><tr>
412 <td class="parameter_name"><p>msg</p></td>
413 <td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to parse</p></td>
414 <td class="parameter_annotations"> </td>
415 </tr></tbody>
416 </table></div>
417 </div>
418 <div class="refsect3">
419 <a name="stun-usage-ice-conncheck-priority.returns"></a><h4>Returns</h4>
420 <p> host byte order priority, or 0 if not specified.</p>
421 </div>
422 </div>
423 <hr>
424 <div class="refsect2">
425 <a name="stun-usage-ice-conncheck-use-candidate"></a><h3>stun_usage_ice_conncheck_use_candidate ()</h3>
426 <pre class="programlisting"><span class="returnvalue">bool</span>
427 stun_usage_ice_conncheck_use_candidate
428                                (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
429 <p>Extracts the USE-CANDIDATE attribute flag from a STUN message.</p>
430 <div class="refsect3">
431 <a name="stun-usage-ice-conncheck-use-candidate.parameters"></a><h4>Parameters</h4>
432 <div class="informaltable"><table class="informaltable" width="100%" border="0">
433 <colgroup>
434 <col width="150px" class="parameters_name">
435 <col class="parameters_description">
436 <col width="200px" class="parameters_annotations">
437 </colgroup>
438 <tbody><tr>
439 <td class="parameter_name"><p>msg</p></td>
440 <td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to parse</p></td>
441 <td class="parameter_annotations"> </td>
442 </tr></tbody>
443 </table></div>
444 </div>
445 <div class="refsect3">
446 <a name="stun-usage-ice-conncheck-use-candidate.returns"></a><h4>Returns</h4>
447 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the flag is set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</p>
448 </div>
449 </div>
450 </div>
451 <div class="refsect1">
452 <a name="libnice-ICE.other_details"></a><h2>Types and Values</h2>
453 <div class="refsect2">
454 <a name="StunUsageIceCompatibility"></a><h3>enum StunUsageIceCompatibility</h3>
455 <p>This enum defines which compatibility modes this ICE usage can use</p>
456 <div class="warning">
457 <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</code></em> and
458 <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_WLM2009</code></em> are deprecated and should not be used
459 in newly-written code. They are kept for compatibility reasons and represent
460 the same compatibilities as <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_RFC5245</code></em> and
461 <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_MSICE2</code></em> respectively.</div>
462 <div class="refsect3">
463 <a name="StunUsageIceCompatibility.members"></a><h4>Members</h4>
464 <div class="informaltable"><table class="informaltable" width="100%" border="0">
465 <colgroup>
466 <col width="300px" class="enum_members_name">
467 <col class="enum_members_description">
468 <col width="200px" class="enum_members_annotations">
469 </colgroup>
470 <tbody>
471 <tr>
472 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_RFC5245</p></td>
473 <td class="enum_member_description">
474 <p>The ICE compatibility with RFC 5245</p>
475 </td>
476 <td class="enum_member_annotations"> </td>
477 </tr>
478 <tr>
479 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_GOOGLE</p></td>
480 <td class="enum_member_description">
481 <p>The ICE compatibility with Google's
482 implementation of ICE</p>
483 </td>
484 <td class="enum_member_annotations"> </td>
485 </tr>
486 <tr>
487 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_MSN</p></td>
488 <td class="enum_member_description">
489 <p>The ICE compatibility with MSN's
490 implementation of ICE</p>
491 </td>
492 <td class="enum_member_annotations"> </td>
493 </tr>
494 <tr>
495 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-MSICE2:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_MSICE2</p></td>
496 <td class="enum_member_description">
497 <p>The ICE compatibility with [MS-ICE2]
498 specification</p>
499 </td>
500 <td class="enum_member_annotations"> </td>
501 </tr>
502 <tr>
503 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</p></td>
504 <td class="enum_member_description">
505 <p>The ICE compatibility with draft 19</p>
506 </td>
507 <td class="enum_member_annotations"> </td>
508 </tr>
509 <tr>
510 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-COMPATIBILITY-WLM2009:CAPS"></a>STUN_USAGE_ICE_COMPATIBILITY_WLM2009</p></td>
511 <td class="enum_member_description">
512 <p>An alias
513 for <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_MSICE2</code></em>
514 </p>
515 </td>
516 <td class="enum_member_annotations"> </td>
517 </tr>
518 </tbody>
519 </table></div>
520 </div>
521 </div>
522 <hr>
523 <div class="refsect2">
524 <a name="StunUsageIceReturn"></a><h3>enum StunUsageIceReturn</h3>
525 <p>Return value of <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()"><code class="function">stun_usage_ice_conncheck_process()</code></a> and
526 <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create-reply" title="stun_usage_ice_conncheck_create_reply ()"><code class="function">stun_usage_ice_conncheck_create_reply()</code></a> which allows you to see what
527 status the function call returned.</p>
528 <div class="refsect3">
529 <a name="StunUsageIceReturn.members"></a><h4>Members</h4>
530 <div class="informaltable"><table class="informaltable" width="100%" border="0">
531 <colgroup>
532 <col width="300px" class="enum_members_name">
533 <col class="enum_members_description">
534 <col width="200px" class="enum_members_annotations">
535 </colgroup>
536 <tbody>
537 <tr>
538 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"></a>STUN_USAGE_ICE_RETURN_SUCCESS</p></td>
539 <td class="enum_member_description">
540 <p>The function succeeded</p>
541 </td>
542 <td class="enum_member_annotations"> </td>
543 </tr>
544 <tr>
545 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-ERROR:CAPS"></a>STUN_USAGE_ICE_RETURN_ERROR</p></td>
546 <td class="enum_member_description">
547 <p>There was an unspecified error</p>
548 </td>
549 <td class="enum_member_annotations"> </td>
550 </tr>
551 <tr>
552 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-INVALID:CAPS"></a>STUN_USAGE_ICE_RETURN_INVALID</p></td>
553 <td class="enum_member_description">
554 <p>The message is invalid for processing</p>
555 </td>
556 <td class="enum_member_annotations"> </td>
557 </tr>
558 <tr>
559 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-ROLE-CONFLICT:CAPS"></a>STUN_USAGE_ICE_RETURN_ROLE_CONFLICT</p></td>
560 <td class="enum_member_description">
561 <p>A role conflict was detected</p>
562 </td>
563 <td class="enum_member_annotations"> </td>
564 </tr>
565 <tr>
566 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-INVALID-REQUEST:CAPS"></a>STUN_USAGE_ICE_RETURN_INVALID_REQUEST</p></td>
567 <td class="enum_member_description">
568 <p>The message is an not a request</p>
569 </td>
570 <td class="enum_member_annotations"> </td>
571 </tr>
572 <tr>
573 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-INVALID-METHOD:CAPS"></a>STUN_USAGE_ICE_RETURN_INVALID_METHOD</p></td>
574 <td class="enum_member_description">
575 <p>The method of the request is invalid</p>
576 </td>
577 <td class="enum_member_annotations"> </td>
578 </tr>
579 <tr>
580 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-MEMORY-ERROR:CAPS"></a>STUN_USAGE_ICE_RETURN_MEMORY_ERROR</p></td>
581 <td class="enum_member_description">
582 <p>The buffer size is too small to hold
583 the STUN reply</p>
584 </td>
585 <td class="enum_member_annotations"> </td>
586 </tr>
587 <tr>
588 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-INVALID-ADDRESS:CAPS"></a>STUN_USAGE_ICE_RETURN_INVALID_ADDRESS</p></td>
589 <td class="enum_member_description">
590 <p>The mapped address argument has
591 an invalid address family</p>
592 </td>
593 <td class="enum_member_annotations"> </td>
594 </tr>
595 <tr>
596 <td class="enum_member_name"><p><a name="STUN-USAGE-ICE-RETURN-NO-MAPPED-ADDRESS:CAPS"></a>STUN_USAGE_ICE_RETURN_NO_MAPPED_ADDRESS</p></td>
597 <td class="enum_member_description">
598 <p>The response is valid but no
599 MAPPED-ADDRESS or XOR-MAPPED-ADDRESS attribute was found</p>
600 </td>
601 <td class="enum_member_annotations"> </td>
602 </tr>
603 </tbody>
604 </table></div>
605 </div>
606 </div>
607 </div>
608 </div>
609 <div class="footer">
610 <hr>Generated by GTK-Doc V1.29</div>
611 </body>
612 </html>