summaryrefslogtreecommitdiffstats
path: root/lib/qfstring.h
Commit message (Collapse)AuthorAgeFilesLines
* Work in progress -- pthread handling and debug improvementsChris Hall2012-05-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging: * added "debug bgp io" -- to log all BGP Engine I/O, with the option to log input or output only. This is similar to "debug bgp update", but that affects the Routing Engine, while this affects the BGP Engine. * reviewed and updated "debug bgp fsm". The fsm logging now covers all aspects of the fsm, which is all in the BGP Engine. Any nominally fsm logging in the Routing Engine is now "event" logging. Added collision resolution to fsm logging. Dovetailed fsm and keepalive logging. * removed logging of route advertisment timer and withdraw events. pthread and nexus handling: * qpt_thread object created to encapsulate a pthread, with means to keep track of existing pthreads and their cpu usage. This is now used instead of the list of qpnexus for the watch-dog. * added explicit qpt_finish() and call from qexit(). Collects up and destroys all qpt_thread -- including any "detached" qpt_thread. * changed qpt_thread_signal() to qpt_thread_raise() Now takes qpt_thread object (not pthread_t) and also is now agnostic about qpthreads_enabled. Work in progress -- pthread handling and debug improvements Logging: * added "debug bgp io" -- to log all BGP Engine I/O, with the option to log input or output only. This is similar to "debug bgp update", but that affects the Routing Engine, while this affects the BGP Engine. * reviewed and updated "debug bgp fsm". The fsm logging now covers all aspects of the fsm, which is all in the BGP Engine. Any nominally fsm logging in the Routing Engine is now "event" logging. Added collision resolution to fsm logging. Dovetailed fsm and keepalive logging. * removed logging of route advertisment timer and withdraw events. pthread and nexus handling: * qpt_thread object created to encapsulate a pthread, with means to keep track of existing pthreads and their cpu usage. This is now used instead of the list of qpnexus for the watch-dog. * added explicit qpt_finish() and call from qexit(). Collects up and destroys all qpt_thread -- including any "detached" qpt_thread. * changed qpt_thread_signal() to qpt_thread_raise() Now takes qpt_thread object (not pthread_t) and also is now agnostic about qpthreads_enabled. * tidied up pthread attribute and status handling, to cope with a wider variety of pthread implementations, and to lay ground- work for more pthreads and more subtle scheduling. Logging at pthread start up provides more information about what the local implementation supports. Flags up some issues with FreeBSD -- in particular broken pthread CPU clock :-( * changed handling of "thread specific" variables, so that is now also qpthreads_enabled agnostic. * added tests in configure.ac to identify when: pthread_attr_getstack() pthread_attr_setstack() pthread_attr_get_np() pthread_getattr_np() are available. (For FreeBSD, at least, also need to know whether to include <pthread_np.h>.) Others: * added "NO_RETURN" macro for __attribute__((noreturn)) or local equivalent. * added qfb_nam_t -- a shorter general purpose fixed length sting object.
* Watch-Dog Work-in-ProgressChris Hall2012-04-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added -W command line argument to bgpd to start watch-dog: -W99[,[+]path] where: 99 is the watch-dog interval, eg. 2 or 5 path is file that watch-dog writes to -- default is stderr. if '+' is given, will append to the file. Watch-Dog looks out for: * not being woken up when expected. * CLOCK_REALTIME and CLOCK_MONOTONIC not advancing together. * pthreads stalling. * mutexes being locked for long periods. * CPU consumption by each pthread in each watch-dog interval. If pthreads are locking up or going into a flat spin, the Watch-Dog should spot it. Pro tem: outputs pthread properties to stderr at start-up.
* vtysh partly restored. bgpd not crashing on over-size messages.Chris Hall2012-02-191-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NB: this is a partial interim version -- NOT for production. Reinstate vtysh. In bgpd: cope better with generating oversize messages. The "pipework" branch is no more. There is now "euro_ix" and "euro_ix_b", where 'b' stands for 'bleedin'. The "pipework" is currently in 'bleedin'. Version updated to: 0.99.18ex20b Major changes in this commit: * modified bgpd to avoid crashing if an oversize message is created. At present, any oversize messages are simply discarded. This may be a mistake... since it is possible that some routes that should have been withdrawn are not. TBA. The stream lib facilities have been overhauled to may this easier. * restoring vtysh. At present the vtysh is thought to work, except that it does not currently create integrated configuration files. For the time being, *only* the following compile: lib, bgpd, zebra, vtysh, tests All other daemons will fail to compile, and must be disabled.
* Update the scaled number output and memory show commands.Chris Hall2011-09-061-113/+124
| | | | | | | | | | | Functions to output scaled decimal and binary numbers were implemented for memory show commands. Those have been generalised and placed in the qfstring.c. The memory show commands have been updated to use the newer functions, and a small test program for those has been implemeted. Other small updates to qfstring.c, qstring.c and qpath.c.
* Merging of euro_ix branch into pipework.Chris Hall2011-09-021-2/+28
| | | | | | | | Bring in fixes for bgp dumping with pthreaded BGP Engine. Bring in new "show nexus xxx" command. Fix removal of '~' prompt.
* Merge branch 'euro_ix' of /git/quagga.euro-ix into pipeworkex18pChris Hall2011-08-121-3/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge with euro_ix branch v0.99.18ex17. Update version to: 0.99.18ex18p Of particular note: * includes support for GTSM: neighbor ... ttl-security hops X no neighbor ... ttl-security hops X where X is 1-254. For usual case of immediately connected peer, X == 1. Cannot set ttl-security while ebgp-multihop is set, and vice-versa. If underlying O/S does not support GTSM, then will set ttl as per ebgp-multihop. In passing, have fixed various bugs in the main Quagga branch. * initial support for draft-ietf-idr-optional-transitive Does not yet support "neighbor-complete" flag. * main Quagga now uses TCP_CORK and permanent non-blocking Do not beleive TCP_CORK to be necessary for euro_ix code... which has a different buffering strategy. The euro_ix code already runs sockets permanently non-blocking. * various fixes to attribute intern/unintern Trying to remove memory leaks. Nobody seems convinced that this has been perfected, yet. * fixes for ospfd and ospf6d issues. Up to date with master branch up to: commit 538cb284864c17de66152a5236db4cd80e3e7639 Merge: 036a6e6 8ced4e8 Author: Paul Jakma <paul@quagga.net> Date: Fri Jul 29 18:21:50 2011 +0100
| * Merge with main Quagga source as of 29-Jul-2011.ex17Chris Hall2011-08-121-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create euro_ix branch. Update version to: 0.99.18ex17 Of particular note: * includes support for GTSM: neighbor ... ttl-security hops X no neighbor ... ttl-security hops X where X is 1-254. For usual case of immediately connected peer, X == 1. Cannot set ttl-security while ebgp-multihop is set, and vice-versa. If underlying O/S does not support GTSM, then will set ttl as per ebgp-multihop. In passing, have fixed various bugs in the main Quagga branch. * initial support for draft-ietf-idr-optional-transitive Does not yet support "neighbor-complete" flag. * main Quagga now uses TCP_CORK and permanent non-blocking Do not beleive TCP_CORK to be necessary for euro_ix code... which has a different buffering strategy. The euro_ix code already runs sockets permanently non-blocking. * various fixes to attribute intern/unintern Trying to remove memory leaks. Nobody seems convinced that this has been perfected, yet. * fixes for ospfd and ospf6d issues. Up to date with master branch up to: commit 538cb284864c17de66152a5236db4cd80e3e7639 Merge: 036a6e6 8ced4e8 Author: Paul Jakma <paul@quagga.net> Date: Fri Jul 29 18:21:50 2011 +0100
* | Update pipework and improve memory reporting.Chris Hall2011-07-211-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve error handling for all new pipework inputs and outputs. Change behaviour of ^C from VTY Terminal, so that will interrupt output and terminate all running pipes -- including running shell commands. In pipe commands, recognise "~/..." and "~user/..." home directory forms. Changed "~/" to mean the usual home for the current user. "~~/" now means the configuration file directory. Introduced "shdir DIR" command to show what is (currently) what. Changed "<|" so that if the command has a path, it is expanded using Quagga's rules (including "~~/" and "~./") and the "here" directory is set to that path. Fixed collection of stderr output from all pipes so that is separate from stdout output, and is always sent to the base output (eg VTY Terminal). Increase amount of information about the heap that "show mem" shows -- particularly if the "memory_tracker" is enabled. Tested and applied resulting fixes.
* | Bring "ex" version up to date with 0.99.18ex15pChris Hall2011-03-291-23/+89
| | | | | | | | | | | | | | | | | | Release: 0.99.18ex15p -- Pipework Branch Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
* | Upgrade of "pipework" -- including piping to/from shell commandsex11pChris Hall2011-03-211-3/+3
| | | | | | | | | | | | Version 0.99.15ex11p A major overhaul.
* | Creation of pipework branchChris Hall2010-12-211-25/+12
|/
* New functions for error numbers and addresses in messages.Chris Hall2010-04-081-2/+3
| | | | | | | | Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful.
* First beta releaseChris Hall2010-04-061-0/+158
Various bug fixes and improvements. Running with a fair amount of debug/assert code, which must be removed at some date.