Removed comments about workings of the old neighbor cache which are(1) obsolete and (2) replaced by the progdoc.
Modified the neighbor cache to remember local addresses as well.
neighbor->scope now contains proper address scope which is zero (SCOPE_HOST)for local addresses, higher (SCOPE_LINK, ..., SCOPE_UNIVERSE) for remote ones.
if_connected() is again private.
Introduced neigh_connected_to() to serve the same purpose efficiently.
I broke compilation. Sorry.
if_connected is usefull outside of neighbour cache.
Reimplemented neighbor cache. Now uses real hashing.
Rewrote interface type detection logic. The `unnumbered' flag is now peraddress, not per interface (hence it's ifa->flags & IA_UNNUMBERED) andshould be set reliably. IF_MULTIACCESS should be fixed now, but it isn'twise to rely on it on interfaces configured with /30 prefix.
Killed a couple of bugs in the neighbor cache.
Manual disable/enable/restart/shutdown/reconfiguration of protocolsno longer hangs on loops in neighbor lists :)
Introduced new protocol-dependent integer field `aux' to struct neighbor.
Added few basic commands: show status, show interfaces [summary],show protocols (incomplete).
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....
I rewrote the interface handling code, so that it supports multipleaddresses per interface (needed for example for IPv6 support).
o struct iface now contains a list of all interface addresses (represented by struct ifa), iface->addr points to the primary address (if any)....
o The if_change_too_big_p change was too high-spirited. Fixed.o Introduced if_find_by_index()o Recognizing two types of interface updates: full update (starting with if_start_update(), ending with if_end_update(), guaranteed to see all existing interfaces) and a partial update (only if_update(),...
Interface logic changes:
o Introduced IF_LINK_UP flag corresponding to real link state.o Allowed addressless interfaces.o IF_UP is now automatically calculated and set iff the interface is administratively up, has link up and has an IP address assigned....
When protocols go down, prune the neighbor list.
config->router_id works again.
Implemented new configuration/reconfiguration interface and defined protocolstate machines. Full explanation will follow soon.
Keep protocol data out of iface_patt.
Rip now has configurable per-interface metric (please rewiev), and fewmore configurable parameters. To do that, union was added into iface_patt.
Added functions for manipulating interface name pattern lists:
o iface_patt_match(list, iface) -- match interface against list o iface_patts_equal(a, b, c) -- compare whether two pattern lists are equal or not. c(x,y) is called for comparison of protocol-dependent...
Generate router_id automatically if possible (standard "smallest of localregular interface addresses" rule).
Protocols should NOT rely on router_id existence -- when router ID is notavailable, the router_id variable is set to zero and protocols requiring...
Fixed misleading comment.
Solve chicken-and-egg problems with protocol startup. We now queue all inactiveprotocols 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.
Now sending IF_CHANGE_CREATE when a new interface appears and IF_CHANGE_UPonly if it's really up.
- 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...
Implemented scanning of network interfaces. Mostly very ugly code due toterrible kernel interface (SIOGIFCONF and friends).
Added interface index (used only by OS-dependent code since ifindexes itselfare OS-dependent).
Point-to-point links: added address of the opposite end.
Next attempt on data structures...
Changed #include <x/y> to #include "x/y" for our local includes, so thatgcc -MM can be used to separate them from the system ones.
Added automatic generation of dependencies.
Added IP address manipulation macros, interface declarations and logging.
First look at data structures. More to come tomorrow...