---
name: "lwres_conf_parse"
section: "3"
platform: "linux"
package: "libbind-dev"
version: "1:9.11.5.P4+dfsg-5.1+deb10u7"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/lwres_conf_parse"
---

# lwres\_conf\_parse(3)

lightweight resolver configuration

## NAME

lwres\_conf\_init, lwres\_conf\_clear, lwres\_conf\_parse, lwres\_conf\_print, lwres\_conf\_get - lightweight resolver configuration

## SYNOPSIS

```
#include <lwres/lwres.h>
```

**void lwres\_conf\_init(lwres\_context\_t \****ctx***);**

**void lwres\_conf\_clear(lwres\_context\_t \****ctx***);**

**lwres\_result\_t lwres\_conf\_parse(lwres\_context\_t \****ctx***, const char \****filename***);**

**lwres\_result\_t lwres\_conf\_print(lwres\_context\_t \****ctx***, FILE \****fp***);**

**lwres\_conf\_t \* lwres\_conf\_get(lwres\_context\_t \****ctx***);**

## DESCRIPTION

**lwres\_conf\_init()** creates an empty **lwres\_conf\_t** structure for lightweight resolver context *ctx*.

**lwres\_conf\_clear()** frees up all the internal memory used by that **lwres\_conf\_t** structure in resolver context *ctx*.

**lwres\_conf\_parse()** opens the file *filename* and parses it to initialise the resolver context *ctx*'s **lwres\_conf\_t** structure.

**lwres\_conf\_print()** prints the **lwres\_conf\_t** structure for resolver context *ctx* to the **FILE***fp*.

## RETURN VALUES

**lwres\_conf\_parse()** returns **LWRES\_R\_SUCCESS** if it successfully read and parsed *filename*. It returns **LWRES\_R\_FAILURE** if *filename* could not be opened or contained incorrect resolver statements.

**lwres\_conf\_print()** 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**.

## SEE ALSO

[**stdio**(3)](/stdio/3.md), [**resolver**(5)](/resolver/5.md).

## FILES

/etc/resolv.conf

## AUTHOR

**Internet Systems Consortium, Inc.**

## COPYRIGHT

Copyright © 2000, 2001, 2004, 2005, 2007, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")\
