From d960a991350ca429e029a76fbccfff8f9ac37be3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 25 Oct 2019 17:21:13 +0200 Subject: xtables-arp: Integrate OPT_* defines into xshared.h These defines are internal use only, so their actual value doesn't matter as long as they're unique and inverse_for_options array items match: When negating a given option, the corresponding OPT_* value's bit is used as an index into inverse_for_options to retrieve the corresponding invflag. If zero, either negating or the option itself is not supported. (In practice, a lookup for unsupported option won't happen as those are caught by getopt_long()). Since xtables-arp's OPT_* values change, adjust the local inverse_for_options array accordingly. Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- iptables/xshared.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'iptables/xshared.h') diff --git a/iptables/xshared.h b/iptables/xshared.h index b0738b04..490b19ad 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -29,6 +29,13 @@ enum { OPT_VIANAMEOUT = 1 << 8, OPT_LINENUMBERS = 1 << 9, OPT_COUNTERS = 1 << 10, + /* below are for arptables only */ + OPT_S_MAC = 1 << 11, + OPT_D_MAC = 1 << 12, + OPT_H_LENGTH = 1 << 13, + OPT_OPCODE = 1 << 14, + OPT_H_TYPE = 1 << 15, + OPT_P_TYPE = 1 << 16, }; enum { -- cgit v1.2.3