Linux Netfilter development
 help / color / mirror / Atom feed
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
To: netfilter-devel@vger.kernel.org
Subject: iptables version defines
Date: Fri, 30 May 2008 10:16:02 +0200	[thread overview]
Message-ID: <200805301016.03130.thomas.jarosch@intra2net.com> (raw)

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

?

Another solution would be to have an "iptables" and "iptables-1.4.1"
directory in the pom archive, though I don't know if that is supported.
(and would lead to code duplication.)

Thanks,
Thomas

             reply	other threads:[~2008-05-30  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30  8:16 Thomas Jarosch [this message]
2008-05-30  9:41 ` iptables version defines Krzysztof Oledzki
2008-05-30  9:56   ` Krzysztof Oledzki
2008-05-30 10:06     ` Thomas Jarosch
2008-05-30 10:53       ` Jan Engelhardt
2008-06-01 21:13         ` Patrick McHardy
     [not found]           ` <200806021545.23690.thomas.jarosch@intra2net.com>
2008-06-02 13:50             ` [patch] " Patrick McHardy
2008-05-30 10:05   ` Krzysztof Oledzki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805301016.03130.thomas.jarosch@intra2net.com \
    --to=thomas.jarosch@intra2net.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox