---
name: "lwres_herror"
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_herror"
---

# lwres\_herror(3)

lightweight resolver error message generation

## NAME

lwres\_herror, lwres\_hstrerror - lightweight resolver error message generation

## SYNOPSIS

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

**void lwres\_herror(const char \****s***);**

**const char \* lwres\_hstrerror(int** *err***);**

## DESCRIPTION

**lwres\_herror()** prints the string *s* on **stderr** followed by the string generated by **lwres\_hstrerror()** for the error code stored in the global variable **lwres\_h\_errno**.

**lwres\_hstrerror()** returns an appropriate string for the error code gievn by *err*. The values of the error codes and messages are as follows:

**NETDB\_SUCCESS**

Resolver Error 0 (no error)

**HOST\_NOT\_FOUND**

Unknown host

**TRY\_AGAIN**

Host name lookup failure

**NO\_RECOVERY**

Unknown server error

**NO\_DATA**

No address associated with name

## RETURN VALUES

The string Unknown resolver error is returned by **lwres\_hstrerror()** when the value of **lwres\_h\_errno** is not a valid error code.

## SEE ALSO

[**herror**(3)](/herror/3.md), [**lwres\_hstrerror**(3)](/lwres_hstrerror/3.md).

## AUTHOR

**Internet Systems Consortium, Inc.**

## COPYRIGHT

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