Martin Mares [Sun, 29 Nov 1998 21:59:37 +0000 (21:59 +0000)]
Created new functions for allocating configuration data:
o cfg_alloc(size) -- generic memory allocation
o cfg_allocu(size) -- unaligned memory allocation
o cfg_allocz(size) -- zeroed memory allocation
o cfg_strcpy(str) -- allocate a copy of a string
Martin Mares [Fri, 27 Nov 1998 21:32:45 +0000 (21:32 +0000)]
Trivial 15-line bison excercise: Implemented expressions including
user-defined numeric symbols. Whenever possible, use `expr' instead
of `NUM' to get full express ion power :-)
Martin Mares [Mon, 19 Oct 1998 18:13:36 +0000 (18:13 +0000)]
Generate router_id automatically if possible (standard "smallest of local
regular interface addresses" rule).
Protocols should NOT rely on router_id existence -- when router ID is not
available, the router_id variable is set to zero and protocols requiring
valid router ID should just refuse to start, reporting such error to the log.
Martin Mares [Mon, 19 Oct 1998 17:52:29 +0000 (17:52 +0000)]
Basic kernel routing table syncing implemented. Learning of routes installed
by other programs or the kernel itself is not supported yet, but it's not
needed for development of other protocols.
Martin Mares [Sun, 18 Oct 1998 22:24:41 +0000 (22:24 +0000)]
o FIB flags now available for FIB users.
o struct network: FIB flags used for kernel syncing.
o struct network: `next' field deleted (historical relic).
Martin Mares [Sun, 18 Oct 1998 12:50:43 +0000 (12:50 +0000)]
Since almost every UNIX system requires different techniques for reading
the kernel routing table as opposed to modifying it which is approximately
the same on non-netlink systems, I've split the kernel routing table
routines to read and write parts. To be implemented later ;-)
Martin Mares [Sun, 18 Oct 1998 11:13:16 +0000 (11:13 +0000)]
After contemplating about RIP route timeouts for a long time, I've implemented
protocol callbacks for route insertion and deletion from the central table.
RIP should maintain its own per-protocol queue of existing routes, scan it
periodically and call rte_discard() for routes that have timed out.
Martin Mares [Sat, 17 Oct 1998 11:24:13 +0000 (11:24 +0000)]
Each protocol now hears even its own routes and needs to make its own
loop detection. This is needed since both RIP and OSPF handle multiple
neighbors and they need to redistribute routes learned from each neighbor
to the remaining ones.
Martin Mares [Sat, 17 Oct 1998 11:05:18 +0000 (11:05 +0000)]
Solve chicken-and-egg problems with protocol startup. We now queue all inactive
protocols and don't send route/interface updates to them and when they come up,
we resend the whole route/interface tables privately.
Removed the "scan interface list after protocol start" work-around.
Martin Mares [Tue, 13 Oct 1998 19:57:33 +0000 (19:57 +0000)]
o There are cases when SIOCGIFINDEX is defined, but it doesn't work. When
this happens, don't reject the whole interface, just mark it as index 0.
o Removed Pavel's comment about EFAULT and SIGSEGV. EFAULT is a valid return
code for cases where the buffer is too small.
o Commented out the smart interface list size logic temporarily as it seems
Linux 2.0 SIOCGIFCONF doesn't react to ifc_req==NULL sanely. Replaced it
by exponential stepping.
Pavel Machek [Tue, 13 Oct 1998 14:32:18 +0000 (14:32 +0000)]
I prefer to have broken drivers than completely stupid ones...
Linus Torvalds
Rip now uses main routing table properly: entries are stored directly
into main routing table and we are relying on core to call our's
compare. That unfortunately broke garbage collecting (and probably
many more things). It compiles.
Martin Mares [Fri, 10 Jul 1998 08:38:29 +0000 (08:38 +0000)]
Added ipa_class_mask() which guesses netmask for classful addressing.
For pure A/B/C class addresses it just returns the class netmask, for
subnets it tries to guess subnet mask. Please make sure the address
you pass to this function is really a valid host address (i.e., call
ipa_validate() first).
Martin Mares [Mon, 1 Jun 1998 21:41:11 +0000 (21:41 +0000)]
- Rewrote whole interface logic. Removed support for multiple addresses per
interface since it makes much trouble everywhere. Instead, we understand
secondary addresses as subinterfaces.
- In case interface addresses or basic flags change, we simply convert it
to a down/up sequence.
- Implemented the universal neighbour cache. (Just forget what did previous
includes say of neighbour caching, this one is brand new.)