Re: iptables version defines

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

 





On Fri, 30 May 2008, Thomas Jarosch wrote:

Hello netfilter coreteam,

I'm currently looking for a way to support ipt_ACCOUNT
both for iptables 1.4.0 and iptables 1.4.1. Some function
names changed (addr_to_dotted() -> ipaddr_to_numeric())
and it would be easy to #ifdef around them.

The linux kernel provides multiple defines for its version number,
while iptables only supports a char* version string.

Would it make sense to add something like the kernel version defines
so one could write code like this:

#if IPTABLES_VERSION_CODE < IPTABLES_VERSION(1,4,1)
	abc
#else
	xyz
#endif

#ifdef _XTABLES_H
init(struct xt_entry_target *t)
#else
init(struct ipt_entry_target *t, unsigned int *nfcache)
#endif

Best regards,

				Krzysztof Olędzki

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

  Powered by Linux