From: Justin Yaple <yaplej@gmail.com>
To: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Fetching multiple packets from the queue?
Date: Fri, 16 Apr 2010 10:07:20 -0700 [thread overview]
Message-ID: <o2o8363055a1004161007k841dc4aehe26c1139d02b1fca@mail.gmail.com> (raw)
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.
reply other threads:[~2010-04-16 17:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=o2o8363055a1004161007k841dc4aehe26c1139d02b1fca@mail.gmail.com \
--to=yaplej@gmail.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 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).