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

« back to all changes in this revision

Viewing changes to lib/lwres/man/lwres_gethostent.3

  • 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
 
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
 
1
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
2
2
.\" Copyright (C) 2001 Internet Software Consortium.
3
3
.\" 
4
4
.\" Permission to use, copy, modify, and distribute this software for any
13
13
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
.\" PERFORMANCE OF THIS SOFTWARE.
15
15
.\"
16
 
.\" $Id: lwres_gethostent.3,v 1.16.2.1.8.5 2005/10/13 02:33:53 marka Exp $
 
16
.\" $Id: lwres_gethostent.3,v 1.29 2007/01/30 00:24:59 marka Exp $
17
17
.\"
18
18
.hy 0
19
19
.ad l
20
 
.\" ** You probably do not want to edit this file directly **
21
 
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
22
 
.\" Instead of manually editing it, you probably should edit the DocBook XML
23
 
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
 
20
.\"     Title: lwres_gethostent
 
21
.\"    Author: 
 
22
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
 
23
.\"      Date: Jun 30, 2000
 
24
.\"    Manual: BIND9
 
25
.\"    Source: BIND9
 
26
.\"
24
27
.TH "LWRES_GETHOSTENT" "3" "Jun 30, 2000" "BIND9" "BIND9"
25
28
.\" disable hyphenation
26
29
.nh
33
36
#include <lwres/netdb.h>
34
37
.fi
35
38
.HP 37
36
 
\fBstruct\ hostent\ *\ \fBlwres_gethostbyname\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB);\fR
 
39
.BI "struct hostent * lwres_gethostbyname(const\ char\ *" "name" ");"
37
40
.HP 38
38
 
\fBstruct\ hostent\ *\ \fBlwres_gethostbyname2\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBint\ af\fR\fB);\fR
 
41
.BI "struct hostent * lwres_gethostbyname2(const\ char\ *" "name" ", int\ " "af" ");"
39
42
.HP 37
40
 
\fBstruct\ hostent\ *\ \fBlwres_gethostbyaddr\fR\fR\fB(\fR\fBconst\ char\ *addr\fR\fB, \fR\fBint\ len\fR\fB, \fR\fBint\ type\fR\fB);\fR
 
43
.BI "struct hostent * lwres_gethostbyaddr(const\ char\ *" "addr" ", int\ " "len" ", int\ " "type" ");"
41
44
.HP 34
42
 
\fBstruct\ hostent\ *\ \fBlwres_gethostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
43
 
.HP 22
44
 
\fBvoid\ \fBlwres_sethostent\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
45
 
.HP 22
46
 
\fBvoid\ \fBlwres_endhostent\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
47
 
.HP 39
48
 
