~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/lwres/man/lwres_getipnode.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!--
2
 
 - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
 
2
 - Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
3
3
 - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
4
4
 - 
5
5
 - Permission to use, copy, modify, and distribute this software for any
14
14
 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
 - PERFORMANCE OF THIS SOFTWARE.
16
16
-->
17
 
<!-- $Id: lwres_getipnode.html,v 1.7.2.1.4.9 2005/10/13 02:33:56 marka Exp $ -->
 
17
<!-- $Id: lwres_getipnode.html,v 1.25 2007/01/30 00:24:59 marka Exp $ -->
18
18
<html>
19
19
<head>
20
20
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21
21
<title>lwres_getipnode</title>
22
 
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 
22
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23
23
</head>
24
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25
 
<a name="id2463721"></a><div class="titlepage"></div>
 
25
<a name="id2476275"></a><div class="titlepage"></div>
26
26
<div class="refnamediv">
27
27
<h2>Name</h2>
28
28
<p>lwres_getipnodebyname, lwres_getipnodebyaddr, lwres_freehostent &#8212; lightweight resolver nodename / address translation API</p>
36
36
<td><code class="funcdef">
37
37
struct hostent *
38
38
<b class="fsfunc">lwres_getipnodebyname</b>(</code></td>
39
 
<td>�</td>
40
 
<td>, </td>
41
 
</tr>
42
 
<tr>
43
 
<td>�</td>
44
 
<td>�</td>
45
 
<td>, </td>
46
 
</tr>
47
 
<tr>
48
 
<td>�</td>
49
 
<td>�</td>
50
 
<td>, </td>
51
 
</tr>
52
 
<tr>
53
 
<td>�</td>
54
 
<td>�</td>
55
 
<td>
56
 
<code>)</code>;</td>
 
39
<td>const char *�</td>
 
40
<td>
 
41
<var class="pdparam">name</var>, </td>
 
42
</tr>
 
43
<tr>
 
44
<td>�</td>
 
45
<td>int �</td>
 
46
<td>
 
47
<var class="pdparam">af</var>, </td>
 
48
</tr>
 
49
<tr>
 
50
<td>�</td>
 
51
<td>int �</td>
 
52
<td>
 
53
<var class="pdparam">flags</var>, </td>
 
54
</tr>
 
55
<tr>
 
56
<td>�</td>
 
57
<td>int *�</td>
 
58
<td>
 
59
<var class="pdparam">error_num</var><code>)</code>;</td>
57
60
</tr>
58
61
</table>
59
62
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
61
64
<td><code class="funcdef">
62
65
struct hostent *
63
66
<b class="fsfunc">lwres_getipnodebyaddr</b>(</code></td>
64
 
<td>�</td>
65
 
<td>, </td>
66
 
</tr>
67
 
<tr>
68
 
<td>�</td>
69
 
<td>�</td>
70
 
<td>, </td>
71
 
</tr>
72
 
<tr>
73
 
<td>�</td>
74
 
<td>�</td>
75
 
<td>, </td>
76
 
</tr>
77
 
<tr>
78
 
<td>�</td>
79
 
<td>�</td>
80
 
<td>
81
 
<code>)</code>;</td>
 
67
<td>const void *�</td>
 
68
<td>
 
69
<var class="pdparam">src</var>, </td>
 
70
</tr>
 
71
<tr>
 
72
<td>�</td>
 
73
<td>size_t �</td>
 
74
<td>
 
75
<var class="pdparam">len</var>, </td>
 
76
</tr>
 
77
<tr>
 
78
<td>�</td>
 
79
<td>int �</td>
 
80
<td>
 
81
<var class="pdparam">af</var>, </td>
 
82
</tr>
 
83
<tr>
 
84
<td>�</td>
 
85
<td>int *�</td>
 
86
<td>
 
87
<var class="pdparam">error_num</var><code>)</code>;</td>
82
88
</tr>
83
89
</table>
84
90
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr>
85
91
<td><code class="funcdef">
86
92
void
87
93
<b class="fsfunc">lwres_freehostent</b>(</code></td>
88
 
<td>�</td>
 
94
<td>struct hostent *�</td>
89
95
<td>
90
 
<code>)</code>;</td>
 
96
<var class="pdparam">he</var><code>)</code>;</td>
91
97
</tr></table>
92
98
</div>
93
99
</div>
94
100
<div class="refsect1" lang="en">
95
 
<a name="id2525896"></a><h2>DESCRIPTION</h2>
96
 
<p>
97
 
These functions perform thread safe, protocol independent
98
 
