summaryrefslogtreecommitdiffstats
path: root/include/xtables.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'include/xtables.h.in')
-rw-r--r--include/xtables.h.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 1455e9cd..6712aac0 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -183,6 +183,15 @@ enum xtables_exittype {
XTF_ONE_ACTION,
};
+struct xtables_globals
+{
+ unsigned int option_offset;
+ char *program_version;
+ char *program_name;
+ struct option *opts;
+ void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3)));
+};
+
extern const char *xtables_program_name;
extern const char *xtables_modprobe_program;
extern struct xtables_match *xtables_matches;
@@ -195,6 +204,8 @@ extern void *xtables_malloc(size_t);
extern int xtables_insmod(const char *, const char *, bool);
extern int xtables_load_ko(const char *, bool);
+extern int xtables_set_params(struct xtables_globals *xtp);
+void xtables_free_opts(int reset_offset, struct option *original_opts);
extern struct xtables_match *xtables_find_match(const char *name,
enum xtables_tryload, struct xtables_rule_match **match);
@@ -219,8 +230,8 @@ xtables_parse_interface(const char *arg, char *vianame, unsigned char *mask);
int xtables_check_inverse(const char option[], int *invert,
int *my_optind, int argc);
-void exit_error(enum xtables_exittype, const char *, ...)
- __attribute__((noreturn, format(printf,2,3)));
+extern struct xtables_globals *xt_params;
+#define exit_error xt_params->exit_err
extern void xtables_param_act(unsigned int, const char *, ...);
extern const char *xtables_ipaddr_to_numeric(const struct in_addr *);