From: Phil Sutter Date: Thu, 2 Jun 2022 09:16:38 +0000 (+0200) Subject: libxtables: Define XT_OPTION_OFFSET_SCALE in xtables.h X-Git-Tag: v1.8.9~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c92bb9ba69cf4bec53b3f063f5b42284e2e28d9;p=thirdparty%2Fiptables.git libxtables: Define XT_OPTION_OFFSET_SCALE in xtables.h This is the last symbol in xshared.h used by libxtables, move it over. Again, treat this as "implementation detail" and hence put it behind XTABLES_INTERNAL-curtains. Signed-off-by: Phil Sutter --- diff --git a/include/xtables.h b/include/xtables.h index b8d8372d..9eba4f61 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -687,6 +687,9 @@ struct xtables_afinfo { extern const struct xtables_afinfo *afinfo; +/* base offset of merged extensions' consecutive options */ +#define XT_OPTION_OFFSET_SCALE 256 + #endif /* XTABLES_INTERNAL */ #ifdef __cplusplus diff --git a/iptables/xshared.h b/iptables/xshared.h index 1fdc760a..1a019a7c 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -132,10 +132,6 @@ struct subcommand { mainfunc_t main; }; -enum { - XT_OPTION_OFFSET_SCALE = 256, -}; - extern int subcmd_main(int, char **, const struct subcommand *); extern void xs_init_target(struct xtables_target *); extern void xs_init_match(struct xtables_match *); diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 0638f927..dc645162 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -64,7 +64,6 @@ #endif #include #include "iptables/internal.h" -#include "xshared.h" #define NPROTO 255 diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c index 9d3ac5c8..8174a560 100644 --- a/libxtables/xtoptions.c +++ b/libxtables/xtoptions.c @@ -21,7 +21,6 @@ #include #include #include "xtables.h" -#include "xshared.h" #ifndef IPTOS_NORMALSVC # define IPTOS_NORMALSVC 0 #endif