From 7a548b32d9ad8d6e4a8398573d4fa8c4e4a1f9e0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 7 Feb 2011 00:00:42 +0100 Subject: src: share iptables_command_state across the two programs struct iptables_command_state and quite a bit of the code looks worthy of deduplication. Signed-off-by: Jan Engelhardt --- xshared.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'xshared.h') diff --git a/xshared.h b/xshared.h index e5b2a02b..4a7f96fc 100644 --- a/xshared.h +++ b/xshared.h @@ -1,9 +1,27 @@ #ifndef IPTABLES_XSHARED_H #define IPTABLES_XSHARED_H 1 +#include +#include + struct xtables_rule_match; struct xtables_target; +struct iptables_command_state { + union { + struct ipt_entry fw; + struct ip6t_entry fw6; + }; + int invert; + int c; + unsigned int options; + struct xtables_rule_match *matches; + struct xtables_target *target; + char *protocol; + int proto_used; + char **argv; +}; + enum { XT_OPTION_OFFSET_SCALE = 256, }; -- cgit v1.2.3