From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: kaber@trash.net,
Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>
Subject: Re: src: remove dependency on libiptc headers
Date: Sat, 02 Aug 2008 13:28:33 +0200 [thread overview]
Message-ID: <489444E1.8060303@netfilter.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0808010903020.31124@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> --- a/include/libiptc/libxtc.h
> +++ b/include/libiptc/libxtc.h
> @@ -20,8 +20,6 @@ extern "C" {
> #define XT_ALIGN(s) (((s) + ((XT_MIN_ALIGN)-1)) & ~((XT_MIN_ALIGN)-1))
> #endif
>
> -typedef char xt_chainlabel[32];
> -
> #define XTC_LABEL_ACCEPT "ACCEPT"
> #define XTC_LABEL_DROP "DROP"
> #define XTC_LABEL_QUEUE "QUEUE"
> diff --git a/include/xtables.h.in b/include/xtables.h.in
> index 4ce73e9..51cb67d 100644
> --- a/include/xtables.h.in
> +++ b/include/xtables.h.in
> @@ -1,11 +1,12 @@
> #ifndef _XTABLES_H
> #define _XTABLES_H
>
> +#include <sys/socket.h> /* PF_* */
> #include <sys/types.h>
> +#include <stdbool.h>
> +#include <net/if.h>
> #include <linux/types.h>
> #include <linux/netfilter/x_tables.h>
> -#include <libiptc/libxtc.h>
> -#include <stdbool.h>
>
> #ifndef IPPROTO_SCTP
> #define IPPROTO_SCTP 132
> @@ -22,12 +23,14 @@
>
> #define XTABLES_API_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
>
> +struct in_addr;
> +
> /* Include file for additions: new matches and targets. */
> struct xtables_match
> {
> struct xtables_match *next;
>
> - xt_chainlabel name;
> + const char *name;
>
> /* Revision of match (0 by default). */
> u_int8_t revision;
> @@ -83,7 +86,7 @@ struct xtables_target
> {
> struct xtables_target *next;
>
> - xt_chainlabel name;
> + const char *name;
This is breaking the ABI. You're replacing at field of 32 bytes by one
of 4 bytes.
As we discussed in your previous patch, if your intention is to export
the xtables.h file and make it a public API for other external clients,
you must understand that you should not change a single line of headers
otherwise you may end up breaking backward compatibility (compilation
and binary) for others.
BTW, about the C++ support for xtables. Would we provide support to such
external plugin here? I think that we'll end up telling that we don't
recommend C++ plugins for iptables. I think that we should remove that
support now.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-08-02 11:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-01 13:04 src: remove dependency on libiptc headers Jan Engelhardt
2008-08-02 11:28 ` Pablo Neira Ayuso [this message]
2008-08-02 11:52 ` Pablo Neira Ayuso
2008-08-02 16:24 ` Jan Engelhardt
2008-08-04 14:35 ` Pablo Neira Ayuso
2008-08-04 23:44 ` Jan Engelhardt
2008-08-05 6:58 ` Pablo Neira Ayuso
2008-08-06 9:50 ` Patrick McHardy
2008-08-04 10:48 ` Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2008-07-30 13:19 Jan Engelhardt
2008-07-30 13:45 ` Patrick McHardy
2008-07-30 13:51 ` Jan Engelhardt
2008-07-30 14:08 ` Patrick McHardy
2008-07-31 7:02 ` Pablo Neira Ayuso
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=489444E1.8060303@netfilter.org \
--to=pablo@netfilter.org \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--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