From c26c6bc2d78a2fe76f27dcc9fbb5afc95c3a7626 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 14 May 2020 03:48:17 +0200 Subject: Show info from multiple protocols when protocol is not specified Most commands like 'show ospf neighbors' fail when protocol is not specified and there are multiple instances of given protocol type. This is annoying in BIRD 2, as many protocols have IPv4 and IPv6 instances. The patch changes that by showing output from all protocol instances of appropriate type. Note that the patch also removes terminating cli_msg() call from these commands and moves it to the common iterating code. --- nest/cli.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nest/cli.h') diff --git a/nest/cli.h b/nest/cli.h index 6040be91..8a3294c5 100644 --- a/nest/cli.h +++ b/nest/cli.h @@ -58,6 +58,9 @@ void cli_printf(cli *, int, char *, ...); #define cli_msg(x...) cli_printf(this_cli, x) void cli_set_log_echo(cli *, uint mask, uint size); +static inline void cli_separator(cli *c) +{ if (c->last_reply) cli_printf(c, -c->last_reply, ""); }; + /* Functions provided to sysdep layer */ cli *cli_new(void *); -- cgit v1.2.3