Age | Commit message (Collapse) | Author |
|
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).
|
|
|
|
they can be made configurable if it turns out to be useful.
|
|
|
|
|
|
|
|
|
|
for calculation of hash functions depending on proto.
|
|
protocols, break the tie by comparing addresses, so we keep the ordering
unambiguous.
|
|
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.
|
|
symbols of libreadline :-(
|
|
Added `show symbols' command which dumps whole symbol table together
with symbol types etc.
|
|
Manual disable/enable/restart/shutdown/reconfiguration of protocols
no longer hangs on loops in neighbor lists :)
|
|
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).
|
|
|
|
|
|
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.
|
|
|
|
(to avoid the name being freed with the old config).
Also remember to add proto_pipe to protocol_list.
|
|
(proto_list) and per-type one (original lists). A lot of things simplified.
Implemented `disable', `enable' and `restart' CLI commands.
|
|
Pavel, please implement this as soon as possible.
|
|
as a exception in protocol state machines. Introduced a `shutdown'
CLI command. Killed few reconfiguration bugs.
|
|
and problems to solve, but the hardest part works.
|
|
|
|
|
|
|
|
with protocols wanting to use the same port on the same interface
during reconfiguration time.
How to use locks: In the if_notify hook, just order locks for the
interfaces you want to work with and do the real socket opening after the
lock hook function gets called. When you stop using the socket, close
it and rfree() the lock.
Please update your protocols to use the new locking mechanism.
|
|
export host and link scope routes.
|
|
Added sysdep configuration hooks.
|
|
|
|
|
|
Removed CLI tests, real commands now serve as much better examples.
|
|
of a given protocol with optionally given name. See `show static' for an
example.
|
|
with the other commands.
|
|
Pavel, please check my addition to filter/config.Y.
|
|
|
|
Please implement them.
|
|
deferred CLI command handlers to store their temporary data in the CLI
parsing pool.
|
|
status information (obtained via newly introduced hook protocol->get_status).
|
|
|
|
`show protocols <name>'.
|
|
of 2000000000 (BTW who wrote that???)
|
|
|
|
|
|
show protocols (incomplete).
|
|
|
|
|
|
of that EA in the same list and causes ea_find() to fail unless you add
EA_ALLOW_UNDEF to the second argument.
ea_sort (resp. ea_do_prune()) removes all undef'd attributes from the list.
I hope this works :)
|
|
|
|
To define a new command, just add a new rule to the gramar:
CF_CLI(COMMAND NAME, arguments, help-args, help-text) {
what-should-the-command-do
} ;
where <arguments> are appended to the RHS of the rule, <help-args> is the
argument list as shown in the help and <help-text> is description of the
command for the help.
<what-should-the-command-do> is a C code snippet to be executed. It should
not take too much time to execute. If you want to print out a lot of
information, you can schedule a routine to be called after the current
buffer is flushed by making cli->cont point to the routine (see the
TEST LONG command definition for an example); if the connection is closed
in the meantime, cli->cleanup gets called.
You can access `struct cli' belonging to the connection you're currently
servicing as this_cli, but only during parse time, not from routines scheduled
for deferred execution.
Functions to call inside command handlers:
cli_printf(cli, code, printf-args) -- print text to CLI connection,
<code> is message code as assigned in doc/reply_codes or a negative
one if it's a continuation line.
cli_msg(code, printf-args) -- the same for this_cli.
Use 'sock -x bird.ctl' for connecting to the CLI until a client is written.
|