summaryrefslogtreecommitdiff
path: root/proto/bfd
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2024-03-05 19:04:10 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2024-03-05 19:04:10 +0100
commit1b064355f752b9bfe4644f775697bbd9b711f762 (patch)
tree8f3995f1b7450ddbc6309a18fc5e80bc25fdb31b /proto/bfd
parent114be2af28e5c124bd479a487f89244ba99c272d (diff)
Client: Add support for completion of command options
We can easily extend command completion to handle also keywords for command options. Help for command options is not yet supported.
Diffstat (limited to 'proto/bfd')
-rw-r--r--proto/bfd/config.Y9
1 files changed, 9 insertions, 0 deletions
diff --git a/proto/bfd/config.Y b/proto/bfd/config.Y
index 4edc13d9..1a7474b0 100644
--- a/proto/bfd/config.Y
+++ b/proto/bfd/config.Y
@@ -189,6 +189,15 @@ CF_CLI_HELP(SHOW BFD SESSIONS, ..., [[Show information about BFD sessions]]);
CF_CLI(SHOW BFD SESSIONS, bfd_show_sessions_args, [<name>] [address <ip|prefix>] [(interface|dev) \"<name>\"] [ipv4|ipv6] [direct|multihop] [all], [[Show information about BFD sessions]])
{ PROTO_WALK_CMD($4->name, &proto_bfd, p) bfd_show_sessions(p, $4); };
+CF_CLI_OPT(SHOW BFD SESSIONS ADDRESS, <ip>|<prefix>)
+CF_CLI_OPT(SHOW BFD SESSIONS INTERFACE, \"<name>\")
+CF_CLI_OPT(SHOW BFD SESSIONS DEV, \"<name>\")
+CF_CLI_OPT(SHOW BFD SESSIONS ALL)
+CF_CLI_OPT(SHOW BFD SESSIONS IPV4)
+CF_CLI_OPT(SHOW BFD SESSIONS IPV6)
+CF_CLI_OPT(SHOW BFD SESSIONS DIRECT)
+CF_CLI_OPT(SHOW BFD SESSIONS MULTIHOP)
+
bfd_show_sessions_args:
/* empty */ { $$ = cfg_allocz(sizeof(struct bfd_show_sessions_cmd)); }
| bfd_show_sessions_args CF_SYM_KNOWN { cf_assert_symbol($2, SYM_PROTO); $$->name = $2; }