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 INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM 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.
$Id: lwres_config.3,v 1.6 2001/01/09 21:49:18 bwelling Exp $
.Dd Jun 30, 2000 .Dt LWRES_CONFIG 3 .Os BIND9 9 .Sh NAME .Nm lwres_conf_init , .Nm lwres_conf_clear , .Nm lwres_conf_parse , .Nm lwres_conf_print , .Nm lwres_conf_get .Nd lightweight resolver configuration .Sh SYNOPSIS .Fd #include <lwres/lwres.h> .Fd .Ft void .Fo lwres_conf_init .Fa "lwres_context_t *ctx" .Fc .Ft void .Fo lwres_conf_clear .Fa "lwres_context_t *ctx" .Fc .Ft lwres_result_t .Fo lwres_conf_parse .Fa "lwres_context_t *ctx" .Fa "const char *filename" .Fc .Ft lwres_result_t .Fo lwres_conf_print .Fa "lwres_context_t *ctx" .Fa "FILE *fp" .Fc .Ft lwres_conf_t * .Fo lwres_conf_get .Fa "lwres_context_t *ctx" .Fc .Sh DESCRIPTION .Fn lwres_conf_init creates an empty .Dv lwres_conf_t structure for lightweight resolver context .Fa ctx .
p .Fn lwres_conf_clear frees up all the internal memory used by that .Dv lwres_conf_t structure in resolver context .Fa ctx .
p .Fn lwres_conf_parse opens the file .Fa filename and parses it to initialise the resolver context .Fa ctx 's .Dv lwres_conf_t structure.
p .Fn lwres_conf_print prints the .Dv lwres_conf_t structure for resolver context .Fa ctx to the .Dv FILE .Fa fp. .Sh RETURN VALUES .Fn lwres_conf_parse returns .Er LWRES_R_SUCCESS if it successfully read and parsed .Fa filename . It returns .Er LWRES_R_FAILURE if .Fa filename could not be opened or contained incorrect resolver statements.
p .Fn lwres_conf_print returns .Er LWRES_R_SUCCESS unless an error occurred when converting the network addresses to a numeric host address string. If this happens, the function returns .Er LWRES_R_FAILURE . .Sh SEE ALSO .Xr stdio 3 , .Xr resolver 5 . .Sh FILES
a /etc/resolv.conf