~ubuntu-branches/debian/stretch/libnice/stretch

« back to all changes in this revision

Viewing changes to docs/reference/libnice/html/libnice-ICE.html

Tags: 0.1.0-2
Add a Breaks: libgstfarsight0.10-0 (<< 0.22) for the gstreamer plugin as
farsight uses one libnice ABI and the gstreamer element uses another
libnice ABI things tend to go horribly wrong.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch04.html" title="STUN usages">
9
9
<link rel="prev" href="libnice-Bind.html" title="Bind">
10
10
<link rel="next" href="libnice-TURN.html" title="TURN">
11
 
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="part" href="pt01.html" title="Part I. ICE Library">
14
 
<link rel="chapter" href="ch01.html" title="">
15
 
<link rel="chapter" href="ch02.html" title="Libnice helper functions">
16
 
<link rel="part" href="pt02.html" title="Part II. STUN Library">
17
 
<link rel="chapter" href="ch03.html" title="">
18
 
<link rel="chapter" href="ch04.html" title="STUN usages">
19
 
<link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation">
20
 
<link rel="chapter" href="ch05.html" title="">
21
13
</head>
22
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
54
46
 
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>);
88
81
</pre>
89
82
</div>
90
83
<div class="refsect1" title="Description">
93
86
The STUN ICE usage allows for easily creating and parsing STUN Binding
94
87
requests and responses used for ICE connectivity checks. The API allows you
95
88
to create a connectivity check message, parse a response or create a reply
96
 
to an incoming connectivity check request.</p>
 
89
to an incoming connectivity check request.
 
90
</p>
97
91
</div>
98
92
<div class="refsect1" title="Details">
99
93
<a name="libnice-ICE.details"></a><h2>Details</h2>
103
97
  STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
104
98
  STUN_USAGE_ICE_COMPATIBILITY_GOOGLE,
105
99
  STUN_USAGE_ICE_COMPATIBILITY_MSN,
 
100
  STUN_USAGE_ICE_COMPATIBILITY_WLM2009,
106
101
  STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
107
102
} StunUsageIceCompatibility;
108
103
</pre>
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>
119
114
</div>
 
115
<p>
 
116
</p>
120
117
<div class="variablelist"><table border="0">
121
118
<col align="left" valign="top">
122
119
<tbody>
123
120
<tr>
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
126
123
</td>
127
124
</tr>
128
125
<tr>
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
132
129
</td>
133
130
</tr>
134
131
<tr>
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
135
</td>
139
136
</tr>
140
137
<tr>
 
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
</td>
 
142
</tr>
 
143
<tr>
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
143
146
</td>
144
147
</tr>
145
148
</tbody>
163
166
<p>
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.
 
170
</p>
167
171
<div class="variablelist"><table border="0">
168
172
<col align="left" valign="top">
169
173
<tbody>
170
174
<tr>
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
173
177
</td>
174
178
</tr>
175
179
<tr>
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
178
182
</td>
179
183
</tr>
180
184
<tr>
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
183
187
</td>
184
188
</tr>
185
189
<tr>
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
188
192
</td>
189
193
</tr>
190
194
<tr>
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
193
197
</td>
194
198
</tr>
195
199
<tr>
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
198
202
</td>
199
203
</tr>
200
204
<tr>
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
203
207
the STUN reply
204
208
</td>
205
209
</tr>
206
210
<tr>
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
210
214
</td>
211
215
</tr>
212
216
<tr>
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
216
220
</td>
217
221
</tr>
221
225
<hr>
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>
237
242
<p>
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.
 
248
</p>
241
249
<div class="variablelist"><table border="0">
242
250
<col align="left" valign="top">
243
251
<tbody>
244
252
<tr>
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
247
255
</td>
248
256
</tr>
249
257
<tr>
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
252
260
</td>
253
261
</tr>
254
262
<tr>
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>
257
265
</td>
258
266
</tr>
259
267
<tr>
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>
262
270
</td>
263
271
</tr>
264
272
<tr>
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
267
275
</td>
268
276
</tr>
269
277
<tr>
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>
272
280
</td>
273
281
</tr>
274
282
<tr>
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
277
285
</td>
278
286
</tr>
279
287
<tr>
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>
282
290
</td>
283
291
</tr>
284
292
<tr>
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
287
295
</td>
288
296
</tr>
289
297
<tr>
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.
293
301
</td>
294
302
</tr>
295
303
<tr>
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
298
306
</td>
299
307
</tr>
300
308
<tr>
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
304
312
</td>
305
313
</tr>
306
314
<tr>
 
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
 
