From: Rieker Flaik <rieker_flaik@arcor.de>
To: netfilter-devel@vger.kernel.org
Subject: add packet filter rule from within kernel module
Date: Sat, 29 Oct 2011 16:23:47 +0200 [thread overview]
Message-ID: <1319898227.3314.45.camel@lovely> (raw)
Hi,
I have "homebrewed" a small usb-device with LEDs, a button and its
kernel-module. It is just for me and my educational purpose.
What I would like to achieve:
If button is triggered: The "kernel-netfilter-equivalent"
of 'iptables -A INPUT -p tcp -j DROP' should get called from within the
kernel by my module.
So that there would be no need for a detour to userspace by e.g the
input system which feeds an input-daemon which then would call some
iptables control script.
Could you please give me a hint in the right direction which function I
could use, should use or should not use? Some docu, example or similar
module would be certainly great too :)
Thanks,
Rik
reply other threads:[~2011-10-29 14:16 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=1319898227.3314.45.camel@lovely \
--to=rieker_flaik@arcor.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.