For the missing JSON debug print a generic JSON print interface is proposed. A specific nla_policy is describing (a) the key name of the entry and (b) the corresponding callback function for printing the value. If the netlink attribute is not at disposal no entry for that will be printed.
This patch reffering to following patches:
[1] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-... [2] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-... [3] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-... [4] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-... [5] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-... [6] https://lists.open-mesh.org/mailman3/hyperkitty/list/b.a.t.m.a.n@lists.open-...
Alexander Sarmanow (2): batctl: netlink: Make netlink_query_common non-static batctl: genl_json: Add generic JSON interface
Makefile | 1 + genl_json.c | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++++ genl_json.h | 24 ++++ netlink.c | 12 +- netlink.h | 14 ++ 5 files changed, 402 insertions(+), 8 deletions(-) create mode 100644 genl_json.c create mode 100644 genl_json.h