summaryrefslogtreecommitdiffstats
path: root/nest/iface.c
AgeCommit message (Collapse)Author
2000-01-17Reworked proto lists -- each proto is now in two lists: the global oneMartin Mares
(proto_list) and per-type one (original lists). A lot of things simplified. Implemented `disable', `enable' and `restart' CLI commands.
1999-12-16Minor cleanups.Martin Mares
1999-12-01Introduced new protocol-dependent integer field `aux' to struct neighbor.Martin Mares
1999-11-30`show interfaces' and `show protocols' works.Martin Mares
1999-11-25Added few basic commands: show status, show interfaces [summary],Martin Mares
show protocols (incomplete).
1999-08-03Basic support for IPv6. The system-dependent part doesn't work yet,Martin Mares
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.
1999-08-03Cleaned up handling of interface patterns:Martin Mares
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.
1999-05-07Netlink support for secondary interface addresses.Martin Mares
1999-05-06I rewrote the interface handling code, so that it supports multipleMartin Mares
addresses per interface (needed for example for IPv6 support). Visible changes: 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 Interface has IF_UP set iff it's up and it has a primary address. o IF_UP is now independent on IF_IGNORED (i.e., you need to test IF_IGNORED in the protocols; I've added this, but please check). o The if_notify_change hook has been simplified (only one interface pointer etc.). o Introduced a ifa_notify_change hook. (For now, only the Direct protocol does use it -- it's wise to just listen to device routes in all other protocols.) o Removed IF_CHANGE_FLAGS notifier flag (it was meaningless anyway). o Updated all the code except netlink (I'll look at it tomorrow) to match the new semantics (please look at your code to ensure I did it right). Things to fix: o Netlink. o Make krt-iface interpret "eth0:1"-type aliases as secondary addresses.
1999-03-26Don't try to manipulate neighbor lists for copied interface structures.Martin Mares
This avoids few nasty references to free memory.
1999-03-02o The if_change_too_big_p change was too high-spirited. Fixed.Martin Mares
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(), usually due to asynchronous interface notifications).
1999-03-02Interface logic changes:Martin Mares
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. It may be IF_IGNORED, though (as in case of the loopback). o Any changes which include up/down transition are considered small enough to not provoke artificial upping and downing of the interface. o When an interface disappears (i.e., it wasn't seen in the last scan), we announce this change only once. o IF_LOOPBACK implies IF_IGNORE.
1999-02-13Parameter order for the proto->if_notify hook was different in the includeMartin Mares
file and different in reality. Decided to use the same order as we do for proto->rt_notify (i.e., first new value and second the old one).
1999-02-13Don't send any neighbor notifications to protocols being flushed.Martin Mares
1999-02-13When protocols go down, prune the neighbor list.Martin Mares
1999-02-13config->router_id works again.Martin Mares
1999-02-11struct proto again contains instance name (a copy of proto->cf->name).Martin Mares
1999-02-05Implemented new configuration/reconfiguration interface and defined protocolMartin Mares
state machines. Full explanation will follow soon.
1998-12-20die() -> bug() where appropriate.Martin Mares
1998-12-07Aesthetic fix for neighbor cache debug dump.Martin Mares
1998-11-29Added functions for manipulating interface name pattern lists:Martin Mares
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 data.
1998-10-19Generate router_id automatically if possible (standard "smallest of localMartin Mares
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.
1998-10-17Solve chicken-and-egg problems with protocol startup. We now queue all inactiveMartin Mares
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.
1998-06-17Use '%I' instead of dirty address printing hacks.Martin Mares
1998-06-04Now sending IF_CHANGE_CREATE when a new interface appears and IF_CHANGE_UPMartin Mares
only if it's really up.
1998-06-03Protocol hooks. All of them may be NULL.Martin Mares
1998-06-01- Rewrote whole interface logic. Removed support for multiple addresses perMartin Mares
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.)
1998-05-26Implemented scanning of network interfaces. Mostly very ugly code due toMartin Mares
terrible kernel interface (SIOGIFCONF and friends).