IPQ\_ERRSTR(3) Linux Programmer's Manual IPQ\_ERRSTR(3)

# [NAME](#NAME)

ipq\_errstr, ipq\_perror — libipq error handling routines

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;linux/netfilter.h&gt;**  
**#include &lt;libipq.h&gt;**

**char \*ipq\_errstr(void);**  
**void ipq\_perror(const char \*s);**

# [DESCRIPTION](#DESCRIPTION)

The **ipq\_errstr** function returns a descriptive error message based on the current value of the internal **ipq\_errno** variable. All libipq API functions set this internal variable upon failure.

The **ipq\_perror** function prints an error message to stderr corresponding to the current value of the internal **ipq\_error** variable, and the global **errno** variable (if set). The error message is prefixed with the string *s* as supplied by the application. If *s* is NULL, the error message is prefixed with the string "ERROR".

# [RETURN VALUE](#RETURN_VALUE)

**ipq\_errstr** returns an error message as outlined above.

# [BUGS](#BUGS)

None known.

# [AUTHOR](#AUTHOR)

James Morris &lt;jmorris@intercode.com.au&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright (c) 2000-2001 Netfilter Core Team.

Distributed under the GNU General Public License.

# [SEE ALSO](#SEE_ALSO)

[**iptables**(8)](/man/os/iptables/iptables.8), [**libipq**(3)](/man/os/iptables/libipq.3).

16 October 2001 Linux iptables 1.2

---

Document: ipq_perror(3) from iptables 1.8.13-r4 (Chainguard OS)
Source: https://git.netfilter.org/iptables/
