55
47
enum <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility">StunUsageIceCompatibility</a>;
56
48
enum <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn">StunUsageIceReturn</a>;
57
<span class="returnvalue">size_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create" title="stun_usage_ice_conncheck_create ()">stun_usage_ice_conncheck_create</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent,
58
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
59
<span class="returnvalue">uint8_t</span> *buffer,
60
<span class="returnvalue">size_t</span> buffer_len,
61
const <span class="returnvalue">uint8_t</span> *username,
62
const <span class="returnvalue">size_t</span> username_len,
63
const <span class="returnvalue">uint8_t</span> *password,
64
const <span class="returnvalue">size_t</span> password_len,
65
<span class="returnvalue">bool</span> cand_use,
66
<span class="returnvalue">bool</span> controlling,
67
<span class="returnvalue">uint32_t</span> priority,
68
<span class="returnvalue">uint64_t</span> tie,
69
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);
70
<a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()">stun_usage_ice_conncheck_process</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
71
<span class="returnvalue">struct sockaddr</span> *addr,
72
<span class="returnvalue">socklen_t</span> *addrlen,
73
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);
49
<span class="returnvalue">size_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create" title="stun_usage_ice_conncheck_create ()">stun_usage_ice_conncheck_create</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>,
50
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
51
<em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>,
52
<em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>,
53
<em class="parameter"><code>const <span class="type">uint8_t</span> *username</code></em>,
54
<em class="parameter"><code>const <span class="type">size_t</span> username_len</code></em>,
55
<em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>,
56
<em class="parameter"><code>const <span class="type">size_t</span> password_len</code></em>,
57
<em class="parameter"><code><span class="type">bool</span> cand_use</code></em>,
58
<em class="parameter"><code><span class="type">bool</span> controlling</code></em>,
59
<em class="parameter"><code><span class="type">uint32_t</span> priority</code></em>,
60
<em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
61
<em class="parameter"><code>const <span class="type">char</span> *candidate_identifier</code></em>,
62
<em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);
63
<a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()">stun_usage_ice_conncheck_process</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
64
<em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>,
65
<em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>,
66
<em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);
74
67
<a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <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>
75
(<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent,
76
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *req,
77
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
78
<span class="returnvalue">uint8_t</span> *buf,
79
<span class="returnvalue">size_t</span> *plen,
80
const <span class="returnvalue">struct sockaddr</span> *src,
81
<span class="returnvalue">socklen_t</span> srclen,
82
<span class="returnvalue">bool</span> *control,
83
<span class="returnvalue">uint64_t</span> tie,
84
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);
85
<span class="returnvalue">uint32_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()">stun_usage_ice_conncheck_priority</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);
68
(<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>,
69
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *req</code></em>,
70
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
71
<em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>,
72
<em class="parameter"><code><span class="type">size_t</span> *plen</code></em>,
73
<em class="parameter"><code>const <span class="type">struct sockaddr</span> *src</code></em>,
74
<em class="parameter"><code><span class="type">socklen_t</span> srclen</code></em>,
75
<em class="parameter"><code><span class="type">bool</span> *control</code></em>,
76
<em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
77
<em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);
78
<span class="returnvalue">uint32_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()">stun_usage_ice_conncheck_priority</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);
86
79
<span class="returnvalue">bool</span> <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>
87
(const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);
80
(<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);
90
83
<div class="refsect1" title="Description">
117
112
be used in newly-written code. It is kept for compatibility reasons and
118
113
represents the same compatibility as <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_RFC5245</code></em>
120
117
<div class="variablelist"><table border="0">
121
118
<col align="left" valign="top">
124
121
<td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_RFC5245</code></span></p></td>
125
<td> The ICE compatibility with RFC 5245
122
<td>The ICE compatibility with RFC 5245
129
126
<td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_GOOGLE</code></span></p></td>
130
<td> The ICE compatibility with Google's
127
<td>The ICE compatibility with Google's
131
128
implementation of ICE
135
132
<td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_MSN</code></span></p></td>
136
<td> The ICE compatibility with MSN's
133
<td>The ICE compatibility with MSN's
137
134
implementation of ICE
138
<td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-WLM2009:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_WLM2009</code></span></p></td>
139
<td>The ICE compatibility with Windows
140
Live Messenger and Microsoft Office Communicator 2007 R2 implementation of ICE
141
144
<td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</code></span></p></td>
142
<td> The ICE compatibility with draft 19
145
<td>The ICE compatibility with draft 19
164
167
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
165
168
<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
166
status the function call returned.</p>
169
status the function call returned.
167
171
<div class="variablelist"><table border="0">
168
172
<col align="left" valign="top">
171
175
<td><p><a name="STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_SUCCESS</code></span></p></td>
172
<td> The function succeeded
176
<td>The function succeeded
176
180
<td><p><a name="STUN-USAGE-ICE-RETURN-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_ERROR</code></span></p></td>
177
<td> There was an unspecified error
181
<td>There was an unspecified error
181
185
<td><p><a name="STUN-USAGE-ICE-RETURN-INVALID:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID</code></span></p></td>
182
<td> The message is invalid for processing
186
<td>The message is invalid for processing
186
190
<td><p><a name="STUN-USAGE-ICE-RETURN-ROLE-CONFLICT:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_ROLE_CONFLICT</code></span></p></td>
187
<td> A role conflict was detected
191
<td>A role conflict was detected
191
195
<td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_REQUEST</code></span></p></td>
192
<td> The message is an not a request
196
<td>The message is an not a request
196
200
<td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-METHOD:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_METHOD</code></span></p></td>
197
<td> The method of the request is invalid
201
<td>The method of the request is invalid
201
205
<td><p><a name="STUN-USAGE-ICE-RETURN-MEMORY-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_MEMORY_ERROR</code></span></p></td>
202
<td> The buffer size is too small to hold
206
<td>The buffer size is too small to hold
207
211
<td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_ADDRESS</code></span></p></td>
208
<td> The mapped address argument has
212
<td>The mapped address argument has
209
213
an invalid address family
213
217
<td><p><a name="STUN-USAGE-ICE-RETURN-NO-MAPPED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_NO_MAPPED_ADDRESS</code></span></p></td>
214
<td> The response is valid but no
218
<td>The response is valid but no
215
219
MAPPED-ADDRESS or XOR-MAPPED-ADDRESS attribute was found
222
226
<div class="refsect2" title="stun_usage_ice_conncheck_create ()">
223
227
<a name="stun-usage-ice-conncheck-create"></a><h3>stun_usage_ice_conncheck_create ()</h3>
224
<pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_ice_conncheck_create (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent,
225
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
226
<span class="returnvalue">uint8_t</span> *buffer,
227
<span class="returnvalue">size_t</span> buffer_len,
228
const <span class="returnvalue">uint8_t</span> *username,
229
const <span class="returnvalue">size_t</span> username_len,
230
const <span class="returnvalue">uint8_t</span> *password,
231
const <span class="returnvalue">size_t</span> password_len,
232
<span class="returnvalue">bool</span> cand_use,
233
<span class="returnvalue">bool</span> controlling,
234
<span class="returnvalue">uint32_t</span> priority,
235
<span class="returnvalue">uint64_t</span> tie,
236
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre>
228
<pre class="programlisting"><span class="returnvalue">size_t</span> 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>,
229
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
230
<em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>,
231
<em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>,
232
<em class="parameter"><code>const <span class="type">uint8_t</span> *username</code></em>,
233
<em class="parameter"><code>const <span class="type">size_t</span> username_len</code></em>,
234
<em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>,
235
<em class="parameter"><code>const <span class="type">size_t</span> password_len</code></em>,
236
<em class="parameter"><code><span class="type">bool</span> cand_use</code></em>,
237
<em class="parameter"><code><span class="type">bool</span> controlling</code></em>,
238
<em class="parameter"><code><span class="type">uint32_t</span> priority</code></em>,
239
<em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
240
<em class="parameter"><code>const <span class="type">char</span> *candidate_identifier</code></em>,
241
<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>
238
243
Builds an ICE connectivity check STUN message.
239
244
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
240
<em class="parameter"><code>cand_use</code></em>, <em class="parameter"><code>controlling</code></em>, <em class="parameter"><code>priority</code></em> and <em class="parameter"><code>tie</code></em> arguments are not used.</p>
245
<em class="parameter"><code>cand_use</code></em>, <em class="parameter"><code>controlling</code></em>, <em class="parameter"><code>priority</code></em> and <em class="parameter"><code>tie</code></em> arguments are not used.
246
If the compatibility is not <a class="link" href="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-WLM2009:CAPS"><span class="type">STUN_USAGE_ICE_COMPATIBILITY_WLM2009</span></a>, the
247
<em class="parameter"><code>candidate_identifier</code></em> argument is not used.
241
249
<div class="variablelist"><table border="0">
242
250
<col align="left" valign="top">
245
253
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
246
<td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request
254
<td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request
250
258
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
251
<td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build
259
<td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build
255
263
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
256
<td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a>
264
<td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a>
260
268
<td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td>
261
<td> The size of the <em class="parameter"><code>buffer</code></em>
269
<td>The size of the <em class="parameter"><code>buffer</code></em>
265
273
<td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td>
266
<td> The username to use in the request
274
<td>The username to use in the request
270
278
<td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td>
271
<td> The length of <em class="parameter"><code>username</code></em>
279
<td>The length of <em class="parameter"><code>username</code></em>
275
283
<td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td>
276
<td> The key to use for building the MESSAGE-INTEGRITY
284
<td>The key to use for building the MESSAGE-INTEGRITY
280
288
<td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td>
281
<td> The length of <em class="parameter"><code>password</code></em>
289
<td>The length of <em class="parameter"><code>password</code></em>
285
293
<td><p><span class="term"><em class="parameter"><code>cand_use</code></em> :</span></p></td>
286
<td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to append the USE-CANDIDATE flag to the request
294
<td>Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to append the USE-CANDIDATE flag to the request
290
298
<td><p><span class="term"><em class="parameter"><code>controlling</code></em> :</span></p></td>
291
<td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
299
<td>Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
292
300
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent.
296
304
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
297
<td> The value of the PRIORITY attribute
305
<td>The value of the PRIORITY attribute
301
309
<td><p><span class="term"><em class="parameter"><code>tie</code></em> :</span></p></td>
302
<td> The value of the tie-breaker to put in the ICE-CONTROLLED or
310
<td>The value of the tie-breaker to put in the ICE-CONTROLLED or
303
311
ICE-CONTROLLING attribute
315
<td><p><span class="term"><em class="parameter"><code>candidate_identifier</code></em> :</span></p></td>
316
<td>The foundation value to put in the
317
CANDIDATE-IDENTIFIER attribute
307
321
<td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td>
308
<td> The compatibility mode to use for building the conncheck
322
<td>The compatibility mode to use for building the conncheck
321
335
<div class="refsect2" title="stun_usage_ice_conncheck_process ()">
322
336
<a name="stun-usage-ice-conncheck-process"></a><h3>stun_usage_ice_conncheck_process ()</h3>
323
<pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_process (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
324
<span class="returnvalue">struct sockaddr</span> *addr,
325
<span class="returnvalue">socklen_t</span> *addrlen,
326
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre>
337
<pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
338
<em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>,
339
<em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>,
340
<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>
328
342
Process an ICE connectivity check STUN message and retreive the
329
343
mapped address from the message
331
345
<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
332
346
<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>
333
349
<div class="variablelist"><table border="0">
334
350
<col align="left" valign="top">
337
353
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
338
<td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process
354
<td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process
342
358
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
343
<td> A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address
359
<td>A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address
344
360
that the STUN connectivity check response contains
348
364
<td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td>
349
<td> The length of <em class="parameter"><code>addr</code></em>
365
<td>The length of <em class="parameter"><code>addr</code></em>
353
369
<td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td>
354
<td> The compatibility mode to use for processing the conncheck
370
<td>The compatibility mode to use for processing the conncheck
367
383
<div class="refsect2" title="stun_usage_ice_conncheck_create_reply ()">
368
384
<a name="stun-usage-ice-conncheck-create-reply"></a><h3>stun_usage_ice_conncheck_create_reply ()</h3>
369
385
<pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_create_reply
370
(<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent,
371
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *req,
372
<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg,
373
<span class="returnvalue">uint8_t</span> *buf,
374
<span class="returnvalue">size_t</span> *plen,
375
const <span class="returnvalue">struct sockaddr</span> *src,
376
<span class="returnvalue">socklen_t</span> srclen,
377
<span class="returnvalue">bool</span> *control,
378
<span class="returnvalue">uint64_t</span> tie,
379
<a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre>
386
(<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>,
387
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *req</code></em>,
388
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
389
<em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>,
390
<em class="parameter"><code><span class="type">size_t</span> *plen</code></em>,
391
<em class="parameter"><code>const <span class="type">struct sockaddr</span> *src</code></em>,
392
<em class="parameter"><code><span class="type">socklen_t</span> srclen</code></em>,
393
<em class="parameter"><code><span class="type">bool</span> *control</code></em>,
394
<em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>,
395
<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>
381
397
Tries to parse a STUN connectivity check request and builds a
382
398
response accordingly.
389
405
If <em class="parameter"><code>plen</code></em> has a size of 0, then no error response should be sent.
392
410
<div class="variablelist"><table border="0">
393
411
<col align="left" valign="top">
396
414
<td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td>
397
<td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the response
415
<td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the response
401
419
<td><p><span class="term"><em class="parameter"><code>req</code></em> :</span></p></td>
402
<td> The original STUN request to reply to
420
<td>The original STUN request to reply to
406
424
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
407
<td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build
425
<td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build
411
429
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
412
<td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a>
430
<td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a>
416
434
<td><p><span class="term"><em class="parameter"><code>plen</code></em> :</span></p></td>
417
<td> A pointer containing the size of the <em class="parameter"><code>buffer</code></em> on input.
435
<td>A pointer containing the size of the <em class="parameter"><code>buffer</code></em> on input.
418
436
Will contain the length of the message built on output.
422
440
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
423
<td> A pointer to a <span class="type">sockaddr</span> structure containing the source address from
441
<td>A pointer to a <span class="type">sockaddr</span> structure containing the source address from
424
442
which the request was received. Will be used as the mapped address in the
429
447
<td><p><span class="term"><em class="parameter"><code>srclen</code></em> :</span></p></td>
430
<td> The length of <em class="parameter"><code>addr</code></em>
448
<td>The length of <em class="parameter"><code>addr</code></em>
434
452
<td><p><span class="term"><em class="parameter"><code>control</code></em> :</span></p></td>
435
<td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
453
<td>Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to
436
454
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent.
440
458
<td><p><span class="term"><em class="parameter"><code>tie</code></em> :</span></p></td>
441
<td> The value of the tie-breaker to put in the ICE-CONTROLLED or
459
<td>The value of the tie-breaker to put in the ICE-CONTROLLED or
442
460
ICE-CONTROLLING attribute
446
464
<td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td>
447
<td> The compatibility mode to use for building the conncheck
465
<td>The compatibility mode to use for building the conncheck