0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-25 19:21:54 +00:00
Commit Graph

14 Commits

Author SHA1 Message Date
Pavel Tvrdik
87857f7f46 CLI: Improved auto-completion behavior
Auto-complete keywords (for, where, filter, ...) and symbol names (names
of protocols, tables, ...). Client can request daemon for list of all
symbols using new cli command `refresh symbols`.

Next changes:
  - Behavior is configured by *.Y files using flags CLI_SF_*
  - The file doc/reply_codes was moved to header file
    client/reply_codes.h.
  - Share birdcl input_read() function code for birdc non-interactive
    mode.
  - BIRD daemon notifies the client about new symbol set.
  - BIRD pushes notification to the client about new symbol set and then
    the client should request a package with all symbols (`refresh
    symbols`).
  - File-based history of previous commands(). In interactive mode in
    birdc is stored history of all commands in ~/.birdc_history file.
  - BIRD daemon sends notification to clients about interface updates
  - Maintains a list of all connected cli clients to daemon. Daemon
    sends to all cli clients notification about interfaces states up and
    down.
2017-05-18 15:09:15 +02:00
Jan Moskyto Matejka
f8d44b01df Nest: split route show into separate file 2017-05-15 12:10:51 +02:00
Pavel Tvrdík
ae80a2de95 unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
Ondrej Zajicek
a92cf57dd6 Implements undo command and optional timeout for configuration
Several new configure command variants:

configure undo - undo last reconfiguration
configure timeout - configure with scheduled undo if not confirmed in timeout
configure confirm - confirm last configuration
configure check - just parse and validate config file
2012-12-26 12:40:48 +01:00
Ondrej Zajicek
fdf16eb658 Prints full community lists during 'show route all'. 2011-07-03 19:43:30 +02:00
Ondrej Zajicek
e0a45fb421 Restricted read-only CLI.
Also adds support for executing commands using birdc <cmd>.
2010-02-21 09:57:26 +01:00
Ondrej Zajicek
6baef17ecf Fixes bug in CLI TX buffer management. 2009-07-14 14:18:54 +02:00
Martin Mares
4b87e256eb Split off general commands to cmds.c.
Added `show symbols' command which dumps whole symbol table together
with symbol types etc.
2000-01-19 12:30:19 +00:00
Martin Mares
34350a5270 Implemented echoing of log messages to CLI connections. Just try `echo all'. 1999-12-06 12:34:45 +00:00
Martin Mares
3579376927 cli_msg() moved to cli.h, so that it can be used outside the parser. 1999-11-25 15:34:51 +00:00
Martin Mares
ffb59d243a Command line interface now works. 1999-11-17 12:00:21 +00:00
Martin Mares
bc2fb68098 Parse CLI commands. We use the same parser as for configuration files (because
we want to allow filter and similar complex constructs to be used in commands
and we should avoid code duplication), only with CLI_MARKER token prepended
before the whole input.

Defined macro CF_CLI(cmd, args, help) for defining CLI commands in .Y files.
The first argument specifies the command itself, the remaining two arguments
are copied to the help file (er, will be copied after the help file starts
to exist). This macro automatically creates a skeleton rule for the command,
you only need to append arguments as in:

	CF_CLI(STEAL MONEY, <$>, [[Steal <$> US dollars or equivalent in any other currency]]): NUM {
		cli_msg(0, "%d$ stolen", $3);
	} ;

Also don't forget to reset lexer state between inputs.
1999-10-31 17:47:47 +00:00
Martin Mares
b9672a845f The CLI I/O functions work as desired. 1999-10-31 15:43:44 +00:00
Martin Mares
7d3aab1c16 First steps of the Command Line Interface: I/O routines. 1999-10-29 12:10:10 +00:00