]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: Define XT_OPTION_OFFSET_SCALE in xtables.h
authorPhil Sutter <phil@nwl.cc>
Thu, 2 Jun 2022 09:16:38 +0000 (11:16 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 23 Jun 2022 12:22:22 +0000 (14:22 +0200)
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 <phil@nwl.cc>
include/xtables.h
iptables/xshared.h
libxtables/xtables.c
libxtables/xtoptions.c

index b8d8372d0e4989a4efeff8940370e7c42448ec2b..9eba4f619d35183f049d1b0e19a65e459b22e3ce 100644 (file)
@@ -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
index 1fdc760a32442544d70fceb26bf8a97a4b9b130d..1a019a7c0488240c9af86dcb09b17b94b95ed746 100644 (file)
@@ -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 *);
index 0638f9271c601a6c677a1d786aceafa537ca8dfd..dc645162973f073d3d0347515a7eb5f54b110014 100644 (file)
@@ -64,7 +64,6 @@
 #endif
 #include <getopt.h>
 #include "iptables/internal.h"
-#include "xshared.h"
 
 #define NPROTO 255
 
index 9d3ac5c8066cb3c26fa2c34d368372fde064c805..8174a560ec4df8a3f227affa48a74b221312df36 100644 (file)
@@ -21,7 +21,6 @@
 #include <arpa/inet.h>
 #include <netinet/ip.h>
 #include "xtables.h"
-#include "xshared.h"
 #ifndef IPTOS_NORMALSVC
 #      define IPTOS_NORMALSVC 0
 #endif