This series populates xshared.c with more code for use by both nft and legacy variants. A prerequisite for this is to change how output separating whitespace is printed (the old space before or after arg issue). Patch 2 does this and paves the way for patches 3-8. Patches 9 and 10 finish with a bit of cleanup. Phil Sutter (10): xshared: Merge and share parse_chain() nft: Change whitespace printing in save_rule callback xshared: Share print_iface() function xshared: Share save_rule_details() with legacy xshared: Share save_ipv{4,6}_addr() with legacy xshared: Share print_rule_details() with legacy xshared: Share print_fragment() with legacy xshared: Share print_header() with legacy iptables nft-shared: Drop unused function print_proto() xshared: Make load_proto() static iptables/ip6tables.c | 197 ++++------------------------------- iptables/iptables.c | 210 ++++---------------------------------- iptables/nft-arp.c | 8 +- iptables/nft-bridge.c | 12 ++- iptables/nft-ipv4.c | 75 ++------------ iptables/nft-ipv6.c | 37 ++----- iptables/nft-shared.c | 155 ++-------------------------- iptables/nft-shared.h | 18 +--- iptables/nft.c | 10 +- iptables/xshared.c | 231 +++++++++++++++++++++++++++++++++++++++++- iptables/xshared.h | 22 +++- iptables/xtables.c | 9 +- 12 files changed, 337 insertions(+), 647 deletions(-) -- 2.33.0