netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>,
	netfilter-devel@lists.netfilter.org,
	Patrick McHardy <kaber@trash.net>,
	Vincent Deffontaines <vincent@inl.fr>
Subject: Re: [RFC] libnfnetlink and iface conversion to string
Date: Tue, 09 Jan 2007 03:50:26 +0100	[thread overview]
Message-ID: <1168311026.12298.28.camel@localhost> (raw)
In-Reply-To: <45A2E78A.8090402@netfilter.org>

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

Hi,

Le mardi 09 janvier 2007 à 01:53 +0100, Pablo Neira Ayuso a écrit :
> Eric Leblond wrote:
> > It is not correct to do a dump (and send a netlink message) for each
> > ifindex resolution. Thus, libnfnetlink needs to listen to netlink
> > interfaces message. A permanent "task" is thus needed to have the job
> > done : It can be a dedicated thread or a carefully hidden select.
> /* create a table ifindex to interface */
> struct nfnl_ifindex2name_table *nfnl_ifindex2name_open();
> /* destroy table */
> void nfnl_ifindex2name_close(struct nfnl_ifindex2name_table *);
> 
> /* returns a socket descriptor to listen to interface events */
> int nfnl_ifindex2name_events_open();

Speaking as NuFW's developper and thus libnetfilter_queue user, this
clearly mean that I need to modify select part of my code, not just add
some functions calls. It forces the developper to use directly
libnfnetlink. This goes against my way to see libnetfilter_queue and
other libnetfilter* libraries.

> /* process data available for the socket and update the table */
> int nfnl_ifindex2name_process_event(int, struct nfnl_ifindex2name_table *);
> /* close socket */
> void nfnl_ifindex2name_events_close(int); /* close the socket */
> 
> Another alternative could be the use of libnl, although this introduces
> a new library dependency for every libnetfilter_queue application.

I think that ifname resolution is necessary for an application if it is
a linked with wanted features. If it has to use it, application can link
to libnl (or something else) and have it done. If it don't need it then
libnetfilter_queue is enough.

route netlink message is not a part of Netfilter, we should'nt use it in
Netfilter code if it is not transparent :
      * It duplicates code
      * It changes the "spirit" of libnetfilter* libraries

BR,
-- 
Eric Leblond <eric@inl.fr>
INL

[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-01-09  2:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-27 22:17 [RFC] libnfnetlink and iface conversion to string Eric Leblond
2006-12-28 17:39 ` Pablo Neira Ayuso
2006-12-28 23:40   ` Eric Leblond
2007-01-02  8:46     ` [Patch 1/2] Resend : sending iface name from nfnetlink_queue Eric Leblond
2007-01-10  6:52       ` Patrick McHardy
2007-01-02  8:48     ` [Patch 2/2] getting iface name from libnetfilter_queue Eric Leblond
2007-01-07 14:26     ` [RFC] libnfnetlink and iface conversion to string Harald Welte
2007-01-08 22:41       ` Eric Leblond
2007-01-09  0:53         ` Pablo Neira Ayuso
2007-01-09  2:50           ` Eric Leblond [this message]
2007-01-09 11:51         ` Harald Welte
2007-01-18 23:24           ` [Patch 0/2] " Eric Leblond
2007-01-18 23:30             ` [Patch 1/2] libnfnetlink, " Eric Leblond
2007-01-19 15:22               ` Patrick McHardy
2007-01-19 17:38                 ` Pablo Neira Ayuso
2007-01-19 22:46                   ` Eric Leblond
2007-01-22 12:36                   ` Harald Welte
2007-01-23 21:13                     ` Eric Leblond
2007-01-24 16:50                       ` Patrick McHardy
2007-01-25  1:46                       ` Pablo Neira Ayuso
2007-01-25 12:11                         ` Eric Leblond
2007-01-25 15:59                           ` Harald Welte
2007-01-26  2:24                             ` Pablo Neira Ayuso
2007-01-25 12:16                         ` [Patch 2/2] libnetfilter_queue, " Eric Leblond
2007-01-26  2:26                           ` Pablo Neira Ayuso
2007-01-29 10:36                             ` Eric Leblond
2007-01-31  1:49                               ` Pablo Neira Ayuso
2007-01-18 23:33             ` [Patch 2/2] libnetfilter_queue and " Eric Leblond
2007-01-19 15:25               ` Patrick McHardy
2007-01-19 16:17                 ` Resend: " Eric Leblond
2007-01-23 21:17                   ` Eric Leblond
2007-01-09 10:22   ` [RFC] libnfnetlink " 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=1168311026.12298.28.camel@localhost \
    --to=eric@inl.fr \
    --cc=kaber@trash.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@netfilter.org \
    --cc=vincent@inl.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).