diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-25 13:15:32 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-25 13:15:32 +0200 |
commit | 508d936078aecc8fbbb9ca1218104599c4a3cb4a (patch) | |
tree | d84c6b098342fc2f366d960bd90d6a158610ea48 /nest/config.Y | |
parent | a0b176e3b2b50d3a30574afa927e0ee8ef65be68 (diff) |
Implements eval command and minor CLI cleanups.
Implemented eval command can be used to evaluate expressions.
The patch also documents echo command and allows to use log classes
instead of integer as a mask for echo.
Diffstat (limited to 'nest/config.Y')
-rw-r--r-- | nest/config.Y | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nest/config.Y b/nest/config.Y index b85a5733..a6f13808 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -612,7 +612,11 @@ CF_CLI(DUMP ROUTES,,, [[Dump routing table]]) CF_CLI(DUMP PROTOCOLS,,, [[Dump protocol information]]) { protos_dump_all(); cli_msg(0, ""); } ; -CF_CLI(ECHO, echo_mask echo_size, [all | off | <mask>] [<buffer-size>], [[Configure echoing of log messages]]) { +CF_CLI(EVAL, term, <expr>, [[Evaluate an expression]]) +{ cmd_eval($2); } ; + +CF_CLI_HELP(ECHO, ..., [[Control echoing of log messages]]) +CF_CLI(ECHO, echo_mask echo_size, (all | off | { debug | trace | info | remote | warning | error | auth }) [<buffer-size>], [[Control echoing of log messages]]) { cli_set_log_echo(this_cli, $2, $3); cli_msg(0, ""); } ; @@ -620,7 +624,7 @@ CF_CLI(ECHO, echo_mask echo_size, [all | off | <mask>] [<buffer-size>], [[Config echo_mask: ALL { $$ = ~0; } | OFF { $$ = 0; } - | NUM + | '{' log_mask_list '}' { $$ = $2; } ; echo_size: |