netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* checkentry function
@ 2010-10-02 11:59 Nicola Padovano
  2010-10-05  5:46 ` Stephen Hemminger
  0 siblings, 1 reply; 11+ messages in thread
From: Nicola Padovano @ 2010-10-02 11:59 UTC (permalink / raw)
  To: netfilter-devel, netdev

Hello there.
I've written checkentry function to check my new target, in this way:

[CHECK_ENTRY_CODE]
static bool xt_tarpit_check(const char *tablename, const void *entry,
                            const struct xt_target *target, void *targinfo,
                            unsigned int hook_mask)
{
 if (strcmp(tablename, "filter"))   {
    printk(KERN_INFO "DEBUG: the tablename (not FILTER) is %s\n",tablename);
    return false;
  }
return true;
}
[/CHECK_ENTRY_CODE]

but it doesn't work.
In fact if I do:

iptables -A INPUT -t filter -s 192.168.0.1 -p tcp -j TAR

the printk prints this message: DEBUG: the tablename (not FILTER) is: �%H �

so: in the tablename i haven't the string "filter"...what' the matter?

-- 
Nicola Padovano
e-mail: nicola.padovano@gmail.com
web: http://npadovano.altervista.org

"My only ambition is not be anything at all; it seems the most
sensible thing" (C. Bukowski)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-10-05 12:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-02 11:59 checkentry function Nicola Padovano
2010-10-05  5:46 ` Stephen Hemminger
2010-10-05  5:52   ` Nicola Padovano
2010-10-05  6:01     ` Stephen Hemminger
2010-10-05  6:11       ` Nicola Padovano
2010-10-05  6:23         ` Eric Dumazet
2010-10-05 11:16           ` Nicola Padovano
2010-10-05 11:32             ` Jan Engelhardt
2010-10-05 11:46               ` Nicola Padovano
2010-10-05 12:03                 ` Jan Engelhardt
2010-10-05 12:07                 ` Eric Dumazet

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).