summaryrefslogtreecommitdiffstats
path: root/nest/proto.c
AgeCommit message (Collapse)Author
2010-02-21Fix configure to enable warnings and fix most of them.Ondrej Zajicek
2010-02-21Restricted read-only CLI.Ondrej Zajicek
Also adds support for executing commands using birdc <cmd>.
2010-02-20Implements pattern match for 'show protocols' command.Ondrej Zajicek
And generally consolidates protocol commands.
2010-02-13Removes phantom protocol from the pipe design.Ondrej Zajicek
It seems that by adding one pipe-specific exception to route announcement code and by adding one argument to rt_notify() callback i could completely eliminate the need for the phantom protocol instance and therefore make the code more straightforward. It will also fix some minor bugs (like ignoring debug flag changes from the command line).
2010-02-13Fixes protocol statistics for pipes.Ondrej Zajicek
2010-02-11Fixes a tricky bug in the pipe protocol.Ondrej Zajicek
When uncofiguring the pipe and the peer table, the peer table was unlocked when pipe protocol state changed to down/flushing and not to down/hungry. This leads to the removal of the peer table before the routes from the pipe were flushed. The fix leads to adding some pipe-specific hacks to the nest, but this seems inevitable.
2010-02-08Adds asterisk to the primary route in 'show route' cmd.Ondrej Zajicek
And also fixes a minor bug.
2010-02-06Adds some log messages related to configure.Ondrej Zajicek
Also fixes a bug in the previous patch.
2010-02-06Modifies configure to just reload protocols when filters change.Ondrej Zajicek
Before this change, protocols were restarted in that case.
2010-02-03Makes date/time formats configurable.Ondrej Zajicek
2010-01-03Implements MRTdump feature.Ondrej Zajicek
2009-12-14Finishes 'route reload' feature.Ondrej Zajicek
2009-12-02Fixes silly bug.Ondrej Zajicek
2009-12-02Implements route re-feed.Ondrej Zajicek
This can be used to re-feed routes to protocol after soft change in export filters.
2009-11-26Implements BGP route refresh.Ondrej Zajicek
2009-11-17Implement description field of protocol.Ondrej Zajicek
2009-10-12Implements protocol-specific router id and updates documentation.Ondrej Zajicek
2009-08-11Replace assert with log.Ondrej Zajicek
Although it is true unless there is a bug in BIRD, this assert is not needed (code below does not require that assumption), so we should not crash.
2009-06-19Adds support for soft reconfiguration.Ondrej Zajicek
2009-06-04Implements route statistics and fixes some minor bugs.Ondrej Zajicek
2009-02-12Fixes bug in protocol state machineOndrej Zajicek
Scheduling flush must be done before resource pool freeing as it frees some allocated list nodes from a global list.
2008-12-08Fixes core state machine.Ondrej Zajicek
The core state machine was broken - it didn't free resources in START -> DOWN transition and might freed resources after UP -> STOP transition before protocol turned down. It leads to deadlock on olock acquisition when lock was not freed during previous stop. The current behavior is that resources, allocated during DOWN -> * transition, are freed in * -> DOWN transition, and flushing (scheduled in UP -> *) just counteract feeding (scheduled in * -> UP). Protocol fell down when both flushing is done (if needed) and protocol reports DOWN. BTW, is thera a reason why neighbour cache item acquired by protocol is not tracked by resource mechanism?
2008-11-22Fixes race condition leading to memory corruption and crash.Ondrej Zajicek
When protocol started, feeding was scheduled. If protocol got down before feeding was executed, then function responsible for connecting protocol to kernel routing tables was called after the function responsible for disconnecting, then resource pool of protocol was freed, but freed linked list structures remains in the list.
2004-06-05Marked unused parameters in core code as such.Martin Mares
2000-06-07Spelling fixes to progdoc.Martin Mares
2000-06-02Added documentation on protocols.Martin Mares
Protocol hooks deserve an extra chapter (to come soon).
2000-05-30Better formatting of protocol status.Martin Mares
2000-05-19No more problems when protocols gets disabled during feeding.Martin Mares
2000-05-19Asynchronous feeding of protocols.Martin Mares
2000-05-16Don't log state changes if nothing user-visible has changed.Martin Mares
2000-05-06Cosmetic fixes.Martin Mares
2000-05-04Removed a lot of unused variables.Martin Mares
Please try compiling your code with --enable-warnings to see them. (The unused parameter warnings are usually bogus, the unused variable ones are very useful, but gcc is unable to control them separately.)
2000-04-28Event handlers no longer return re-queue flag. Instead of using it, justMartin Mares
call ev_schedule() on the same handler which should work perfectly now.
2000-04-26Fixed several bugs in protocol state machine. Reconfigurations andMartin Mares
restarts of BGP seem to work now.
2000-04-25Don't forget to set filter pointers in struct proto when reconfiguring.Martin Mares
2000-04-01Changed initialization of protocol list -- now we call proto_build() insteadMartin Mares
of calling the protocols manually. Implemented printing of dynamic attributes in `show route all'. Each protocol can now register its own attribute class (protocol->attr_class, set to EAP_xxx) and also a callback for naming and formatting of attributes. The callback can return one of the following results: GA_UNKNOWN Attribute not recognized. GA_NAME Attribute name recognized and put to the buffer, generic code should format the value. GA_FULL Both attribute name and value put to the buffer. Please update protocols generating dynamic attributes to provide the attr_class and formatting hook.
2000-04-01Include "lib/string.h" instead of <string.h>. It should give us bzero()Martin Mares
and other non-portable functions on all systems.
2000-03-19Bare skeleton of the BGP.Martin Mares
2000-03-12Fixed a bunch of FIXME's by removing them :)Martin Mares
2000-03-12Great cleanup of debug messages. LOCAL_DEBUG turned off in most modules,Martin Mares
several debug() calls converted to DBG().
2000-03-07Added debugging of protocol state transitions.Martin Mares
2000-03-07Added protocol debugging flags (protocol.h: D_xxx), parsing of themMartin Mares
in configuration files and commands for manipulating them. Current debug message policy: o D_STATES, D_ROUTES and D_FILTERS are handled in generic code. o Other debug flags should be handled in the protocols and whenever the flag is set, the corresponding messages should be printed using calls to log(L_TRACE, ...), each message prefixed with the name of the protocol instance. These messages should cover the whole normal operation of the protocol and should be useful for an administrator trying to understand what does the protocol behave on his network or who is attempting to diagnose network problems. If your messages don't fit to the categories I've defined, feel free to add your own ones (by adding them to protocol.h and on two places in nest/config.Y), but please try to keep the categories as general as possible (i.e., not tied to your protocol). o Internal debug messages not interesting even to an experienced user should be printed by calling DBG() which is either void or a call to debug() depending on setting of the LOCAL_DEBUG symbol at the top of your source. o Dump functions (proto->dump etc.) should call debug() to print their messages. o If you are doing any internal consistency checks, use ASSERT or bug(). o Nobody shall ever call printf() or any other stdio functions. Also please try to log any protocol errors you encounter and tag them with the appropriate message category (usually L_REMOTE or L_AUTH). Always carefully check contents of any message field you receive and verify all IP addresses you work with (by calling ipa_classify() or by using the neighbour cache if you want to check direct connectedness as well).
2000-03-01Added proto->hash_key which contains randomly generated hash key usedMartin Mares
for calculation of hash functions depending on proto.
2000-01-18Killed protocol->priority. Protocol startup should be clean and hack-free now.Martin Mares
It seems everything still works (except for disable/enable/restart which hangs sometimes, but it's another story).
2000-01-18protocol->startup_counter no longer exists.Martin Mares
2000-01-17Moved initlialization of protocol lists to global init. Argh.Martin Mares
2000-01-17Don't forget changing proto->name to point to name in new configurationMartin Mares
(to avoid the name being freed with the old config). Also remember to add proto_pipe to protocol_list.
2000-01-17Reworked proto lists -- each proto is now in two lists: the global oneMartin Mares
(proto_list) and per-type one (original lists). A lot of things simplified. Implemented `disable', `enable' and `restart' CLI commands.
2000-01-16Added filter_same() for comparision of two filters.Martin Mares
Pavel, please implement this as soon as possible.
2000-01-16Converted shutdown to a kind of reconfiguration, it's no more handledMartin Mares
as a exception in protocol state machines. Introduced a `shutdown' CLI command. Killed few reconfiguration bugs.