Fetching multiple packets from the queue?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux