diff options
author | Phil Sutter <phil@nwl.cc> | 2019-10-25 17:21:13 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2019-10-30 10:01:09 +0100 |
commit | d960a991350ca429e029a76fbccfff8f9ac37be3 (patch) | |
tree | 960493f5a24488afbeb1344c4486a7bd394e0144 /iptables/xshared.h | |
parent | 56fe510492bc2b95d84f7ab81a994b459076b7d1 (diff) |
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 <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r-- | iptables/xshared.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 { |