From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Dibowitz <phil@ipom.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: NFCT_Q_DUMP problem
Date: Wed, 14 Mar 2007 14:17:10 +0100 [thread overview]
Message-ID: <45F7F5D6.8070904@netfilter.org> (raw)
In-Reply-To: <45F7A20A.5050302@ipom.com>
Phil Dibowitz wrote:
> Pablo Neira Ayuso wrote:
>> BTW, I suggest you to have a look a new_api_test.c under utils/ to get
>> quick look on the new API. The old API is deprecated and will vanish
>> sooner or later, new apps must use the new API.
>
> So I sat down to write some test code today on the new API, and I found all
> the nice getter functions, which are awesome... but I can't seem to make the
> new API work with NFCT_Q_DUMP. I shrunk down my test the bare minimum and
> nfct_query *always* returns errno for "Address family not supported by
> protocol" :(
>
> new_api_test.c doesn't test the NFCT_Q_DUMP query, so I'm wondering if it's
> perhaps a problem in the NFCT_Q_DUMP query type.
>
> Here's some sample code:
> [...]
> res = nfct_query(cth, NFCT_Q_DUMP, ct);
^^^
u_int8_t family = AF_INET;
res = nfct_query(cth, NFCT_Q_DUMP, &family);
Extracted from the API docs:
* The pointer to data can be a conntrack object or the protocol family
* depending on the request.
*
* For query types:
* NFCT_Q_CREATE
* NFCT_Q_UPDATE
* NFCT_Q_DESTROY
* NFCT_Q_GET
*
* Pass a valid pointer to a conntrack object.
*
* For query types:
* NFCT_Q_FLUSH
* NFCT_Q_DUMP
* NFCT_Q_DUMP_RESET
*
* Pass a valid pointer to the protocol family (u_int8_t)
I'm thinking about changing this to use va_list, thus not needing to
pass &family which is a bit ugly. This is one of the minor nitpicks of
the new API that I'd like to improve.
BTW, when do you plan to release your application?
--
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
next prev parent reply other threads:[~2007-03-14 13:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-12 1:56 libnetfilter_conntrack question Phil Dibowitz
2007-03-12 6:40 ` Phil Dibowitz
2007-03-12 10:14 ` Pablo Neira Ayuso
2007-03-13 7:40 ` Phil Dibowitz
2007-03-13 9:41 ` Pablo Neira Ayuso
2007-03-13 18:34 ` Phil Dibowitz
2007-03-14 7:19 ` NFCT_Q_DUMP problem Phil Dibowitz
2007-03-14 13:17 ` Pablo Neira Ayuso [this message]
2007-03-14 16:11 ` Phil Dibowitz
2007-03-15 11:50 ` Pablo Neira Ayuso
2007-03-15 0:45 ` Patrick McHardy
2007-03-15 0:54 ` Phil Dibowitz
2007-03-15 5:21 ` libnetfilter_conntrack question Phil Dibowitz
2007-03-15 11:36 ` Pablo Neira Ayuso
2007-03-16 8:44 ` Phil Dibowitz
2007-03-16 8:58 ` Patrick McHardy
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=45F7F5D6.8070904@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=phil@ipom.com \
/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.