All of lore.kernel.org
 help / color / mirror / Atom feed
* nfnetlink_queue: which userspace library?
@ 2010-04-27 17:48 David F
  2010-04-28  7:59 ` Eric Leblond
  0 siblings, 1 reply; 3+ messages in thread
From: David F @ 2010-04-27 17:48 UTC (permalink / raw)
  To: netfilter

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-29  3:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 17:48 nfnetlink_queue: which userspace library? David F
2010-04-28  7:59 ` Eric Leblond
2010-04-29  3:21   ` David F

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.