X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=rdma%2Frdma.h;h=a6c6bdea5a80c3461c172d2e88844caa11323cd2;hb=db6d6becb0b39c49a1491a88f965ad188b88e9ee;hp=885a751e61d97e9517505b7752c68e653da453d2;hpb=f7eef91897f0f1f273e8aeb1dd001f9b4a762094;p=mirror_iproute2.git diff --git a/rdma/rdma.h b/rdma/rdma.h index 885a751e..a6c6bdea 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -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) @@ -57,8 +57,9 @@ struct rd { int argc; char **argv; char *filename; - bool show_details; - bool show_driver_details; + uint8_t show_details:1; + uint8_t show_driver_details:1; + uint8_t show_raw:1; struct list_head dev_map_list; uint32_t dev_idx; uint32_t port_idx; @@ -66,8 +67,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; @@ -94,6 +95,7 @@ int cmd_dev(struct rd *rd); int cmd_link(struct rd *rd); int cmd_res(struct rd *rd); int cmd_sys(struct rd *rd); +int cmd_stat(struct rd *rd); int rd_exec_cmd(struct rd *rd, const struct rd_cmd *c, const char *str); int rd_exec_dev(struct rd *rd, int (*cb)(struct rd *rd)); int rd_exec_require_dev(struct rd *rd, int (*cb)(struct rd *rd)); @@ -133,8 +135,11 @@ int rd_attr_check(const struct nlattr *attr, int *typep); * Print helpers */ void print_driver_table(struct rd *rd, struct nlattr *tb); +void print_raw_data(struct rd *rd, struct nlattr **nla_line); void newline(struct rd *rd); void newline_indent(struct rd *rd); +void print_on_off(struct rd *rd, const char *key_str, bool on); +void print_raw_data(struct rd *rd, struct nlattr **nla_line); #define MAX_LINE_LENGTH 80 #endif /* _RDMA_TOOL_H_ */