netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fetching multiple packets from the queue?
@ 2010-04-16 17:07 Justin Yaple
  0 siblings, 0 replies; only message in thread
From: Justin Yaple @ 2010-04-16 17:07 UTC (permalink / raw)
  To: netfilter-devel

Hello,

Iv been trying to figure out how to fetch multiple packets from the
queue, and am not clear where, or what buffer I need to copy before
fetching the next packet from the queue.

Should I copy the contents of the buf[] each time I run recv(), or
should I make a copy from the callback function?  The callback
function its only passed a couple of pointers so I am not sure what
data I should copy.  From the callback I could copy the packet using
nfq_get_payload() to a new buffer, and save the id, and *hq.  Those
are the only parameters required to use nfq_set_verdict(), but I would
lose the ability to use the other functions like nfq_get_packet_hw(),
and the rest.

Should I just make copies of that data I need from the callback, and
then get the next packet?

Thank you.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-16 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16 17:07 Fetching multiple packets from the queue? Justin Yaple

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).