]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - rdma/rdma.h
rdma: Rewrite custom JSON and prints logic to use common API
[mirror_iproute2.git] / rdma / rdma.h
index 23157743b27c88426065fcfd3424fc91f5cf04ee..735b1bf7c9f667fa2ad74e3ee5c676b323418655 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "list.h"
 #include "utils.h"
-#include "json_writer.h"
+#include "json_print.h"
 
 #define pr_err(args...) fprintf(stderr, ##args)
 #define pr_out(args...) fprintf(stdout, ##args)
@@ -66,8 +66,8 @@ struct rd {
        struct nlmsghdr *nlh;
        char *buff;
        json_writer_t *jw;
-       bool json_output;
-       bool pretty_output;
+       int json_output;
+       int pretty_output;
        bool suppress_errors;
        struct list_head filter_list;
        char *link_name;
@@ -136,6 +136,7 @@ int rd_attr_check(const struct nlattr *attr, int *typep);
 void print_driver_table(struct rd *rd, struct nlattr *tb);
 void newline(struct rd *rd);
 void newline_indent(struct rd *rd);
+void print_on_off(struct rd *rd, const char *key_str, bool on);
 #define MAX_LINE_LENGTH 80
 
 #endif /* _RDMA_TOOL_H_ */