summaryrefslogtreecommitdiff
path: root/vtysh/vtysh.c
AgeCommit message (Collapse)Author
2004-12-072004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* bgp_main.c: (main) The 2nd argument to openzlog has been removed. * isis_main.c: (main) The 2nd argument to openzlog has been removed. * ospf6_main.c: (main) The 2nd argument to openzlog has been removed. Note that stdout logging will no longer be enabled by default when not running as a daemon. * ospf_main.c: (main) The 2nd argument to openzlog has been removed. * rip_main.c: (main) The 2nd argument to openzlog has been removed. * ripng_main.c: (main) The 2nd argument to openzlog has been removed. * main.c: (main) The 2nd argument to openzlog has been removed. So stdout logging will no longer be enabled by default. * irdp_main.c: (irdp_finish) Reduce severity of shutdown message from LOG_WARNING to LOG_INFO. * vtysh.c: Make several functions static instead of global. Added several commands to support destination-specific logging levels. (vtysh_completion) This function is unused, so comment it out. * basic.texi: Document new logging features. Separate basic config commands from basic VTY commands. * log.h: Replace struct zlog flags and maskpri fields with maxlvl array to support individual logging levels for each destination. Remove the 2nd argument to openzlog since the default logging config should be standardized inside the library. Replaced the zlog_set_flag and zlog_reset_flag functions with zlog_set_level. And zlog_set_file now requires an additional log_level argument. Declare zlog_proto_names for use inside command.c in the "show logging" command. Added defines useful for command construction. * log.c: (vzlog) Decide where to send the message based on the individual logging levels configured for each destination. Remove support for ZLOG_STDERR since it was never actually used. Support record-priority for terminal monitors. (zlog_signal,zlog_backtrace_sigsafe) Support destination-specific logging levels. Remove stderr support (was never used). Added support for terminal monitor logging. (_zlog_assert_failed) Increase message severity to LOG_EMERG. (openzlog) Remove 2nd argument since default config should be standardized in library. By default, terminal monitoring is set to debug, and all other logging is disabled. (zlog_set_flag,zlog_reset_flag) Removed. (zlog_set_level) New function to replace zlog_set_flag and zlog_reset_flag. Supports destination-specific logging levels. (zlog_set_file,zlog_reset_file) Support file-specific logging level. (zlog_rotate) Log an error message if fopen fails, and support new file-specific logging level. * command.h: Change DEFUN_CMD_FUNC_DECL and DEFUN_CMD_FUNC_TEXT so that command functions will be static instead of global. Remove declarations for config_exit and config_help. Define new macros DEFUNSH_ATTR, DEFUNSH_HIDDEN, and DEFUNSH_DEPRECATED so we can have deprecated commands in vtysh. Similarly, for completeness, define macros ALIAS_SH, ALIAS_SH_HIDDEN, and ALIAS_SH_DEPRECATED. Also, fix bug in ALIAS_ATTR macro (didn't matter because it was never used). * command.c: Make many functions static instead of global. (facility_name,facility_match,level_match) New functions to support enhanced destination-specific logging levels. (config_write_host) Support new destination-specific logging levels. (config_logmsg) Added new "logmsg" command to help test logging system. (show_logging) Added "show logging" command to show the current configuration of the logging system. (config_log_stdout_level) Support explicit stdout logging level. (no_config_log_stdout) Now takes optional LEVEL arg. (config_log_monitor,config_log_monitor_level,no_config_log_monitor) New commands creating new "log monitor" commands to set terminal monitoring log level. (config_log_file_level) Support explicit file logging level. (config_log_syslog_level) Support explicit syslog logging level. (config_log_facility,no_config_log_facility) Implement new "log facility" command. (cmd_init) Add hooks for new commands: "show logging", "logmsg", "log stdout <level>", "log monitor", "log monitor <level>", "no log monitor", "log file <filename> <level>", "no log file <filename> <level>", "log syslog <level>", "log facility", and "no log facility". * vty.h: Added a "level" argument to vty_log so it can support "log record-priority". Declare new function vty_log_fixed for use in signal handlers. * vty.c: (vty_log,vty_log_out) Added a "level" argument to support "log record-priority" for vty terminal monitors. (vty_down_level) Use config_exit_cmd.func instead of calling config_exit directly (since command functions will now be static instead of global). (vty_log_fixed) New function to send terminal monitor messages from inside a signal handler.
2004-11-202004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
2004-11-112004-11-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* vtysh.c: (vtysh_client_execute) Fix flaws in detecting trailing '\0' chars and command return code.
2004-10-28"show running-daemons" -> "show daemons".hasso
2004-10-20Don't popen pager if command is "exit". Fixes "vtysh screws up my terminalhasso
if I exit" issue.
2004-10-112004-09-17 Paul Jakma <paul@dishone.st>paul
* vtysh.c: (vtysh_client_execute) fix the sync fix. The 4th and final sync byte is not ASCII NULL, it's actually a status integer, and only ASCII NULL if CMD_SUCCESS is returned by daemon. Fix pointed out by Hasso.
2004-10-11Fix warnings here.hasso
2004-10-07Vtysh compiles cleanly as well.hasso
2004-10-03Big vtysh cleanup. See changelogs for details.hasso
2004-09-26Compiler warning fix.hasso
2004-09-172004-09-17 Paul Jakma <paul@dishone.st>paul
* vtysh.c: (vtysh_client_execute) trailling NULLs can be arbitrarily split across reads, dont get confused by this and block forever.
2004-08-27Brown paperbag, please. Don't segfault if VTYSH_PAGER isn't defined.hasso
2004-08-27Make "terminal length <0-512>" command work in vtysh.hasso
2004-08-26More vtysh fixes. Specifying configuration from command line works now.hasso
2004-08-26Vtysh cleanup part 2. No any functional changes yet except VTYSH_INTERFACE.hasso
2004-08-25Cleaning up whitespace mess mostly caused by my patches. Biggerhasso
reorganization of this spagetti will follow soon.
2004-05-09Workaround for Bugzilla #58.hasso
2004-03-04Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso
from vtysh ([quagga-dev 932]).
2003-12-23*** empty log message ***hasso
2003-12-222003-12-22 Christian Hammers <ch@lathspell.de>gdt
* configure.ac (and everywhere a regular file is opened for writing): use file permissions from configure rather than compiled-in umask.
2003-06-25Add IPv6 ping and traceroute.hasso
2003-05-25Just "write" command without any parameters writes conf to file.hasso
2003-05-23slight addition to hasso's previous no_interface patch.paul
2003-05-23From: Hasso Tepper <hasso@estpak.ee>paul
Add the 'no interface' command to all the daemons and vtysh. now it's possible to delete interface from routeing daemons as well only if it doesn't exist in os. http://hasso.linux.ee/zebra/ht-no_interface_fix.patch
2003-05-23Undo Hasso last patch, about to apply a slightly updated patch.paul
2003-05-23From: Hasso Tepper <hasso@estpak.ee>paul
http://hasso.linux.ee/zebra/ht-no_interface-23052003.patch Add the 'no interface' command to all the daemons and vtysh.
2003-05-21From: Paul Jakma <paulj@alphyra.ie>paul
Subject: [zebra 19125] vtysh bogus perms check vtysh checks that the zebra.vty socket uid is == to its own euid, this is bogus - let the kernel decide whether permissions match, vtysh shouldnt try second guess. (this becomes noticeable when neither zebra nor vtysh are run as root :) )
2003-05-01From: Sergiy Vyshnevetskiy <serg@vostok.net>paul
Subject: [zebra 18941] Re: [PATCH] misc patch Program shouldn't terminate on pager execution failure. We can also use "PAGER" environment variable - it's very common.
2003-04-19Hasso Tepperpaul
http://hasso.linux.ee/zebra/ht-routemap-18042003_5.patch Trivial fixes to sync daemon's route-map commands to have same syntax. Fixes a lot of errors with "match ..." and "set ..." commands when using vtysh.
2003-04-18Fix up vtysh.c compile warningspaul
(following from initial patches by Amir & Sergey Vyshnevetskiy ([zebra 18689])
2003-04-07Change vty socket path defines to the global definespaul
2003-03-28Add 'no description' commandpaul
2003-03-252003-03-25 Paul Jakma <paul@dishone.st>paul
* sync to latest zebra CVS * spec file: updated and added define for ospf-api/client NB: OSPF-API has been broken by the zebra.org changes, which has added struct ospf * as a new arg to many functions
2003-03-01Add the interface node 'description' command.paul
2003-01-25Small fix (free integrate_sav) and addition of an ssh command.paul
2003-01-23Replace _SC_PAGESIZE with the far more portable getpagesize().paul
(needed, eg, for Darwin). Kris Foster <kris@krweb.net>
2002-12-13Added vtysh patch to allow 'write file' command to write eitherpaul
per-daemon and/or integrated config file
2002-12-13Initial revisionpaul