From: Nicola Padovano <nicola.padovano@gmail.com>
To: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: register an hook
Date: Fri, 23 Apr 2010 10:55:24 +0200 [thread overview]
Message-ID: <z2uede9a9eb1004230155oe674c584m2ca2d0b4ba3490c0@mail.gmail.com> (raw)
hi all.
i've read how to register an hook in netfilter. and i found two ways.
the first uses, this routines:
unsigned int my_hook(unsigned int hooknum,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
}
int nf_register_hook(struct nf_hook_ops *reg)
int nf_unregister_hook(struct nf_hook_ops *reg)
the second instead:
static unsigned int xt_tarpit_target(struct sk_buff *skb,
const struct xt_target_param *par)
and:
xt_register_target(&xt_tarpit_reg);
xt_unregister_target(&xt_tarpit_reg);
which is the difference?
thank you!
next reply other threads:[~2010-04-23 8:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 8:55 Nicola Padovano [this message]
2010-04-23 10:27 ` register an hook Jan Engelhardt
2010-04-23 10:50 ` Nicola Padovano
2010-04-23 12:25 ` Jan Engelhardt
2010-04-24 11:39 ` Nicola Padovano
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=z2uede9a9eb1004230155oe674c584m2ca2d0b4ba3490c0@mail.gmail.com \
--to=nicola.padovano@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).