From 70581922f873a88306dd5b1cb83c5081ee239eb8 Mon Sep 17 00:00:00 2001 From: Jamal Hadi Salim Date: Fri, 13 Feb 2009 08:36:44 -0500 Subject: libxtables: consolidate merge_options into xtables_merge_options Introduce xtables_merge_options() for re-use reasons. Apps can use it instead of each defining their own merge_options(). Made iptables and ip6tables use the new shared interface. Signed-off-by: Jamal Hadi Salim --- include/xtables.h.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/xtables.h.in') diff --git a/include/xtables.h.in b/include/xtables.h.in index a884343b..aaadbbd6 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -207,6 +207,8 @@ extern int xtables_load_ko(const char *, bool); extern int xtables_set_params(struct xtables_globals *xtp); extern void xtables_set_revision(char *name, u_int8_t revision); extern void xtables_free_opts(int reset_offset); +extern struct option *xtables_merge_options(struct option *oldopts, + const struct option *newopts, unsigned int *option_offset); extern struct xtables_match *xtables_find_match(const char *name, enum xtables_tryload, struct xtables_rule_match **match); @@ -233,6 +235,8 @@ int xtables_check_inverse(const char option[], int *invert, int *my_optind, int argc); extern struct xtables_globals *xt_params; #define exit_error xt_params->exit_err +#define OPTION_OFFSET 256 + extern void xtables_param_act(unsigned int, const char *, ...); extern const char *xtables_ipaddr_to_numeric(const struct in_addr *); -- cgit v1.2.3