All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Gregor Maier <gregor@net.in.tum.de>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [RFC] libnfnetlink, libnetfilter_log, libnetfilter_queue  error handling
Date: Mon, 12 Jun 2006 00:04:08 +0200	[thread overview]
Message-ID: <448C9358.6070904@netfilter.org> (raw)
In-Reply-To: <44899B44.2030605@net.in.tum.de>

Gregor Maier wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> 
> I noticed that libnfnetlink, libnetfilter_* are currently missing decent
> error handling and reporting mechanisms.
> 
> libnetfilter_log and libnetfilter_queue define a nflog_errno resp.
> nfq_errno but those aren't really used. libnfnetlink uses fprintf for
> error handling/reporting.
> 
> What do you think about the following suggestions:
> * add a nfnl_errno variable
> * add #defines for nfnl_errno values also add a nfnl_strerror and a
> nfnl_perror function
> * add #defines for nflog_errno and nfq_errno and nf{log|q}_strerror and
> nf{log|q}_perror functions.
> 
> * make nflog_errno and nfq_errno a superset of the nfnl_errnos. E.g. by
> defining that error values from 1...N are for nfnl and values above N
> are for nfq_errno and nflog_errno.
> * nflog_strerror (and nfq_strerror) check if nflog_errno (resp.
> nfq_errno) is <= N. If so, they call nfnl_strerror otherwise they handle
> the error themselves.

All those seem a good idea, I have currently enqueued a set of patches 
for libnfnetlink and friends that I'll post in some days, still want to 
give them some spins. I think that we could integrate this changes that 
you propose.

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of 
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

  reply	other threads:[~2006-06-11 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09 16:01 [RFC] libnfnetlink, libnetfilter_log, libnetfilter_queue error handling Gregor Maier
2006-06-11 22:04 ` Pablo Neira Ayuso [this message]
2006-06-12 12:34 ` Holger Eitzenberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=448C9358.6070904@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=gregor@net.in.tum.de \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.