linux-stable/tools/bpf/bpftool
Quentin Monnet 831a0aafe5 tools: bpftool: add JSON output for bpftool map * commands
Reuse the json_writer API introduced in an earlier commit to make
bpftool able to generate JSON output on
`bpftool map { show | dump | lookup | getnext }` commands. Remaining
commands produce no output.

Some functions have been spit into plain-output and JSON versions in
order to remain readable.

Outputs for sample maps have been successfully tested against a JSON
validator.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-24 01:25:09 +01:00
..
Documentation tools: bpftool: add option parsing to bpftool, --help and --version 2017-10-24 01:25:08 +01:00
common.c tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
jit_disasm.c tools: bpftool: add JSON output for bpftool prog dump jited * command 2017-10-24 01:25:08 +01:00
json_writer.c tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
json_writer.h tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
main.c tools: bpftool: introduce --json and --pretty options 2017-10-24 01:25:08 +01:00
main.h tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00
Makefile tools: bpftool: use the kernel's instruction printer 2017-10-10 12:30:16 -07:00
map.c tools: bpftool: add JSON output for bpftool map * commands 2017-10-24 01:25:09 +01:00
prog.c tools: bpftool: add JSON output for bpftool prog dump xlated * command 2017-10-24 01:25:08 +01:00