[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1010051401350.6166@obet.zrqbmnf.qr>
Date: Tue, 5 Oct 2010 14:03:23 +0200 (CEST)
From: Jan Engelhardt <jengelh@...ozas.de>
To: Nicola Padovano <nicola.padovano@...il.com>
cc: Eric Dumazet <eric.dumazet@...il.com>,
Stephen Hemminger <shemminger@...tta.com>,
netfilter-devel <netfilter-devel@...r.kernel.org>,
netdev@...r.kernel.org
Subject: Re: checkentry function
On Tuesday 2010-10-05 13:46, Nicola Padovano wrote:
>On Tue, Oct 5, 2010 at 1:32 PM, Jan Engelhardt <jengelh@...ozas.de> wrote:
>> On Tuesday 2010-10-05 13:16, Nicola Padovano wrote:
>>>>
>>>> Could you read source code of _current_ existing modules , and use
>>>> copy/paste ?
>>>>
>>>> static int hashlimit_mt_check(const struct xt_mtchk_param *par)
>>>> {
>>>> ...
>>>> }
>>>
>
>this is the whole code:
>
>[WHOLE_CODE]
>static bool xt_function_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 "!=filter %s\n",tablename);
> return false;
> }
>
> return true;
>}
And as Stephen said, the proper type for current kernels
is
(static) bool xt_function_check(const struct xt_mtchk_param *par).
If you are compiling against such, you should have gotten appropriate
warnings from gcc.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists