Re: Correct signatur for target

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

 



On Tuesday 2009-03-24 14:06, Kristian Evensen wrote:
>
>I am currently working on an xtables-targetmodule, and have come
>across a thing that puzzles me a little bit. As far as I have
>understood it, according to both the book "Writing netfilter module"
>(excellent by the way, thank you Jan and Nicolas) and my
>x_tables.h-file, the signatur for *target is:
>
>static unsigned int (*target) (struct sk_buff *skb,
>			       const struct xt_target_param *par)
>
>However, to get it working on my machine (which runs the
>2.6.28.8-kernel), the first argument had to be a double pointer for my
>module to work as intended. I though the double pointer was there for
>compatibility with older kernels. Does any know where I am wrong/what
>I have done wrong?

To make Xtables-addons's compat_xtables.ko work with all supported
kernel versions, it has to slightly deviate from the latest kernel
API and use a double-pointer. So if you write your module with the
help of the compat layer, you need to be aware of this minor
difference. I think the latest version of the e-book also mentions
this.
--
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