From: Phil Dibowitz <phil@ipom.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: libnetfilter_conntrack question
Date: Tue, 13 Mar 2007 11:34:20 -0700 [thread overview]
Message-ID: <45F6EEAC.1020300@ipom.com> (raw)
In-Reply-To: <45F671CA.6010401@netfilter.org>
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
Pablo Neira Ayuso wrote:
> Phil Dibowitz wrote:
>> Another question - is there a way to get the nfct flags map outside of a
>> hook? I don't see a way to pull it down, but I could be missing it.
>
> Sorry, I don't understand what you mean.
Inside nfct there is a flags unsigned int that says stuff like "do you have
counters enabled" and various other things. Is there a function I can call
to get it?
For example - if a user requests display of byte/packet counters, I'd like
to be able to check if support for that is in the kernel, if it's not, say
so, throw a message about it, and then continue on rather than figure it out
in a hook and try and save off some data about it so I can handle it later.
> 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.
Thakns for the heads up. ..and I just ported my app from
/proc/net/ip_conntrack to libnetfilter-conntrack-0.0.30. Just so I know, do
you plan any other major API changes soon?
Anyway... new_api_test.c does _test_ the API... the only thing I currently
use in my app is
nfct_open()
nfct_register_callback()
nfct_dump_conntrack_table()
nfct_close()
and then in my hook I just go digging through the nfct_conntrack struct for
the data I want.
The struct appears the same. But instead of dump_conntrack, it looks like
I'd call nfct_callback_register() with NFCT_ALL and then nfct_query with
NFCT_Q_DUMP... or am I missing some other change here from a quick glance at
the code?
Thanks again,
--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Never write it in C if you can do it in 'awk';
Never do it in 'awk' if 'sed' can handle it;
Never use 'sed' when 'tr' can do the job;
Never invoke 'tr' when 'cat' is sufficient;
Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2007-03-13 18:34 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 [this message]
2007-03-14 7:19 ` NFCT_Q_DUMP problem Phil Dibowitz
2007-03-14 13:17 ` Pablo Neira Ayuso
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=45F6EEAC.1020300@ipom.com \
--to=phil@ipom.com \
--cc=netfilter-devel@lists.netfilter.org \
--cc=pablo@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.