From: Mistick Levi <gmistick@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: libnetfilter-queue and the Callback
Date: Tue, 19 Oct 2010 19:31:54 +0200 [thread overview]
Message-ID: <AANLkTim6E5h=sQHiQj=ORscPnpbaJbyt6A8-PgqSmTzV@mail.gmail.com> (raw)
Hi,
a quick question.
when i register a queue ( create_queue) i specify the callback, then i
need a loop that will use the fd (socket) and recv the packets from
the queue...
if so,
1. why do i need to call "handle_packet", what is the process that
happens ? ( For example: why can't i just process the buffer as is and
return a verdict).
or,
2. why if i register a callback, i also need to be the one that
"executing" that callback, and not be called by the netfilter hook
QUEUE ?
3. In the callback i need to return - lower than 0 to "stop
processing" else, it will continue processing. What does this
processing mean? since most example's show only the "return
set_verdict", though i don't have to return a verdict at that point. (
So what does the cb return value is used for ? )
4. If i return "stop processing " in the callback, will the packet
drop? or what?...
5. Set verdict is the function that actually reinject the packet and
continue it's process . right?
Kind regards
Yechiel Levi
reply other threads:[~2010-10-19 17:32 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='AANLkTim6E5h=sQHiQj=ORscPnpbaJbyt6A8-PgqSmTzV@mail.gmail.com' \
--to=gmistick@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).