nodename-to-address and address-to-nodename 
99
 
translation as defined in RFC2553.
100
 
</p>
101
 
<p>
102
 
They use a
103
 
<span class="type">struct hostent</span>
104
 
which is defined in
105
 
<code class="filename">namedb.h</code>:
106
 
</p>
 
101
<a name="id2543431"></a><h2>DESCRIPTION</h2>
 
102
<p>
 
103
      These functions perform thread safe, protocol independent
 
104
      nodename-to-address and address-to-nodename
 
105
      translation as defined in RFC2553.
 
106
    </p>
 
107
<p>
 
108
      They use a
 
109
      <span class="type">struct hostent</span>
 
110
      which is defined in
 
111
      <code class="filename">namedb.h</code>:
 
112
    </p>
107
113
<pre class="programlisting">
108
114
struct  hostent {
109
115
        char    *h_name;        /* official name of host */
115
121
#define h_addr  h_addr_list[0]  /* address, for backward compatibility */
116
122
</pre>
117
123
<p>
118
 
</p>
 
124
    </p>
119
125
<p>
120
 
The members of this structure are:
121
 
</p>
 
126
      The members of this structure are:
 
127
      </p>
122
128
<div class="variablelist"><dl>
123
129
<dt><span class="term"><code class="constant">h_name</code></span></dt>
124
130
<dd><p>
125
 
The official (canonical) name of the host.
126
 
</p></dd>
 
131
              The official (canonical) name of the host.
 
132
            </p></dd>
127
133
<dt><span class="term"><code class="constant">h_aliases</code></span></dt>
128
134
<dd><p>
129
 
A NULL-terminated array of alternate names (nicknames) for the host.
130
 
</p></dd>
 
135
              A NULL-terminated array of alternate names (nicknames) for the
 
136
              host.
 
137
            </p></dd>
131
138
<dt><span class="term"><code class="constant">h_addrtype</code></span></dt>
132
139
<dd><p>
133
 
The type of address being returned - usually
134
 
<span class="type">PF_INET</span>
135
 
or
136
 
<span class="type">PF_INET6</span>.
 
140
              The type of address being returned - usually
 
141
              <span class="type">PF_INET</span>
 
142
              or
 
143
              <span class="type">PF_INET6</span>.
137
144
 
138
 
</p></dd>
 
145
            </p></dd>
139
146
<dt><span class="term"><code class="constant">h_length</code></span></dt>
140
147
<dd><p>
141
 
The length of the address in bytes.
142
 
</p></dd>
 
148
              The length of the address in bytes.
 
149
            </p></dd>
143
150
<dt><span class="term"><code class="constant">h_addr_list</code></span></dt>
144
151
<dd><p>
145
 
A
146
 
<span class="type">NULL</span>
147
 
terminated array of network addresses for the host.
148
 
Host addresses are returned in network byte order.
149
 
</p></dd>
 
152
              A
 
153
              <span class="type">NULL</span>
 
154
              terminated array of network addresses for the host.
 
155
              Host addresses are returned in network byte order.
 
156
            </p></dd>
150
157
</dl></div>
151
158
<p>
152
 
</p>
153
 
<p>
154
 
<code class="function">lwres_getipnodebyname()</code>
155
 
looks up addresses of protocol family
156
 
<em class="parameter"><code>af</code></em>
157
 
 
158
 
for the hostname
159
 
<em class="parameter"><code>name</code></em>.
160
 
 
161
 
The
162
 
<em class="parameter"><code>flags</code></em>
163
 
parameter contains ORed flag bits to 
164
 
specify the types of addresses that are searched
165
 
for, and the types of addresses that are returned. 
166
 
The flag bits are:
167
 
</p>
 
159
    </p>
 
160
<p><code class="function">lwres_getipnodebyname()</code>
 
161
      looks up addresses of protocol family <em class="parameter"><code>af</code></em>
 
162
      for the hostname <em class="parameter"><code>name</code></em>.  The
 
163
      <em class="parameter"><code>flags</code></em> parameter contains ORed flag bits
 
164
      to specify the types of addresses that are searched for, and the
 
165
      types of addresses that are returned.  The flag bits are:
 
166
 
 
167
      </p>
168
168
<div class="variablelist"><dl>
169
169
<dt><span class="term"><code class="constant">AI_V4MAPPED</code></span></dt>
170
170
<dd><p>
171
 
This is used with an
172
 
<em class="parameter"><code>af</code></em>
173
 
of AF_INET6, and causes IPv4 addresses to be returned as IPv4-mapped
174
 
IPv6 addresses.
175
 
</p></dd>
 
171
              This is used with an
 
172
              <em class="parameter"><code>af</code></em>
 
173
              of AF_INET6, and causes IPv4 addresses to be returned as
 
174
              IPv4-mapped
 
175
              IPv6 addresses.
 
176
            </p></dd>
176
177
<dt><span class="term"><code class="constant">AI_ALL</code></span></dt>
177
178
<dd><p>
178
 
This is used with an
179
 
<em class="parameter"><code>af</code></em>
180
 
of AF_INET6, and causes all known addresses (IPv6 and IPv4) to be returned.
181
 
If AI_V4MAPPED is also set, the IPv4 addresses are return as mapped
182
 
IPv6 addresses.
183
 
</p></dd>
 
179
              This is used with an
 
180
              <em class="parameter"><code>af</code></em>
 
181
              of AF_INET6, and causes all known addresses (IPv6 and IPv4) to
 
182
              be returned.
 
183
              If AI_V4MAPPED is also set, the IPv4 addresses are return as
 
184
              mapped
 
185
              IPv6 addresses.
 
186
            </p></dd>
184
187
<dt><span class="term"><code class="constant">AI_ADDRCONFIG</code></span></dt>
185
188
<dd><p>
186
 
Only return an IPv6 or IPv4 address if here is an active network
187
 
interface of that type.  This is not currently implemented
188
 
in the BIND 9 lightweight resolver, and the flag is ignored.
189
 
</p></dd>
 
189
              Only return an IPv6 or IPv4 address if here is an active network
 
190
              interface of that type.  This is not currently implemented
 
191
              in the BIND 9 lightweight resolver, and the flag is ignored.
 
192
            </p></dd>
190
193
<dt><span class="term"><code class="constant">AI_DEFAULT</code></span></dt>
191
194
<dd><p>
192
 
This default sets the
193
 
<code class="constant">AI_V4MAPPED</code>
194
 
and
195
 
<code class="constant">AI_ADDRCONFIG</code>
196
 
flag bits.
197
 
</p></dd>
 
195
              This default sets the
 
196
              <code class="constant">AI_V4MAPPED</code>
 
197
              and
 
198
              <code class="constant">AI_ADDRCONFIG</code>
 
199
              flag bits.
 
200
            </p></dd>
198
201
</dl></div>
199
202
<p>
200
 
</p>
201
 
<p>
202
 
<code class="function">lwres_getipnodebyaddr()</code>
203
 
performs a reverse lookup
204
 
of address
205
 
<em class="parameter"><code>src</code></em>
206
 
which is
207
 
<em class="parameter"><code>len</code></em>
208
 
bytes long.
209
 
<em class="parameter"><code>af</code></em>
210
 
denotes the protocol family, typically
211
 
<span class="type">PF_INET</span>
212
 
or
213
 
<span class="type">PF_INET6</span>.
214
 
 
215
 
</p>
216
 
<p>
217
 
<code class="function">lwres_freehostent()</code>
218
 
releases all the memory associated with
219
 
the
220
 
<span class="type">struct hostent</span>
221
 
pointer
222
 
<em class="parameter"><code>he</code></em>.
223
 
 
224
 
Any memory allocated for the
225
 
<code class="constant">h_name</code>,
226
 
 
227
 
<code class="constant">h_addr_list</code>
228
 
and
229
 
<code class="constant">h_aliases</code>
230
 
is freed, as is the memory for the
231
 
<span class="type">hostent</span>
232
 
structure itself.
233
 
</p>
 
203
    </p>
 
204
<p><code class="function">lwres_getipnodebyaddr()</code>
 
205
      performs a reverse lookup of address <em class="parameter"><code>src</code></em>
 
206
      which is <em class="parameter"><code>len</code></em> bytes long.
 
207
      <em class="parameter"><code>af</code></em> denotes the protocol family, typically
 
208
      <span class="type">PF_INET</span> or <span class="type">PF_INET6</span>.
 
209
    </p>
 
210
<p><code class="function">lwres_freehostent()</code>
 
211
      releases all the memory associated with the <span class="type">struct
 
212
      hostent</span> pointer <em class="parameter"><code>he</code></em>.  Any memory
 
213
      allocated for the <code class="constant">h_name</code>,
 
214
      <code class="constant">h_addr_list</code> and
 
215
      <code class="constant">h_aliases</code> is freed, as is the memory for
 
216
      the <span class="type">hostent</span> structure itself.
 
217
    </p>
234
218
</div>
235
219
<div class="refsect1" lang="en">
236
 
<a name="id2526131"></a><h2>RETURN VALUES</h2>
 
220
<a name="id2543689"></a><h2>RETURN VALUES</h2>
237
221
<p>
238
 
If an error occurs,
239
 
<code class="function">lwres_getipnodebyname()</code>
240
 
and
241
 
<code class="function">lwres_getipnodebyaddr()</code>
242
 
set
243
 
<em class="parameter"><code>*error_num</code></em>
244
 
to an appropriate error code and the function returns a
245
 
<span class="type">NULL</span>
246
 
pointer.
247
 
The error codes and their meanings are defined in
248
 
<code class="filename">&lt;lwres/netdb.h&gt;</code>:
249
 
</p>
 
222
      If an error occurs,
 
223
      <code class="function">lwres_getipnodebyname()</code>
 
224
      and
 
225
      <code class="function">lwres_getipnodebyaddr()</code>
 
226
      set
 
227
      <em class="parameter"><code>*error_num</code></em>
 
228
      to an appropriate error code and the function returns a
 
229
      <span class="type">NULL</span>
 
230
      pointer.
 
231
      The error codes and their meanings are defined in
 
232
      <code class="filename">&lt;lwres/netdb.h&gt;</code>:
 
233
      </p>
250
234
<div class="variablelist"><dl>
251
235
<dt><span class="term"><code class="constant">HOST_NOT_FOUND</code></span></dt>
252
236
<dd><p>
253
 
No such host is known.
254
 
</p></dd>
 
237
              No such host is known.
 
238
            </p></dd>
255
239
<dt><span class="term"><code class="constant">NO_ADDRESS</code></span></dt>
256
240
<dd><p>
257
 
The server recognised the request and the name but no address is
258
 
available.  Another type of request to the name server for the
259
 
domain might return an answer.
260
 
</p></dd>
 
241
              The server recognised the request and the name but no address is
 
242
              available.  Another type of request to the name server for the
 
243
              domain might return an answer.
 
244
            </p></dd>
261
245
<dt><span class="term"><code class="constant">TRY_AGAIN</code></span></dt>
262
246
<dd><p>
263
 
A temporary and possibly transient error occurred, such as a
264
 
failure of a server to respond.  The request may succeed if
265
 
retried.
266
 
</p></dd>
 
247
              A temporary and possibly transient error occurred, such as a
 
248
              failure of a server to respond.  The request may succeed if
 
249
              retried.
 
250
            </p></dd>
267
251
<dt><span class="term"><code class="constant">NO_RECOVERY</code></span></dt>
268
252
<dd><p>
269
 
An unexpected failure occurred, and retrying the request
270
 
is pointless.
271
 
</p></dd>
 
253
              An unexpected failure occurred, and retrying the request
 
254
              is pointless.
 
255
            </p></dd>
272
256
</dl></div>
273
257
<p>
274
 
</p>
275
 
<p>
276
 
<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3
277
 
)</span>
278
 
