]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/ip_common.h
ip: ip_print: add new API to print JSON or regular format output
authorJulien Fortin <julien@cumulusnetworks.com>
Thu, 17 Aug 2017 17:35:51 +0000 (10:35 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 18 Aug 2017 01:02:40 +0000 (18:02 -0700)
commit6377572f0aa83cf3a40c8de6248cc122e7350751
tree95de46c07224f6601c02277c61a942b112ee40f1
parent7252f16b2d1919b31f0a2ec094dd3516b1e33a55
ip: ip_print: add new API to print JSON or regular format output

To avoid code duplication and have a ligther impact on most of the files,
these functions were made to handle both stdout (FP context) or JSON
output. Using this api, the changes are easier to read and the code
stays as compact as possible.

includes json_writer.h in ip_common.h to make the lib/json_writer.c
functions available to the new "ip_print" api.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
ip/Makefile
ip/ip_common.h
ip/ip_print.c [new file with mode: 0644]