diff options
Diffstat (limited to 'src/plugins/tracedump/graph_cli.c')
-rw-r--r-- | src/plugins/tracedump/graph_cli.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/tracedump/graph_cli.c b/src/plugins/tracedump/graph_cli.c index 2440295a1a7..6af4706f87d 100644 --- a/src/plugins/tracedump/graph_cli.c +++ b/src/plugins/tracedump/graph_cli.c @@ -16,7 +16,11 @@ */ #include <sys/socket.h> +#ifdef __linux__ #include <linux/if.h> +#else +#include <net/if.h> +#endif /* __linux__ */ #include <vnet/vnet.h> #include <vnet/plugin/plugin.h> @@ -75,9 +79,9 @@ graph_node_show_cmd (vlib_main_t * vm, while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "node %d", &index)) - n = vlib_get_node (vm, index); - else if (unformat (input, "node %v", &name)) - n = vlib_get_node_by_name (vm, name); + n = vlib_get_node (vm, index); + else if (unformat (input, "node %s", &name)) + n = vlib_get_node_by_name (vm, name); else if (unformat (input, "want_arcs")) want_arcs = true; @@ -132,13 +136,11 @@ graph_node_show_cmd (vlib_main_t * vm, return 0; } -/* *INDENT-OFF* */ VLIB_CLI_COMMAND (graph_node_show_command, static) = { .path = "show graph", .short_help = "show graph [node <index>|<name>] [want_arcs] [input|trace_supported] [drop] [output] [punt] [handoff] [no_free] [polling] [interrupt]", .function = graph_node_show_cmd, }; -/* *INDENT-ON* */ /* |