diff options
author | Hoang Le <hoang.h.le@dektech.com.au> | 2018-06-12 09:32:29 +0700 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2018-06-13 20:45:59 -0700 |
commit | a56e0db7e892e600278fab58b917032e8c3bba5c (patch) | |
tree | 3d034a6390449da89a8f3f91e26980f99f681110 /ip/ipxfrm.c | |
parent | 1304f50a5be0ed24c92e959a9067faac10b094d7 (diff) |
tipc: JSON support for tipc link printouts
Add json output support for tipc link command
Example output:
$tipc -j -p link list
[ {
"broadcast-link": "up",
"1.1.1:bridge-1.1.104:eth0": "up",
"1.1.1:bridge-1.1.105:eth0": "up",
"1.1.1:bridge-1.1.106:eth0": "up"
} ]
--------------------
$tipc -j -p link stat show link broadcast-link
[ {
"link": "broadcast-link",
"window": 50,
"rx packets": {
"rx packets": 0,
"fragments": 0,
"fragmented": 0,
"bundles": 0,
"bundled": 0
},
"tx packets": {
"tx packets": 0,
"fragments": 0,
"fragmented": 0,
"bundles": 0,
"bundled": 0
},
"rx naks": {
"rx naks": 0,
"defs": 0,
"dups": 0
},
"tx naks": {
"tx naks": 0,
"acks": 0,
"retrans": 0
},
"congestion link": 0,
"send queue max": 0,
"avg": 0
} ]
v2:
Replace variable 'json_flag' by 'json' declared in include/utils.h
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>
Diffstat (limited to 'ip/ipxfrm.c')
0 files changed, 0 insertions, 0 deletions