All of lore.kernel.org
 help / color / mirror / Atom feed
From: David F <netfilter@meta-dynamic.com>
To: netfilter <netfilter-devel@vger.kernel.org>
Subject: nfnetlink_queue: which userspace library?
Date: Tue, 27 Apr 2010 13:48:39 -0400	[thread overview]
Message-ID: <4BD72377.8070400@meta-dynamic.com> (raw)

Hi,

I want to do some packet manipulation that seems beyond the scope of 
what can be done directly by existing iptables modules (ipv4 options 
mangling), so I'd like to queue the packets in question for userspace, 
for easy experimentation and development.

After a fair bit of googling, it seems to me that the most common and 
well-documented way to do this is via the QUEUE target and libipq.  But 
numerous references indicate that QUEUE and libipq are deprecated and 
NFQUEUE/nfnetlink_queue is the preferred method.  Setting up the 
iptables looks straightforward, but then how to receive/return them on 
the userspace side?  Aside from libipq, it seems that there are 3 
alternatives:

* libnetfilter_queue http://www.netfilter.org/projects/libnetfilter_queue/
* libnl and its "queue" group of functions 
http://www.infradead.org/~tgr/libnl/doc/group__queue.html 
<http://www.infradead.org/%7Etgr/libnl/doc/group__queue.html>
* Code your own using netlink sockets directly, and 
<linux/netfilter/nfnetlink_queue.h>.

None of these seem to have great documentation or example programs, 
although I have found a few resources.  So I'm wondering if anyone can 
give me a little direction as to what are the differences, which would 
be the best option, and why there seems to be a duplication between 
libnl and libnetfilter.  Is libipq truly deprecated?  I would prefer not 
to code into a "dead end" and eventually end up re-coding for a 
different library.

Thanks,
David F


             reply	other threads:[~2010-04-27 17:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 17:48 David F [this message]
2010-04-28  7:59 ` nfnetlink_queue: which userspace library? Eric Leblond
2010-04-29  3:21   ` David F

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=4BD72377.8070400@meta-dynamic.com \
    --to=netfilter@meta-dynamic.com \
    --cc=netfilter-devel@vger.kernel.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.