How can I get these packets in the user space application?

Henrik Nordstrom hno at
Thu Dec 9 17:59:22 CET 2004

On Thu, 9 Dec 2004, Srinivas G. wrote:

> Actually I need to send the packets to user space and then in the user
> space I need to do some calculations on the packet data and then I want
> to send the packet back to kernel space.

Perfect fit for QUEUE.

> I understood that queue the packet for user space handling. Finally we
> can issue 'nf_reinject' to send the packet into the network path again.

ip_queue manages all of this automatically for you. See libipq in the 
iptables package for how to write user-space side of things.

Unless you have very special demands you should not need to make any 
kernel changes, just use iptables as usual and send what you want to 
process in userspace to -j QUEUE


More information about the netfilter-devel mailing list