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
|
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $ISC: lwres_config.3,v 1.12.2.1.8.1 2004/03/06 07:41:42 marka Exp $
.\"
.TH "LWRES_CONFIG" "3" "Jun 30, 2000" "BIND9" ""
.SH NAME
lwres_conf_init, lwres_conf_clear, lwres_conf_parse, lwres_conf_print, lwres_conf_get \- lightweight resolver configuration
.SH SYNOPSIS
\fB#include <lwres/lwres.h>
.sp
.na
void
lwres_conf_init(lwres_context_t *ctx);
.ad
.sp
.na
void
lwres_conf_clear(lwres_context_t *ctx);
.ad
.sp
.na
lwres_result_t
lwres_conf_parse(lwres_context_t *ctx, const char *filename);
.ad
.sp
.na
lwres_result_t
lwres_conf_print(lwres_context_t *ctx, FILE *fp);
.ad
.sp
.na
lwres_conf_t *
lwres_conf_get(lwres_context_t *ctx);
.ad
\fR
.SH "DESCRIPTION"
.PP
\fBlwres_conf_init()\fR
creates an empty
\fBlwres_conf_t\fR
structure for lightweight resolver context
\fIctx\fR.
.PP
\fBlwres_conf_clear()\fR
frees up all the internal memory used by
that
\fBlwres_conf_t\fR
structure in resolver context
\fIctx\fR.
.PP
\fBlwres_conf_parse()\fR
opens the file
\fIfilename\fR
and parses it to initialise the resolver context
\fIctx\fR's
\fBlwres_conf_t\fR
structure.
.PP
\fBlwres_conf_print()\fR
prints the
\fBlwres_conf_t\fR
structure for resolver context
\fIctx\fR
to the
\fBFILE\fR
\fIfp\fR.
.SH "RETURN VALUES"
.PP
\fBlwres_conf_parse()\fR
returns
LWRES_R_SUCCESS
if it successfully read and parsed
\fIfilename\fR.
It returns
LWRES_R_FAILURE
if
\fIfilename\fR
could not be opened or contained incorrect
resolver statements.
.PP
\fBlwres_conf_print()\fR
returns
LWRES_R_SUCCESS
unless an error occurred when converting the network addresses to a
numeric host address string.
If this happens, the function returns
LWRES_R_FAILURE.
.SH "SEE ALSO"
.PP
\fBstdio\fR(3),
\fBresolver\fR(5).
.SH "FILES"
.PP
\fI/etc/resolv.conf\fR
|