translates these error codes to suitable error messages.
279
 
</p>
 
258
    </p>
 
259
<p><span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>
 
260
      translates these error codes to suitable error messages.
 
261
    </p>
280
262
</div>
281
263
<div class="refsect1" lang="en">
282
 
<a name="id2526290"></a><h2>SEE ALSO</h2>
283
 
<p>
284
 
<span class="citerefentry"><span class="refentrytitle">RFC2553</span></span>,
285
 
 
286
 
<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
287
 
 
288
 
<span class="citerefentry"><span class="refentrytitle">lwres_gethostent</span>(3)</span>,
289
 
 
290
 
<span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
291
 
 
292
 
<span class="citerefentry"><span class="refentrytitle">lwres_getnameinfo</span>(3)</span>,
293
 
 
294
 
<span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.
295
 
</p>
 
264
<a name="id2543786"></a><h2>SEE ALSO</h2>
 
265
<p><span class="citerefentry"><span class="refentrytitle">RFC2553</span></span>,
 
266
 
 
267
      <span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
 
268
 
 
269
      <span class="citerefentry"><span class="refentrytitle">lwres_gethostent</span>(3)</span>,
 
270
 
 
271
      <span class="citerefentry"><span class="refentrytitle">lwres_getaddrinfo</span>(3)</span>,
 
272
 
 
273
      <span class="citerefentry"><span class="refentrytitle">lwres_getnameinfo</span>(3)</span>,
 
274
 
 
275
      <span class="citerefentry"><span class="refentrytitle">lwres_hstrerror</span>(3)</span>.
 
276
    </p>
296
277
</div>
297
278
</div></body>
298
279
</html>