318
</td>
 
319
</tr>
 
320
<tr>
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
309
323
request
310
324
</td>
311
325
</tr>
320
334
<hr>
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>
327
341
<p>
328
342
Process an ICE connectivity check STUN message and retreive the
329
343
mapped address from the message
330
344
</p>
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>
 
347
<p>
 
348
</p>
333
349
<div class="variablelist"><table border="0">
334
350
<col align="left" valign="top">
335
351
<tbody>
336
352
<tr>
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
339
355
</td>
340
356
</tr>
341
357
<tr>
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
345
361
</td>
346
362
</tr>
347
363
<tr>
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>
350
366
</td>
351
367
</tr>
352
368
<tr>
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
355
371
response
356
372
</td>
357
373
</tr>
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>
380
396
<p>
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.
390
406
   </p>
391
407
</div>
 
408
<p>
 
409
</p>
392
410
<div class="variablelist"><table border="0">
393
411
<col align="left" valign="top">
394
412
<tbody>
395
413
<tr>
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
398
416
</td>
399
417
</tr>
400
418
<tr>
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
403
421
</td>
404
422
</tr>
405
423
<tr>
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
408
426
</td>
409
427
</tr>
410
428
<tr>
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>
413
431
</td>
414
432
</tr>
415
433
<tr>
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.
419
437
</td>
420
438
</tr>
421
439
<tr>
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
425
443
response
426
444
</td>
427
445
</tr>
428
446
<tr>
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>
431
449
</td>
432
450
</tr>
433
451
<tr>
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.
437
455
</td>
438
456
</tr>
439
457
<tr>
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
443
461
</td>
444
462
</tr>
445
463
<tr>
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
448
466
response
449
467
</td>
450
468
</tr>
459
477
<hr>
460
478
<div class="refsect2" title="stun_usage_ice_conncheck_priority ()">
461
479
<a name="stun-usage-ice-conncheck-priority"></a><h3>stun_usage_ice_conncheck_priority ()</h3>
462
 
<pre class="programlisting"><span class="returnvalue">uint32_t</span>            stun_usage_ice_conncheck_priority   (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre>
 
480
<pre class="programlisting"><span class="returnvalue">uint32_t</span>            stun_usage_ice_conncheck_priority   (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
463
481
<p>
464
 
Extracts the priority from a STUN message.</p>
 
482
Extracts the priority from a STUN message.
 
483
</p>
465
484
<div class="variablelist"><table border="0">
466
485
<col align="left" valign="top">
467
486
<tbody>
468
487
<tr>
469
488
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
470
 
<td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse
 
489
<td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse
471
490
</td>
472
491
</tr>
473
492
<tr>
482
501
<div class="refsect2" title="stun_usage_ice_conncheck_use_candidate ()">
483
502
<a name="stun-usage-ice-conncheck-use-candidate"></a><h3>stun_usage_ice_conncheck_use_candidate ()</h3>
484
503
<pre class="programlisting"><span class="returnvalue">bool</span>                stun_usage_ice_conncheck_use_candidate
485
 
                                                        (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre>
 
504
                                                        (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
486
505
<p>
487
 
Extracts the USE-CANDIDATE attribute flag from a STUN message.</p>
 
506
Extracts the USE-CANDIDATE attribute flag from a STUN message.
 
507
</p>
488
508
<div class="variablelist"><table border="0">
489
509
<col align="left" valign="top">
490
510
<tbody>
491
511
<tr>
492
512
<td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td>
493
 
<td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse
 
513
<td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse
494
514
</td>
495
515
</tr>
496
516
<tr>
505
525
</div>
506
526
<div class="footer">
507
527
<hr>
508
 
          Generated by GTK-Doc V1.13</div>
 
528
          Generated by GTK-Doc V1.15</div>
509
529
</body>
510
530
</html>
 
 
b'\\ No newline at end of file'