lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180208162625.13727-3-sthemmin@microsoft.com>
Date:   Thu,  8 Feb 2018 08:26:23 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     dsahern@...il.com
Cc:     netdev@...r.kernel.org,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH iproute2-next 2/4] man: add documentation for json and pretty flags

From: Stephen Hemminger <stephen@...workplumber.org>

Add description for -json and -pretty options.

Signed-off-by: Stephen Hemminger <stephen@...workplumber.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