Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Wei Wang <weiwan@google.com>
Cc: netdev@vger.kernel.org, Mahesh Bandewar <maheshb@google.com>
Subject: Re: [PATCH iproute2-next] iproute2: ss: add support to expose various inet sockopts
Date: Tue, 18 Aug 2020 22:45:53 -0700 [thread overview]
Message-ID: <20200818224553.71bfa4ee@hermes.lan> (raw)
In-Reply-To: <20200818231719.1813482-1-weiwan@google.com>
On Tue, 18 Aug 2020 16:17:19 -0700
Wei Wang <weiwan@google.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, ");
next prev parent reply other threads:[~2020-08-19 5:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 23:17 Wei Wang
2020-08-19 5:45 ` Stephen Hemminger [this message]
2020-08-19 16:20 ` Wei Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200818224553.71bfa4ee@hermes.lan \
--to=stephen@networkplumber.org \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
--cc=weiwan@google.com \
--subject='Re: [PATCH iproute2-next] iproute2: ss: add support to expose various inet sockopts' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).