Martin Mares [Sun, 31 Oct 1999 17:47:47 +0000 (17:47 +0000)]
Parse CLI commands. We use the same parser as for configuration files (because
we want to allow filter and similar complex constructs to be used in commands
and we should avoid code duplication), only with CLI_MARKER token prepended
before the whole input.
Defined macro CF_CLI(cmd, args, help) for defining CLI commands in .Y files.
The first argument specifies the command itself, the remaining two arguments
are copied to the help file (er, will be copied after the help file starts
to exist). This macro automatically creates a skeleton rule for the command,
you only need to append arguments as in:
CF_CLI(STEAL MONEY, <$>, [[Steal <$> US dollars or equivalent in any other currency]]): NUM {
cli_msg(0, "%d$ stolen", $3);
} ;
Also don't forget to reset lexer state between inputs.
Martin Mares [Fri, 29 Oct 1999 12:08:49 +0000 (12:08 +0000)]
Events now return a value. If it's non-zero, the event is re-queued
for processing in next event cycle. This can be used to prevent background
actions (hint: user commands) from hogging the CPU for too long time.
Ondrej Filip [Mon, 18 Oct 1999 21:48:51 +0000 (21:48 +0000)]
Huge changes. Neighbor and interface state machines rewritten.
It should be cleaner now, I'm preparing for file splitting.
Maybe I added some minor bugs. :-(
Martin Mares [Tue, 3 Aug 1999 19:36:06 +0000 (19:36 +0000)]
Basic support for IPv6. The system-dependent part doesn't work yet,
but the core routines are there and seem to be working.
o lib/ipv6.[ch] written
o Lexical analyser recognizes IPv6 addresses and when in IPv6
mode, treats pure IPv4 addresses as router IDs.
o Router ID must be configured manually on IPv6 systems.
o Added SCOPE_ORGANIZATION for org-scoped IPv6 multicasts.
o Fixed few places where ipa_(hton|ntoh) was called as a function
returning converted address.
Martin Mares [Tue, 3 Aug 1999 19:33:22 +0000 (19:33 +0000)]
Kernel route syncer supports multiple tables.
The changes are just too extensive for lazy me to list them
there, but see the comment at the top of sysdep/unix/krt.c.
The code got a bit more ifdeffy than I'd like, though.
Also fixed a bunch of FIXME's and added a couple of others. :)
Martin Mares [Tue, 3 Aug 1999 19:31:54 +0000 (19:31 +0000)]
Protocol engine bug fixes:
o Make proto_config->table always point to the right
table even if it should be the default one.
o When shutting down, kill protocol in reverse order
of their priority.
o When stopping a protocol down, disconnect it from
routing tables immediately instead of waiting
for the delayed protocol flush event.
Also added a protocol instance counter (used by KRT code
in very magic ways).
Martin Mares [Tue, 3 Aug 1999 19:30:49 +0000 (19:30 +0000)]
Cleaned up handling of interface patterns:
o Parsing of interface patterns moved to generic code,
introduced this_ipatt which works similarly to this_iface.
o Interface patterns now support selection by both interface
names and primary IP addresses.
o Proto `direct' updated.
o RIP updated as well, it also seems the memory corruption
bug there is gone.
Pavel Machek [Mon, 31 May 1999 20:34:48 +0000 (20:34 +0000)]
Set corectly destination address for RIP multicast. Broadcasting &
multicasting rip actually works [broadcasting is kind of hard to turn
it on, through].
Martin Mares [Mon, 17 May 1999 20:14:52 +0000 (20:14 +0000)]
From now we support multiple tables. The master_table variable is
definitely gone. Both rte_update() and rte_discard() have an additional
argument telling which table should they modify.
Also, rte_update() no longer walks the whole protocol list -- each table
has a list of all protocols connected to this table and having the
rt_notify hook set. Each protocol can also freely decide (by calling
proto_add_announce_hook) to connect to any other table, but it will
be probably used only by the table-to-table protocol.
The default debugging dumps now include all routing tables and also
all their connections.
Martin Mares [Mon, 17 May 1999 20:06:19 +0000 (20:06 +0000)]
Implemented two new symbol handling functions:
o cf_define_symbol() -- it assigns a meaning to a symbol, bailing
out if it already has one.
o cf_find_symbol() -- finds symbol by name and creates it if not found.
Also modified filter/config.Y to make use of the first function.