This file is indexed.

/usr/share/doc/libglib2.0-doc/gio/GSrvTarget.html is in libglib2.0-doc 2.32.1-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GSrvTarget</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="resolver.html" title="DNS resolution">
<link rel="prev" href="GNetworkService.html" title="GNetworkService">
<link rel="next" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GNetworkService.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="resolver.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="gdbus-lowlevel.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GSrvTarget.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GSrvTarget.description" class="shortcut">Description</a>
                   | 
                  <a href="#GSrvTarget.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="GSrvTarget"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GSrvTarget.top_of_page"></a>GSrvTarget</span></h2>
<p>GSrvTarget — DNS SRV record target</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GSrvTarget.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="GSrvTarget.html#GSrvTarget-struct" title="GSrvTarget">GSrvTarget</a>;
<a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="returnvalue">GSrvTarget</span></a> *        <a class="link" href="GSrvTarget.html#g-srv-target-new" title="g_srv_target_new ()">g_srv_target_new</a>                    (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> priority</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> weight</code></em>);
<a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="returnvalue">GSrvTarget</span></a> *        <a class="link" href="GSrvTarget.html#g-srv-target-copy" title="g_srv_target_copy ()">g_srv_target_copy</a>                   (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GSrvTarget.html#g-srv-target-free" title="g_srv_target_free ()">g_srv_target_free</a>                   (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="GSrvTarget.html#g-srv-target-get-hostname" title="g_srv_target_get_hostname ()">g_srv_target_get_hostname</a>           (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
<a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             <a class="link" href="GSrvTarget.html#g-srv-target-get-port" title="g_srv_target_get_port ()">g_srv_target_get_port</a>               (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
<a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             <a class="link" href="GSrvTarget.html#g-srv-target-get-priority" title="g_srv_target_get_priority ()">g_srv_target_get_priority</a>           (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
<a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             <a class="link" href="GSrvTarget.html#g-srv-target-get-weight" title="g_srv_target_get_weight ()">g_srv_target_get_weight</a>             (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GSrvTarget.html#g-srv-target-list-sort" title="g_srv_target_list_sort ()">g_srv_target_list_sort</a>              (<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *targets</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GSrvTarget.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GBoxed
   +----GSrvTarget
</pre>
</div>
<div class="refsect1">
<a name="GSrvTarget.description"></a><h2>Description</h2>
<p>
SRV (service) records are used by some network protocols to provide
service-specific aliasing and load-balancing. For example, XMPP
(Jabber) uses SRV records to locate the XMPP server for a domain;
rather than connecting directly to "example.com" or assuming a
specific server hostname like "xmpp.example.com", an XMPP client
would look up the "xmpp-client" SRV record for "example.com", and
then connect to whatever host was pointed to by that record.
</p>
<p>
You can use <a class="link" href="GResolver.html#g-resolver-lookup-service" title="g_resolver_lookup_service ()"><code class="function">g_resolver_lookup_service()</code></a> or
<a class="link" href="GResolver.html#g-resolver-lookup-service-async" title="g_resolver_lookup_service_async ()"><code class="function">g_resolver_lookup_service_async()</code></a> to find the <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>s
for a given service. However, if you are simply planning to connect
to the remote service, you can use <a class="link" href="GNetworkService.html" title="GNetworkService"><span class="type">GNetworkService</span></a>'s
<a class="link" href="GSocketConnectable.html" title="GSocketConnectable"><span class="type">GSocketConnectable</span></a> interface and not need to worry about
<a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> at all.
</p>
</div>
<div class="refsect1">
<a name="GSrvTarget.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GSrvTarget-struct"></a><h3>GSrvTarget</h3>
<pre class="programlisting">typedef struct _GSrvTarget GSrvTarget;</pre>
<p>
A single target host/port that a network service is running on.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-new"></a><h3>g_srv_target_new ()</h3>
<pre class="programlisting"><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="returnvalue">GSrvTarget</span></a> *        g_srv_target_new                    (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hostname</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> port</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> priority</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> weight</code></em>);</pre>
<p>
Creates a new <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> with the given parameters.
</p>
<p>
You should not need to use this; normally <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>s are
created by <a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hostname</code></em> :</span></p></td>
<td>the host that the service is running on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>the port that the service is running on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
<td>the target's priority</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>weight</code></em> :</span></p></td>
<td>the target's weight</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-copy"></a><h3>g_srv_target_copy ()</h3>
<pre class="programlisting"><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="returnvalue">GSrvTarget</span></a> *        g_srv_target_copy                   (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Copies <em class="parameter"><code>target</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of <em class="parameter"><code>target</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-free"></a><h3>g_srv_target_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_srv_target_free                   (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Frees <em class="parameter"><code>target</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-get-hostname"></a><h3>g_srv_target_get_hostname ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_srv_target_get_hostname           (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Gets <em class="parameter"><code>target</code></em>'s hostname (in ASCII form; if you are going to present
this to the user, you should use <a href="../glib/glib-Hostname-Utilities.html#g-hostname-is-ascii-encoded"><code class="function">g_hostname_is_ascii_encoded()</code></a> to
check if it contains encoded Unicode segments, and use
<a href="../glib/glib-Hostname-Utilities.html#g-hostname-to-unicode"><code class="function">g_hostname_to_unicode()</code></a> to convert it if it does.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>target</code></em>'s hostname</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-get-port"></a><h3>g_srv_target_get_port ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             g_srv_target_get_port               (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Gets <em class="parameter"><code>target</code></em>'s port
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>target</code></em>'s port</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-get-priority"></a><h3>g_srv_target_get_priority ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             g_srv_target_get_priority           (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Gets <em class="parameter"><code>target</code></em>'s priority. You should not need to look at this;
<a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> already sorts the targets according to the algorithm in
RFC 2782.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>target</code></em>'s priority</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-get-weight"></a><h3>g_srv_target_get_weight ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             g_srv_target_get_weight             (<em class="parameter"><code><a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a> *target</code></em>);</pre>
<p>
Gets <em class="parameter"><code>target</code></em>'s weight. You should not need to look at this;
<a class="link" href="GResolver.html" title="GResolver"><span class="type">GResolver</span></a> already sorts the targets according to the algorithm in
RFC 2782.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>a <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>target</code></em>'s weight</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="g-srv-target-list-sort"></a><h3>g_srv_target_list_sort ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_srv_target_list_sort              (<em class="parameter"><code><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *targets</code></em>);</pre>
<p>
Sorts <em class="parameter"><code>targets</code></em> in place according to the algorithm in RFC 2782.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
<td>a <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GSrvTarget.html" title="GSrvTarget"><span class="type">GSrvTarget</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the head of the sorted list. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.22</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>