summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-033-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_main.c: (sigint) Use zlog_notice for termination message. (main) Use zlog_notice for startup announcement. * isis_main.c: (sigint,sigterm) Use zlog_notice for termination message. (terminate) This function should be static, not global. (main) Use zlog_notice for startup announcement, and remove ifdef ZEBRA_VERSION. * version.h.in: Remove declaration for pid_output_lock, this function is now static, not global. * pid_output.c: (pid_output_lock) This function should be static, not global. And remove "old umask" error message, since it was really an unimportant debug message, not an error. (pid_output) Need to declare static function pid_output_lock. * ospf6_main.c: (sigint,sigterm) Use zlog_notice for termination message. (main) Remove commented-out call to pid_output_lock (which should never be called other than from inside pid_output). And use zlog_notice to print the startup message, which now includes the vty port. * ospf_main.c: (sigint) Use zlog_notice for termination message. (main) Issue a startup announcement using zlog_notice. * rip_main.c: (sigint) Use zlog_notice for termination message. (main) Add a startup announcement using zlog_notice. * ripng_main.c: (sighup) Remove spurious terminating message. (sigint) Use zlog_notice for termination message. (main) Issue a startup announcement using zlog_notice. * main.c: (sigint) Use zlog_notice for termination message. (main) Add a startup announcement using zlog_notice.
* Fix comment for zlog_backtrace_sigsafe: it now supports syslog loggingajs2004-11-281-2/+1
| | | | on systems where /dev/log is a unix datagram socket.
* 2004-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-283-15/+137
| | | | | | | | | | | | | | | | | * log.h: Remove several unused fields from struct zlog. Add comments for other fields, and add one new field syslog_options that is used in the new syslog_sigsafe implementation. * log.c: (syslog_sigsafe) New function to send syslog messages in an async-signal safe way that can be used inside a signal handler. (syslog_connect) New function to connect to syslog daemon inside a signal handler. This function supports only systems where /dev/log is a unix datagram socket (e.g. not Solaris). (zlog_signal) Call syslog_sigsafe if syslog logging is enabled. (zlog_backtrace_sigsafe) Call syslog_sigsafe if syslog logging is enabled. (openzlog) Save syslog_options for use in syslog_sigsafe. (num_append) Fix bug: handle 0 properly. (hex_append) New function to print a u_long in hex format.
* DEFUN_DEPRECATED passes attribute to DEFUN as well.hasso2004-11-282-1/+5
|
* 2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-264-5/+10
| | | | | * log.c, log.h, memory.c: Change function name from zlog_backtrace_safe to the more self-explanatory zlog_backtrace_sigsafe.
* 2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-264-30/+7
| | | | | | | * debug.[ch]: Remove unused files. * Makefile.am: Remove references to debug.c and debug.h * ospf_main.c: Remove #include "debug.h" (was not being used, and lib/debug.h has now been deleted).
* 2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-264-17/+91
| | | | | | | | | | | * log.c: (zlog_backtrace) New function to log a backtrace. (zlog_backtrace_safe) Log a backtrace in an async-signal-safe way. Unfortunately, this function does not support syslog logging yet. (zlog_signal) Move backtrace code into separate function zlog_backtrace_safe. (_zlog_assert_failed) Call zlog_backtrace before aborting. * log.h: Declare new functions zlog_backtrace and zlog_backtrace_safe. * memory.c: (zerror) Call zlog_backtrace before aborting.
* 2004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-262-1/+5
| | | | * Makefile.am: Need to add zassert.h to pkginclude_HEADERS.
* Remove unused va_list variable that was introduced by mistake in the last patchajs2004-11-261-2/+0
| | | | to stdarg handling.
* 2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-252-0/+11
| | | | | * zebra.h: If not C99 and there's no va_copy macro and there is a __va_copy macro, define va_copy as __va_copy.
* 2004-11-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-252-4/+18
| | | | | | | * pid_output.c: (pid_output_lock) Fix 2 bugs: when locking, should set l_whence to SEEK_SET, not SEEK_END. And after writing new pid to file, must ftruncate to eliminate any extraneous bytes left over from the last time a pid was written.
* In zlog_signal, should probably check the return code from backtrace, justajs2004-11-241-1/+2
| | | | to be safe.
* In zlog_signal, change type of size since backtrace actually returns an int.ajs2004-11-241-1/+1
|
* 2004-11-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-245-2/+42
| | | | | | | | | * zassert.h: New header file to declare a quagga-specific assert macro. * log.c: (_zlog_assert_failed) New function called when assert fails to log the error and abort. * zebra.h: Include "zassert.h" instead of <assert.h>. * regex.c: Include "zassert.h" instead of <assert.h>. * dict.c: Include "zassert.h" instead of <assert.h>.
* 2004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-234-2/+209
| | | | | | | | | | | | | | | * sigevent.c: (signal_init) Set up some default signal handlers so that processes will issue an error message before terminating or dumping core. (trap_default_signals) New function to set up signal handlers for various signals that may kill the process. (exit_handler) Call zlog_signal, then _exit. (core_handler) Call zlog_signal, then abort. * log.h: Declare new function zlog_signal. * log.c: (zlog_signal) New function to log information about a received signal before the process dies. Try to log a backtrace also. (quagga_signal_handler,signal_set) Should be static.
* 2004-11-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-235-194/+92
| | | | | | | | | | | | | | | | | * log.c: (vzlog) Take a single va_list argument and use va_copy as necessary for multiple traversals. (zlog) Pass only one va_list to vzlog. (zlog_*,plog_*) Use a macro for boilerplate code; pass only one va_list to vzlog. (zlog_set_file) Remove unused 2nd argument (flags). (zlog_save_cwd,zlog_get_cwd,zlog_free_cwd) Remove unused functions. * log.h: Remove ZLOG_*_INDEX defines (no longer used). Remove unused 2nd argument from zlog_set_file prototype. Fix prototype for zlog_rotate. * command.c: (config_log_file) Remove unused 2nd arg to zlog_set_file. * vty.c: (vty_out) Fix stdarg usage to perform multiple traversals properly. (vty_log) Must use va_copy for multiple traversals of va_list arg.
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-2010-31/+31
| | | | | * global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
* Fix previous change to use new function safe_strerror instead of strerror.ajs2004-11-191-1/+1
|
* 2004-11-19 David Young <dyoung@pobox.com>ajs2004-11-193-0/+15
| | | | * log.c: (safe_strerror) New function: safe wrapper for strerror.
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-192-2/+8
| | | | | * sockopt.c: (setsockopt_so_recvbuf) Stop error message from being printed every time.
* 2004-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-163-19/+25
| | | | | | * memory.h: Fix prototype for memory_init(). * memory.c: Declare many functions and data structures static instead of global. Fix prototype for memory_init().
* Rationalize CMSG_SPACE usage:gdt2004-11-153-4/+25
| | | | | | | | | | | | | | | in lib/zebra.h, ensure that RFC3542-required CMSG_SPACE and CMSG_LEN are defined. Warn if alignment assumptions are made, since they are i386-centric. in lib/sockopt.h, declare that sockopt sizes are without CMSG_SPACE-required padding - just simple sizeof. in ospfd/ospf_packet.c, simply use CMSG_SPACE This should remove all instances of CMSG_ALIGN from the source code. This is a nonstandard, though rational, construct; quagga should use only those defines in RFC3542.
* 2004-11-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-152-16/+52
| | | | | | | | | * memory.c: (zerror) Use zlog_err instead of fprintf to stderr. Instead of exiting, log currenty memory usage and then abort. (log_memstats) New function to log memory statistics, called by zerror. (show_memory_all) Loop over new mlists array instead of calling show_memory_vty separately for each memory_list.
* Remove unused dont_more variable in vty_flush and add return 0 to vtysh_write.ajs2004-11-101-1/+1
|
* Oops, wrong date on changelog entries..paul2004-11-081-1/+1
|
* 2004-11-07 Paul Jakma <paul@dishone.st>paul2004-11-083-5/+18
| | | | | | | | | | * buffer.c: Add missing include of log.h. (buffer_flush_available) written is compared against mostly against unsigned types, only for the writev do we need signed compare, so declare it as size_t and cast it to ssize_t just for the error compare when we've called writev. * buffer.h: Add comment that buffer data sizes really should be size_t.
* 2004-11-07 Paul Jakma <paul@dishone.st>paul2004-11-072-2/+8
| | | | * lib/version.h.in: add autoconf configure_input output var
* 2004-11-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-053-80/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vty.h: Remove fields in struct vty that were related to VTY_CONTINUE capabilities (that were used only in bgpd/bgp_route.c and are now removed). Also remove some other fields that were not being used at all. * vty.c: (vty_execute) Do not test for obsolete status values VTY_START and VTY_CONTINUE. (vty_read) Remove calls to vty->output_func since that was part of the VTY_CONTINUE infrastructure that has been removed. (vty_flush) Remove code to support VTY_START and VTY_CONTINUE. (vty_close) Remove code to cancel vty->t_output thread, since that thread was never actually used. * bgp_route.c: Remove all code related to VTY_CONTINUE; this feature is deprecated because the output did not represent a single point in time. All output needs to be generated inline and buffered by the library code. (route_vty_out,route_vty_out_tag,damp_route_vty_out, flap_route_vty_out) Remove code to count number of lines of output, since this was only useful for VTY_CONTINUE behavior. (bgp_show_callback) Removed. (bgp_show_table) Remove hooks for VTY_CONTINUE callback support. As a result, there's a new output_arg argument to this function. Make function static. (bgp_show) Make function static and add a new output_arg argument. Change all functions that call bgp_show or bgp_show_table to pass the new output_arg argument (that used to be passed inside vty->output_arg). * bgp_mplsvpn.c: Remove declarations of functions defined in bgp_route.c; these declarations belong in bgp_route.h. * bgp_route.h: Declare 3 global functions used in both bgp_route.c and in bgp_mplsvpn.c.
* 2004-11-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-044-38/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * vty.c: Vtysh connections to daemons should use buffering. (vty_out) Remove exception for vty_shell_serv, just use buffer_write. (vty_new) Increase output buffer size to 4096 rounded up to a multiple of pagesize. (vtysh_read) After command has been executed and all output buffered, call buffer_flush_available and schedule further writes if the buffers are not yet empty. (vtysh_write) New function to flush output to vtysh when the socket is writeable. (vty_event) Added new VTYSH_WRITE event for flushing buffers to vtysh clients. Also, should save read thread in vty->t_read so the thread can be cancelled in vty_close. * buffer.h: In struct buffer_data, remove unused "parent" field. Convert "unsigned char *data" to "unsigned char data[0]" to save a malloc. Declare new function buffer_flush_available that works with non-blocking sockets. * buffer.c: (buffer_data_new) Use a single malloc now that data is a variable-size array at end of structure. (buffer_data_free) Just a single free now that data is part of the structure. (buffer_write) Simplify the logic to make behavior more transparent. (buffer_flush) Decrease b->length as data is written out. (buffer_flush_vty_all) Decrease b->length as buffers are freed. (buffer_flush_vty) Decrease b->length as data is written out. (buffer_flush_available) New function to flush non-blocking sockets.
* - Add .arch-ids and .arch-inventory to cvsignore, to allow one to use archpaul2004-11-021-0/+2
| | | | with CVS trees.
* 2004-11-01 Paul Jakma <paul@dishone.st>paul2004-11-012-27/+4
| | | | * sockopt.c: (setsockopt_pktinfo) remove, its unused.
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-312-3/+3
| | | | * thread.c: Use XCALLOC and sizeof the type, not the pointer.
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-312-18/+20
| | | | * smux.c: fix int to size_t compile warnings
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-313-7/+13
| | | | | | * memory.h: Add MTYPE_THREAD_FUNCNAME and MTYPE_THREAD_STATS * thread.c: Update stats and funcname alloc/free to use previous specific memory type defines
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-312-24/+6
| | | | * keychain.c: Convert some more strtoul users to VTY_GET_INTEGER.
* 2004-10-31 Paul Jakma <paul@dishone.st>paul2004-10-312-3/+14
| | | | | | * vty.c: As per Andrew's suggestions.. (vty_serv_un) remove flags. (vtysh_accept) close socket if we cant set NONBLOCK. Add flags.
* 2004-10-29 Paul Jakma <paul@dishone.st>paul2004-10-292-6/+12
| | | | | | * vty.c: Move setting of sock to O_NONBLOCK from vty_serv_un to vtysh_accept, where sock is the actual fd we wanted to set to O_NONBLOCK, ie the /connected/ vtysh unix socket.
* Yet another breakage introduced in May with zserv cleanup.hasso2004-10-232-0/+7
|
* 2004-10-23 Paul Jakma <paul@dishone.st>paul2004-10-222-1/+3
| | | | * zebra.h: reserve ZEBRA_ROUTE_HSLS
* - credit rix for fixing openbsdpaul2004-10-221-1/+2
|
* 2004-10-22 Paul Jakma <paul@dishone.st>paul2004-10-222-1/+2
| | | | * sockopt.h: Fix elif that should be an else.
* 2004-10-22 Paul Jakma <paul@dishone.st>paul2004-10-222-29/+55
| | | | | | | | * command.h: Cleanup the defines a bit, add helper defines and collapse all defines to use those. Add an attribute field to cmd_element to support, eg hidden or deprecated commands, add defun defines for such. All that's left to do is add logic to command.c to check these attributes... ;)
* 2004-10-22 Paul Jakma <paul@dishone.st>paul2004-10-223-24/+24
| | | | | | | * sockopt.c: (setsockopt_pktinfo) unexported * sockopt.h: Cleanup SOCKOPT_CMSG defines a bit. Add a throwaway define for SOPT_SIZE_CMSG_IFINDEX_IPV4 for systems which have neither IP_RECVIF nor IP_PKTINFO (eg openbsd).
* 2004-10-13 Paul Jakma <paul@dishone.st>paul2004-10-222-2/+7
| | | | | * sockopt.c: (getsockopt_ipv4_ifindex) no ifindex should be 0, not -1.
* Small copyright string and hostname related cleanup.hasso2004-10-196-50/+31
|
* OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,hasso2004-10-196-59/+102
| | | | ripd might need some more testing though.
* Make initializing smux connection configurable - "smux peer OID" commandhasso2004-10-133-40/+52
| | | | | initializes connection, and "no smux peer" command terminates it. Fixes bugzilla #47 and #112.
* Fix critical bugzilla #113. Make CMD_ERR_NOTHING_TODO nonfatal.hasso2004-10-132-5/+11
|
* 2004-10-13 Paul Jakma <paul@dishone.st>paul2004-10-136-25/+41
| | | | | | | | | | | | | * (global) more const'ification. * sockunion.c: (sockunion_su2str) buffer should be sized SU_ADDRSTRLEN. (sockunion_log) do not return stack variables, strdup buf before return. * vty.h: Fix up the VTY_GET_INTEGER macros. Testing caller supplied values against ULONG_MAX is daft, when caller probably has passed a type that can not hold ULONG_MAX. use a temporary long instead. Add VTY_GET_LONG, make VTY_GET_INTEGER_RANGE use it, make VTY_GET_INTEGER a define for VTY_GET_INTEGER_RANGE.
* Some more const string fixes.hasso2004-10-114-4/+9
|