netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/4] JSON (and color) support for iproute
@ 2018-02-08 16:26 Stephen Hemminger
  2018-02-08 16:26 ` [PATCH iproute2-next 1/4] json: make pretty printing optional Stephen Hemminger
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Stephen Hemminger @ 2018-02-08 16:26 UTC (permalink / raw)
  To: dsahern; +Cc: netdev, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

This set of patches adds JSON output to route printing.
Tested for the simple cases, but there are many variations and there
such as lw tunnels which have not be tested.

The color formatting may need some additional tweaks. It looks
like for some tags the tag is also showing up in color.
This should be fixed in print_color_string rather than having
to do special case handling in so many places.

This patchset also changes the default JSON output to be compressed
(since the purpose of JSON is to make output machine readable);
but do optional pretty print formatting with -p flag.

Stephen Hemminger (4):
  json: make pretty printing optional
  man: add documentation for json and pretty flags
  json: fix newline at end of array
  iproute: implement JSON and color output

 include/json_print.h  |   2 +
 include/utils.h       |   5 +
 ip/ip.c               |   7 +-
 ip/iproute.c          | 376 +++++++++++++++++++++++++++++++++++---------------
 ip/iproute_lwtunnel.c | 129 ++++++++++-------
 lib/json_print.c      |   5 +-
 lib/json_writer.c     |   5 +
 man/man8/ip.8         |  18 ++-
 man/man8/tc.8         |   3 +-
 tc/tc.c               |   3 +
 10 files changed, 381 insertions(+), 172 deletions(-)

-- 
2.15.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-10 16:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 16:26 [PATCH iproute2-next 0/4] JSON (and color) support for iproute Stephen Hemminger
2018-02-08 16:26 ` [PATCH iproute2-next 1/4] json: make pretty printing optional Stephen Hemminger
2018-02-08 16:26 ` [PATCH iproute2-next 2/4] man: add documentation for json and pretty flags Stephen Hemminger
2018-02-08 16:26 ` [PATCH iproute2-next 3/4] json: fix newline at end of array Stephen Hemminger
2018-02-08 16:26 ` [PATCH iproute2-next 4/4] iproute: implement JSON and color output Stephen Hemminger
2018-02-10 16:25 ` [PATCH iproute2-next 0/4] JSON (and color) support for iproute David Ahern

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).