[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200818224553.71bfa4ee@hermes.lan>
Date: Tue, 18 Aug 2020 22:45:53 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Wei Wang <weiwan@...gle.com>
Cc: netdev@...r.kernel.org, Mahesh Bandewar <maheshb@...gle.com>
Subject: Re: [PATCH iproute2-next] iproute2: ss: add support to expose
various inet sockopts
On Tue, 18 Aug 2020 16:17:19 -0700
Wei Wang <weiwan@...gle.com> wrote:
> + if (!oneline)
> + out("\n\tinet-sockopt: (");
> + else
> + out(" inet-sockopt: (");
> + out("recverr: %d, ", sockopt->recverr);
> + out("is_icsk: %d, ", sockopt->is_icsk);
> + out("freebind: %d, ", sockopt->freebind);
> + out("hdrincl: %d, ", sockopt->hdrincl);
> + out("mc_loop: %d, ", sockopt->mc_loop);
> + out("transparent: %d, ", sockopt->transparent);
> + out("mc_all: %d, ", sockopt->mc_all);
> + out("nodefrag: %d, ", sockopt->nodefrag);
> + out("bind_addr_no_port: %d, ", sockopt->bind_address_no_port);
> + out("recverr_rfc4884: %d, ", sockopt->recverr_rfc4884);
> + out("defer_connect: %d", sockopt->defer_connect);
Since these are all boolean options why not just print them only if on?
That saves space and makes more compact output.
if (sockopt->recverr) out("recverr, ");
Powered by blists - more mailing lists