\fBstruct\ hostent\ *\ \fBlwres_gethostbyname_r\fR\fR\fB(\fR\fBconst\ char\ *name\fR\fB, \fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
49
 
.HP 39
50
 
\fBstruct\ hostent\ *\ \fBlwres_gethostbyaddr_r\fR\fR\fB(\fR\fBconst\ char\ *addr\fR\fB, \fR\fBint\ len\fR\fB, \fR\fBint\ type\fR\fB, \fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
 
45
.BI "struct hostent * lwres_gethostent(void);"
 
46
.HP 22
 
47
.BI "void lwres_sethostent(int\ " "stayopen" ");"
 
48
.HP 22
 
49
.BI "void lwres_endhostent(void);"
 
50
.HP 39
 
51
.BI "struct hostent * lwres_gethostbyname_r(const\ char\ *" "name" ", struct\ hostent\ *" "resbuf" ", char\ *" "buf" ", int\ " "buflen" ", int\ *" "error" ");"
 
52
.HP 39
 
53
.BI "struct hostent * lwres_gethostbyaddr_r(const\ char\ *" "addr" ", int\ " "len" ", int\ " "type" ", struct\ hostent\ *" "resbuf" ", char\ *" "buf" ", int\ " "buflen" ", int\ *" "error" ");"
51
54
.HP 36
52
 
\fBstruct\ hostent\ *\ \fBlwres_gethostent_r\fR\fR\fB(\fR\fBstruct\ hostent\ *resbuf\fR\fB, \fR\fBchar\ *buf\fR\fB, \fR\fBint\ buflen\fR\fB, \fR\fBint\ *error\fR\fB);\fR
53
 
.HP 24
54
 
\fBvoid\ \fBlwres_sethostent_r\fR\fR\fB(\fR\fBint\ stayopen\fR\fB);\fR
55
 
.HP 24
56
 
\fBvoid\ \fBlwres_endhostent_r\fR\fR\fB(\fR\fBvoid\fR\fB);\fR
 
55
.BI "struct hostent * lwres_gethostent_r(struct\ hostent\ *" "resbuf" ", char\ *" "buf" ", int\ " "buflen" ", int\ *" "error" ");"
 
56
.HP 24
 
57
.BI "void lwres_sethostent_r(int\ " "stayopen" ");"
 
58
.HP 24
 
59
.BI "void lwres_endhostent_r(void);"
57
60
.SH "DESCRIPTION"
58
61
.PP
59
62
These functions provide hostname\-to\-address and address\-to\-hostname lookups by means of the lightweight resolver. They are similar to the standard
60
 
\fBgethostent\fR(3 )
 
63
\fBgethostent\fR(3)
61
64
functions provided by most operating systems. They use a
62
65
\fBstruct hostent\fR
63
66
which is usually defined in
64
67
\fI<namedb.h>\fR.
65
 
.sp
 
68
.PP
 
69
.RS 4
66
70
.nf
67
71
struct  hostent {
68
72
        char    *h_name;        /* official name of host */
73
77
};
74
78
#define h_addr  h_addr_list[0]  /* address, for backward compatibility */
75
79
.fi
 
80
.RE
76
81
.sp
77
82
.PP
78
83
The members of this structure are:
79
 
.TP
 
84
.PP
80
85
\fBh_name\fR
 
86
.RS 4
81
87
The official (canonical) name of the host.
82
 
.TP
 
88
.RE
 
89
.PP
83
90
\fBh_aliases\fR
 
91
.RS 4
84
92
A NULL\-terminated array of alternate names (nicknames) for the host.
85
 
.TP
 
93
.RE
 
94
.PP
86
95
\fBh_addrtype\fR
 
96
.RS 4
87
97
The type of address being returned \(em
88
98
\fBPF_INET\fR
89
99
or
90
100
\fBPF_INET6\fR.
91
 
.TP
 
101
.RE
 
102
.PP
92
103
\fBh_length\fR
 
104
.RS 4
93
105
The length of the address in bytes.
94
 
.TP
 
106
.RE
 
107
.PP
95
108
\fBh_addr_list\fR
 
109
.RS 4
96
110
A
97
111
\fBNULL\fR
98
112
terminated array of network addresses for the host. Host addresses are returned in network byte order.
 
113
.RE
99
114
.PP
100
115
For backward compatibility with very old software,
101
116
\fBh_addr\fR
153
168
is a pointer to a
154
169
\fBstruct hostent\fR
155
170
which is initialised by a successful call to
156
 
\fBlwres_gethostbyname_r()\fR
157
 
.
 
171
\fBlwres_gethostbyname_r()\fR.
158
172
\fIbuf\fR
159
173
is a buffer of length
160
174
\fIlen\fR
217
231
\fBlwres_h_errno\fR
218
232
will contain one of the following error codes defined in
219
233
\fI<lwres/netdb.h>\fR:
220
 
.TP
 
234
.PP
221
235
\fBHOST_NOT_FOUND\fR
 
236
.RS 4
222
237
The host or address was not found.
223
 
.TP
 
238
.RE
 
239
.PP
224
240
\fBTRY_AGAIN\fR
 
241
.RS 4
225
242
A recoverable error occurred, e.g., a timeout. Retrying the lookup may succeed.
226
 
.TP
 
243
.RE
 
244
.PP
227
245
\fBNO_RECOVERY\fR
 
246
.RS 4
228
247
A non\-recoverable error occurred.
229
 
.TP
 
248
.RE
 
249
.PP
230
250
\fBNO_DATA\fR
 
251
.RS 4
231
252
The name exists, but has no address information associated with it (or vice versa in the case of a reverse lookup). The code NO_ADDRESS is accepted as a synonym for NO_DATA for backwards compatibility.
 
253
.RE
232
254
.PP
233
 
\fBlwres_hstrerror\fR(3 )
 
255
\fBlwres_hstrerror\fR(3)
234
256
translates these error codes to suitable error messages.
235
257
.PP
236
258
\fBlwres_gethostent()\fR
269
291
.PP
270
292
\fBgethostent\fR(3),
271
293
\fBlwres_getipnode\fR(3),
272
 
\fBlwres_hstrerror\fR(3 )
 
294
\fBlwres_hstrerror\fR(3)
273
295
.SH "BUGS"
274
296
.PP
275
297
\fBlwres_gethostbyname()\fR,
286
308
\fI/etc/hosts\fR
287
309
or
288
310
\fBNIS\fR, consequently the above functions don't, either.
 
311
.SH "COPYRIGHT"
 
312
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
 
313
.br
 
314
Copyright \(co 2001 Internet Software Consortium.
 
315
.br