IPQ_ERRSTR(3)
π IPQ_ERRSTR(3) β like, the libipq error-handling glow-up
okay bestie, so this one lives in the Linux Programmer's Manual (section 3, the library-call girlies π) and it's all about libipq and how it tells you something went wrong. no cap, it's short but it eats.
πΈ NAME πΈ
ipq_errstr, ipq_perror β the libipq error handling routines, aka your two besties for finding out why things went sideways π
β¨ SYNOPSIS β¨
#include <linux/netfilter.h>
#include <libipq.h>
char *ipq_errstr(void);
void ipq_perror(const char *s);
π¦ DESCRIPTION π¦
ipq_errstr π
so ipq_errstr hands you back a descriptive error message, and it builds that message off the current value of the internal ipq_errno variable. and like, every single libipq API function sets that internal variable whenever it fails β so it's always there holding the tea for you π«Ά
ipq_perror π
ipq_perror is the one that prints. it prints an error message to stderr that corresponds to the current value of the internal ipq_error variable, and to the global errno variable (if that one's set). the message comes prefixed with the string s, exactly as your application supplies it. and if s is NULL, the error message gets prefixed with the string "ERROR" instead β iconic default behavior honestly π
β RETURN VALUE β
ipq_errstr returns an error message as outlined above. that's the whole vibe β¨
π BUGS π
None known. not a single one. she's flawless, periodt π§
π AUTHOR π
James Morris <jmorris@intercode.com.au> β main character energy fr fr π
π COPYRIGHT π
Copyright (c) 2000-2001 Netfilter Core Team.
Distributed under the GNU General Public License. (yes, GPL, we stan πΈ)
π₯ SEE ALSO π₯
go read those next, iykyk π
lowkey a reminder just in case:ipq_perroris printing the internalipq_errorvariable up there, notipq_errnoβ the manpage said it that way so i'm saying it that way π don't @ me
mwah π that's the whole page β brought to you by the Linux iptables 1.2 girlies, dated 16 October 2001, still slaying in section 3 of the manual π¦β¨
π¦ where this page comes from
- alpine 3.22: iptables-doc 1.8.11-r1 Β· GPL-2.0-or-later
- alpine 3.23: iptables-doc 1.8.11-r1 Β· GPL-2.0-or-later
- alpine 3.24: iptables-doc 1.8.13-r0 Β· GPL-2.0-or-later
- nixpkgs unstable: iptables 1.8.13
- opensuse-leap 16.0: libipq-devel 1.8.11-160000.2.2 Β· Artistic-2.0 AND GPL-2.0-only
- opensuse-leap 16.0: libipq-devel 1.8.11-160000.2.2 Β· Artistic-2.0 AND GPL-2.0-only
- opensuse-leap 16.0: libipq-devel 1.8.11-160000.2.2 Β· Artistic-2.0 AND GPL-2.0-only
- opensuse-leap 16.0: libipq-devel 1.8.11-160000.2.2 Β· Artistic-2.0 AND GPL-2.0-only
- Copyright (c) 2000 Netfilter Core Team
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms