All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dsahern@gmail.com
Cc: netdev@vger.kernel.org,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC iproute2-next 15/16] man: add documentation for json and pretty flags
Date: Thu,  1 Feb 2018 17:19:45 -0800	[thread overview]
Message-ID: <20180202011946.21929-16-sthemmin@microsoft.com> (raw)
In-Reply-To: <20180202011946.21929-1-sthemmin@microsoft.com>

New options were added without documentation or usage.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/ip.c       |  4 ++--
 man/man8/ip.8 | 18 ++++++++++++++----
 man/man8/tc.8 |  3 ++-
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/ip/ip.c b/ip/ip.c
index a6611292808d..233a9d772492 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -54,12 +54,12 @@ static void usage(void)
 "                   netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
 "                   vrf | sr }\n"
 "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
-"                    -h[uman-readable] | -iec |\n"
+"                    -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
 "                    -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |\n"
 "                    -4 | -6 | -I | -D | -B | -0 |\n"
 "                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
 "                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
-"                    -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
+"                    -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}\n");
 	exit(-1);
 }
 
diff --git a/man/man8/ip.8 b/man/man8/ip.8
index 7f26582db795..0087d18b7470 100644
--- a/man/man8/ip.8
+++ b/man/man8/ip.8
@@ -48,9 +48,10 @@ ip \- show / manipulate routing, network devices, interfaces and tunnels
 \fB\-ts\fR[\fIhort\fR] |
 \fB\-n\fR[\fIetns\fR] name |
 \fB\-a\fR[\fIll\fR] |
-\fB\-c\fR[\fIolor\fR]
-\fB\-br\fR[\fIief\fR] }
-
+\fB\-c\fR[\fIolor\fR] |
+\fB\-br\fR[\fIief\fR] |
+\fB\-j\fR[son\fR] |
+\fB\-p\fR[retty\fR] }
 
 .SH OPTIONS
 
@@ -208,10 +209,19 @@ Set the netlink socket receive buffer size, defaults to 1MB.
 print human readable rates in IEC units (e.g. 1Ki = 1024).
 
 .TP
-.BR "\-br" , "\-brief"
+.BR "\-br" , " \-brief"
 Print only basic information in a tabular format for better readability. This option is currently only supported by
 .BR "ip addr show " and " ip link show " commands.
 
+.TP
+.BR "\-j", " \-json"
+Output results in JavaScript Object Notation (JSON).
+
+.TP
+.BR "\-p", " \-pretty"
+The default JSON format is compact and more efficient to parse but hard for most users to read.
+This flag adds indentation for readability.
+
 .SH IP - COMMAND SYNTAX
 
 .SS
diff --git a/man/man8/tc.8 b/man/man8/tc.8
index 5ffea373d18b..a58f46542340 100644
--- a/man/man8/tc.8
+++ b/man/man8/tc.8
@@ -670,7 +670,8 @@ output raw hex values for handles.
 
 .TP
 .BR "\-p", " \-pretty"
-decode filter offset and mask values to equivalent filter commands based on TCP/IP.
+for u32 filter, decode offset and mask values to equivalent filter commands based on TCP/IP.
+In JSON output, add whitespace to improve readability.
 
 .TP
 .BR "\-iec"
-- 
2.15.1

  parent reply	other threads:[~2018-02-02  1:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  1:19 [RFC iproute2-next 00/16] iproute printing enhancements Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 01/16] iproute: refactor printing flags Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 02/16] iproute: make printing icmpv6 a function Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 03/16] iproute: make printing IPv4 cache flags " Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 04/16] iproute: refactor cacheinfo printing Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 05/16] iproute: refactor metrics print Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 06/16] iproute: refactor printing flow info Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 07/16] iproute2: refactor newdst, gateway and via printing Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 08/16] iproute: refactor multipath print Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 09/16] iproute: refactor printing of interface Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 10/16] iproute: whitespace fixes Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 11/16] iproute: don't do assignment in condition Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 12/16] iproute: make flush a separate function Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 13/16] iproute: implement JSON and color output Stephen Hemminger
2018-02-02  1:19 ` [RFC iproute2-next 14/16] json: make pretty printing optional Stephen Hemminger
2018-02-02  1:19 ` Stephen Hemminger [this message]
2018-02-02  1:19 ` [RFC iproute2-next 16/16] json: fix newline at end of array Stephen Hemminger
2018-02-02  2:59 ` [RFC iproute2-next 00/16] iproute printing enhancements David Ahern
2018-02-02  3:08 ` David Ahern
2018-02-02 22:24   ` Stephen Hemminger

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=20180202011946.21929-16-sthemmin@microsoft.com \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.