From: Bart De Schuymer <bdschuym@pandora.be>
To: Abhinav Srivastava <abhinavs_iitkgp@yahoo.co.in>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Locking issue
Date: Thu, 16 Aug 2007 20:53:50 +0200 [thread overview]
Message-ID: <1187290430.3005.11.camel@localhost.localdomain> (raw)
In-Reply-To: <652318.55542.qm@web7912.mail.in.yahoo.com>
Op do, 16-08-2007 te 19:27 +0100, schreef Abhinav Srivastava:
> As far as I know about ulog, it just sends the packet
> to userspace logging deamon and do not wait for its
> reply. Does ulog provide waiting/blocking feature also
> that i can use in my code?
>
> In my case, my requirement is to pass some packet
> header information to userspace tool and wait for its
> reply. During this process kernel code should block
> and wait for user response. Once it receives user
> response, it can go ahead. Like ulog, I am also using
> netlink socket for communication between kernel and
> userspace.
>
> Is there anyway I can wait inside that code and let me
> userspace tool run so that i could receive response
> from it?
The kernel code has to process the packets as fast as possible. Ebtables
is executed in a softirq and waiting for userspace isn't something you
should do then (and you can't, as you've noticed). As I already
mentioned, a scheme like iptables' QUEUE target should be what you need.
It queues the packets to userspace and userspace is then responsible for
injecting them back into the stack.
What you currently should be able to do with ebtables is use ulog to
send the packets to userspace and then let userspace send the packets to
the right interface (drop the packet in the ebtables rule).
cheers,
Bart
prev parent reply other threads:[~2007-08-16 18:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 17:54 Locking issue Abhinav Srivastava
2007-08-16 18:11 ` Bart De Schuymer
2007-08-16 18:27 ` Abhinav Srivastava
2007-08-16 18:53 ` Bart De Schuymer [this message]
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=1187290430.3005.11.camel@localhost.localdomain \
--to=bdschuym@pandora.be \
--cc=abhinavs_iitkgp@yahoo.co.in \
--cc=netfilter-devel@lists.netfilter.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).