aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorQuentin Monnet <[email protected]>2017-10-23 16:24:08 +0000
committerDavid S. Miller <[email protected]>2017-10-24 00:25:08 +0000
commit743cc665d5f62d2c75eceb59c461e653ad6ea58c (patch)
tree1977c8d47d0674d8d1601bdc4a0252a3ab0a4936 /tools/bpf/bpftool/common.c
parenttools: bpftool: introduce --json and --pretty options (diff)
downloadkernel-743cc665d5f62d2c75eceb59c461e653ad6ea58c.tar.gz
kernel-743cc665d5f62d2c75eceb59c461e653ad6ea58c.zip
tools: bpftool: add JSON output for `bpftool prog show *` command
Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool prog show *` commands. For readability, the code from show_prog() has been split into two functions, one for plain output, one for JSON. Outputs from sample programs have been successfully tested against a JSON validator. Signed-off-by: Quentin Monnet <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/common.c')
0 files changed, 0 insertions, 0 deletions