]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tipc: JSON support for showing nametable
authorHoang Le <hoang.h.le@dektech.com.au>
Tue, 12 Jun 2018 02:32:28 +0000 (09:32 +0700)
committerDavid Ahern <dsahern@gmail.com>
Thu, 14 Jun 2018 03:45:38 +0000 (20:45 -0700)
commit1304f50a5be0ed24c92e959a9067faac10b094d7
tree50ec96bc2d885c5f700ea3a63d1533ca09734884
parentee095a417e353917fe1213f39e4e441036afc6ec
tipc: JSON support for showing nametable

Add json output support for nametable show

Example output:
$tipc -j -p nametable show

[ {
        "type": 0,
        "lower": 16781313,
        "upper": 16781313,
        "scope": "zone",
        "port": 0,
        "node": ""
    },{
        "type": 0,
        "lower": 16781416,
        "upper": 16781416,
        "scope": "cluster",
        "port": 0,
        "node": ""
    } ]

v2:
    Replace variable 'json_flag' by 'json' declared in include/utils.h
    Add new parameter '-pretty' to support pretty output

v3:
    Update manual page

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David Ahern <dsahern@gmail.com>
man/man8/tipc-nametable.8
man/man8/tipc.8
tipc/nametable.c
tipc/tipc.c