freebsd-dev/sbin/ipfw
Andrey V. Elsukov aed0267989 Rework ipfw rules parsing and printing code.
Introduce show_state structure to keep information about printed opcodes.
Split show_static_rule() function into several smaller functions. Make
parsing and printing opcodes into several passes. Each printed opcode
is marked in show_state structure and will be skipped in next passes.
Now show_static_rule() function is simple, it just prints each part
of rule separately: action, modifiers, proto, src and dst addresses,
options. The main goal of this change is avoiding occurrence of wrong
result of `ifpw show` command, that can not be parsed by ipfw(8).
Also now it is possible to make some simple static optimizations
by reordering of opcodes in the rule.

PR:		222705
Discussed with:	melifaro
MFC after:	2 weeks
Sponsored by:	Yandex LLC
2018-03-28 12:44:28 +00:00
..
altq.c Revert r327005 - SPDX tags for license similar to BSD-2-Clause. 2017-12-20 20:25:28 +00:00
dummynet.c Revert r327005 - SPDX tags for license similar to BSD-2-Clause. 2017-12-20 20:25:28 +00:00
ipfw2.c Rework ipfw rules parsing and printing code. 2018-03-28 12:44:28 +00:00
ipfw2.h Rework ipfw rules parsing and printing code. 2018-03-28 12:44:28 +00:00
ipfw.8 Remove note that fwd tablearg is supported only by IPv4. IPv6 is 2018-03-19 10:50:27 +00:00
ipv6.c Revert r327005 - SPDX tags for license similar to BSD-2-Clause. 2017-12-20 20:25:28 +00:00
main.c Rework ipfw rules parsing and printing code. 2018-03-28 12:44:28 +00:00
Makefile Add ipfw_nat64 module that implements stateless and stateful NAT64. 2016-08-13 16:09:49 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nat64lsn.c Make statistics nat64lsn, nat64stl an nptv6 output netstat-like: 2016-08-14 13:17:55 +00:00
nat64stl.c Make statistics nat64lsn, nat64stl an nptv6 output netstat-like: 2016-08-14 13:17:55 +00:00
nat.c Revert r327005 - SPDX tags for license similar to BSD-2-Clause. 2017-12-20 20:25:28 +00:00
nptv6.c Make statistics nat64lsn, nat64stl an nptv6 output netstat-like: 2016-08-14 13:17:55 +00:00
tables.c ipfw(8): Fix endianness for Legacy and Ipv4 table hostname values 2018-03-08 17:23:18 +00:00