Age | Commit message (Collapse) | Author |
|
|
|
|
|
of various callbacks.
Events are just another resource type objects (thus automatically freed
and unlinked when the protocol using them shuts down). Each event can
be linked in at most one event list. For most purposes, just use the
global event list handled by the following functions:
ev_schedule Schedule event to be called at the next event
scheduling point. If the event was already
scheduled, it's just re-linked to the end of the list.
ev_postpone Postpone an already scheduled event, so that it
won't get called. Postponed events can be scheduled
again by ev_schedule().
You can also create custom event lists to build your own synchronization
primitives. Just use:
ev_init_list to initialize an event list
ev_enqueue to schedule event on specified event list
ev_postpone works as well for custom lists
ev_run_list to run all events on your custom list
ev_run to run a specific event and dequeue it
|
|
latest mj's changes.
|
|
|
|
|
|
|
|
state machines. Full explanation will follow soon.
|
|
|
|
|
|
|
|
reference BIRD configuration.
By the way: Do you know GCC by default does `#define unix 1'?
|
|
|
|
In the future, we'll allow any filter term in place of `expr' and we'll
just evaluate it immediately, but not now as we have no evaluation
routines.
|
|
If you want to run bird now, just copy doc/bird.conf.example as bird.conf
and edit it to suit your needs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(with exception of printing integers to screen), but they exist.
|
|
actually does something.
|
|
|
|
(multicast/broadcast options are currently unimplemented).
|
|
|
|
|
|
|
|
|
|
|
|
guesses most system-dependent parameters and determines name of system
configuration file (sysdep/cf/...) with the remaining ones.
To compile BIRD, you now need to do:
autoconf # Create configure from configure.in
./configure # Run configure script
make # Compile everything
Configuration files:
sysdep/config.h Master config file
sysdep/autoconf.h Parameters determined by configure script
sysdep/cf/*.h Fixed system configuration we're unable
to guess.
Makefiles are still the original ones, but this will change soon.
|
|
|
|
compile :-(.
|
|
|
|
|
|
|
|
when RIP is unconfigured.
die() -> bug()
|
|
#define L_DEBUG "\001" /* Debugging messages */
#define L_INFO "\002" /* Informational messages */
#define L_WARN "\003" /* Warnings */
#define L_ERR "\004" /* Errors */
#define L_AUTH "\005" /* Authorization failed etc. */
#define L_FATAL "\006" /* Fatal errors */
#define L_TRACE "\002" /* Protocol tracing */
#define L_INFO "\003" /* Informational messages */
#define L_REMOTE "\004" /* Remote protocol errors */
#define L_WARN "\004" /* Local warnings */
#define L_ERR "\005" /* Local errors */
#define L_AUTH "\006" /* Authorization failed etc. */
#define L_FATAL "\007" /* Fatal errors */
#define L_BUG "\010" /* BIRD bugs */
Introduced bug() which is like die(), but with level L_BUG. Protocols
should _never_ call die() as it should be used only during initialization
and on irrecoverable catastrophic events like out of memory.
Also introduced ASSERT() which behaves like normal assert(), but it calls
bug() when assertion fails. When !defined(DEBUGGING), it gets ignored.
|
|
|
|
This is implemented in a way similar to lib/slists.h, but it took some
more effort to make rehashing not disturb the readers. We do it by just
taking _highest_ k bits of ipa_hash as our hash value and sorting each
box by whole ipa_hash().
Consult FIB_ITERATE_* macros in nest/route.h.
Implemented fib_check() debugging function and also rewrote the rehashing
algorithm to use better thresholds and not to waste time by rehashing
forth and back.
|
|
version has not been benchmarked yet due to insufficient test data.)
Now ipa_hash() returns a uniformely distributed 16-bit value.
|
|
For example of their use, look at comments in lib/slists.h.
|
|
|
|
we can use very simple function which is monotonic with respect
to re-hashing:
n ^= n >> 16;
n ^= n << 10;
h = (n >> (16 - o)) & ((1 << o) - 1);
where o is table order. Statistical analysis for both backbone routing
table and local OSPF routing tables gives values near theoretical
optimum for uniform distribution (see ips.c for formulae).
The trick is very simple: We always calculate a 16-bit hash value n and
use o most significant bits (this gives us monotonity wrt. rehashing
if we sort the chains by the value of n). The first shift/xor pair
reduces the IP address to a 16-bit one, the second pair makes higher
bits of the 16-bit value uniformly distributed even for tables containing
lots of long prefixes (typical interior routing case with 24-bit or even
longer prefixes).
|
|
|
|
|
|
o Interface syncing is now a part of krt and it can have configurable
parameters. Actually, the only one is scan rate now :)
o Kernel routing table syncing is now synchronized with interface
syncing (we need the most recent version of the interface list
to prevent lots of routes to non-existent destinations from
appearing). Instead of its own timer, we just check if it's
route scan time after each iface list scan.
o Syncing of device routes implemented.
o CONFIG_AUTO_ROUTES should control syncing of automatic device routes.
o Rewrote krt_remove_route() to really remove routes :)
o Better diagnostics.
o Fixed a couple of bugs.
|
|
ones seem to work well.
|
|
in the main table.
|
|
and does things "the right way". Few things are still missing (device
routes etc.), I'll add them later in the evening.
|