Re: checkentry function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 2010-10-05 13:46, Nicola Padovano wrote:
>On Tue, Oct 5, 2010 at 1:32 PM, Jan Engelhardt <jengelh@xxxxxxxxxx> 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 netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux