Martin Mares [Sun, 12 Mar 2000 20:30:53 +0000 (20:30 +0000)]
Added debugging of communication between protocols and routing tables.
Just ask for "debug routes" if you want to see the routes and "debug filters"
if you want even the rejected ones.
Martin Mares [Tue, 7 Mar 2000 20:49:48 +0000 (20:49 +0000)]
Added protocol debugging flags (protocol.h: D_xxx), parsing of them
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).
Martin Mares [Wed, 1 Mar 2000 11:48:11 +0000 (11:48 +0000)]
If the user has specified identical preferences for instances of different
protocols, break the tie by comparing addresses, so we keep the ordering
unambiguous.
Martin Mares [Tue, 29 Feb 2000 23:19:52 +0000 (23:19 +0000)]
Rewrote interface type detection logic. The `unnumbered' flag is now per
address, not per interface (hence it's ifa->flags & IA_UNNUMBERED) and
should be set reliably. IF_MULTIACCESS should be fixed now, but it isn't
wise to rely on it on interfaces configured with /30 prefix.
Martin Mares [Wed, 19 Jan 2000 15:07:00 +0000 (15:07 +0000)]
Put client on a stony ground. The whole client is going to be system-specific
(the current version UNIX-specific) anyway, so it's useless to try splitting it
to sysdep and generic part. Instead of this, configure script decides (based on
system type and user's wish) what (if any) client should be built and what
autoconfiguration it requires. Also, the client provides its own die/bug/...
functions.
Martin Mares [Tue, 18 Jan 2000 11:01:03 +0000 (11:01 +0000)]
Killed protocol->priority. Protocol startup should be clean and hack-free now.
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).
Martin Mares [Tue, 18 Jan 2000 10:39:30 +0000 (10:39 +0000)]
Kernel route syncer now supports dynamic reconfiguration. Also it doesn't
depend on the startup counter hack now and uses a zero-time timer instead
to make itself scheduled after normal protocol startup.
Martin Mares [Mon, 17 Jan 2000 11:52:50 +0000 (11:52 +0000)]
Separated `official protocol names' used in status dumps from name templates
used for automatic generation of instance names.
protocol->name is the official name
protocol->template is the name template (usually "name%d"),
should be all lowercase.
Updated all protocols to define the templates, checked that their configuration
grammar includes proto_name which generates the name and interns it in the
symbol table.
Martin Mares [Sun, 16 Jan 2000 17:40:26 +0000 (17:40 +0000)]
Converted shutdown to a kind of reconfiguration, it's no more handled
as a exception in protocol state machines. Introduced a `shutdown'
CLI command. Killed few reconfiguration bugs.