From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>, Eric Leblond <eric@inl.fr>
Subject: Re: [RFC] new API for libnetfilter_conntrack
Date: Fri, 03 Nov 2006 11:03:03 +0100 [thread overview]
Message-ID: <454B13D7.4070006@trash.net> (raw)
In-Reply-To: <45456285.4010609@netfilter.org>
Pablo Neira Ayuso wrote:
> Hi,
>
> Attached a patch, yet incomplete, that introduces the new API for
> libnetfilter_conntrack. Basically the idea consists of providing
> "conntrack" objects constructor/destructor functions and an interface to
> get and set object attributes. The conntrack object structure is
> encapsulated therefore we can add new attributes without breaking binary
> backward compatibility. There is an example of the new API use in the
> patch (see test.c file)
>
> See that conntrack object attributes are different from the netlink
> attributes therefore they provide a high level interface that abstract
> from netlink details. The idea is to let the programmer make the choice
> to work with high level (objects) or low level (netlink) and provide the
> gateways to switch from high to low level and vice-versa by means of
> functions to build/parse netlink messages from/to conntrack objects.
>
> The reason why I posted this patch is because I'm thinking about
> generalizing this a bit more and provide a complete high level API that
> would be the same for all the netfilter subsystems. This will result in
> a single library to rules them all with a subdirectory that contains the
> details of every specific subsystem.
>
> nfh = nf_open(); /* encapsulate nfnl_open() */
> ssh = nf_setup_subsys(nfnlh, CONNTRACK); /* encapsulate
> nfnl_subsys_open() */
> ...
> ct = nf_new_object(NF_CONNTRACK_OBJECT);
> nf_set_attr_u8(ct, ATTR_XXX, value);
> nf_set_attr_u16(ct, ATTR_XXX, value);
> ...
> nf_query_object(ssh, NF_CT_CREATE, ct);
> nf_free_object(ct);
> nf_close(nfh);
>
> I'd like to hear from you before going ahead, always appreciate your
> feedback guys. Comments welcome.
I like that approach. Its getting pretty close to the libnl API,
have you considered integrating this in libnl?
next prev parent reply other threads:[~2006-11-03 10:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 2:25 [RFC] new API for libnetfilter_conntrack Pablo Neira Ayuso
2006-10-31 18:57 ` Pablo Neira Ayuso
2006-11-03 10:03 ` Patrick McHardy [this message]
2006-11-05 14:32 ` Pablo Neira Ayuso
2006-11-05 16:45 ` Patrick McHardy
2006-11-07 19:24 ` Harald Welte
[not found] ` <20061107192458.GJ4423@(none)>
2006-11-08 19:44 ` Pablo Neira Ayuso
2006-11-10 19:07 ` Pablo Neira Ayuso
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=454B13D7.4070006@trash.net \
--to=kaber@trash.net \
--cc=eric@inl.fr \
--cc=laforge@netfilter.org \
--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.