summaryrefslogtreecommitdiffstats
path: root/nest/protocol.h
AgeCommit message (Collapse)Author
2000-03-07Added protocol debugging flags (protocol.h: D_xxx), parsing of themMartin Mares
in configuration files and commands for manipulating them. Current debug message policy: o D_STATES, D_ROUTES and D_FILTERS are handled in generic code. o Other debug flags should be handled in the protocols and whenever the flag is set, the corresponding messages should be printed using calls to log(L_TRACE, ...), each message prefixed with the name of the protocol instance. These messages should cover the whole normal operation of the protocol and should be useful for an administrator trying to understand what does the protocol behave on his network or who is attempting to diagnose network problems. If your messages don't fit to the categories I've defined, feel free to add your own ones (by adding them to protocol.h and on two places in nest/config.Y), but please try to keep the categories as general as possible (i.e., not tied to your protocol). o Internal debug messages not interesting even to an experienced user should be printed by calling DBG() which is either void or a call to debug() depending on setting of the LOCAL_DEBUG symbol at the top of your source. o Dump functions (proto->dump etc.) should call debug() to print their messages. o If you are doing any internal consistency checks, use ASSERT or bug(). o Nobody shall ever call printf() or any other stdio functions. Also please try to log any protocol errors you encounter and tag them with the appropriate message category (usually L_REMOTE or L_AUTH). Always carefully check contents of any message field you receive and verify all IP addresses you work with (by calling ipa_classify() or by using the neighbour cache if you want to check direct connectedness as well).
2000-03-01Added proto->hash_key which contains randomly generated hash key usedMartin Mares
for calculation of hash functions depending on proto.
2000-01-18Killed protocol->priority. Protocol startup should be clean and hack-free now.Martin Mares
It seems everything still works (except for disable/enable/restart which hangs sometimes, but it's another story).
2000-01-18protocol->startup_counter no longer exists.Martin Mares
2000-01-17Separated `official protocol names' used in status dumps from name templatesMartin Mares
used for automatic generation of instance names. protocol->name is the official name protocol->template is the name template (usually "name%d"), should be all lowercase. Updated all protocols to define the templates, checked that their configuration grammar includes proto_name which generates the name and interns it in the symbol table.
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.
2000-01-16Converted shutdown to a kind of reconfiguration, it's no more handledMartin Mares
as a exception in protocol state machines. Introduced a `shutdown' CLI command. Killed few reconfiguration bugs.
2000-01-16First attempt on dynamic reconfiguration. There are still lots of bugsMartin Mares
and problems to solve, but the hardest part works.
1999-12-08Except for special protocols (nowadays only the kernel syncer), don'tMartin Mares
export host and link scope routes.
1999-12-03Added proto_get_named() to be used in CLI commands to get protocol instanceMartin Mares
of a given protocol with optionally given name. See `show static' for an example.
1999-12-01Added get_route_info and show_route_data hooks to struct protocol.Martin Mares
Please implement them.
1999-12-01`show protocols' now shows time of last state change and protocol-dependentMartin Mares
status information (obtained via newly introduced hook protocol->get_status).
1999-11-30Remember protocol instance in proto_config and use that forMartin Mares
`show protocols <name>'.
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-03Implemented a Table-to-Table protocol a.k.a The Pipe.Martin Mares
1999-08-03Protocol engine bug fixes:Martin Mares
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).
1999-05-31Added extra argument to rt_update hook which contains a pointer to theMartin Mares
temporary attribute list.
1999-05-17From now we support multiple tables. The master_table variable isMartin Mares
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.
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-04-05Added some new protocol hooks (look at the comments for better explanation):Martin Mares
make_tmp_attrs Convert inline attributes to ea_list store_tmp_attrs Convert ea_list to inline attributes import_control Pre-import decisions
1999-04-03Added new protocol hook for dumping of protocol-dependent routeMartin Mares
attributes. Please implement in all protocols.
1999-03-26Added everything protocols need to know about multiple routing tables,Martin Mares
i.e. struct proto now contains field 'table' pointing to routing table the protocol is attached to. Use this instead of &master_table. Modified all protocols except the kernel syncer to use this field.
1999-03-26Slightly better generator of default protocol instance names.Martin Mares
1999-03-17Allow input and output filters (only accept/reject style as we didn't defineMartin Mares
modifying filters yet) to be attached to protocol instances.
1999-03-17Removed the `rta_same' hook since it's no longer needed (all protocolsMartin Mares
needing some local information should use extended attrs and cached rta's).
1999-03-09Yes, joining the crew. Sorry for being late. Added dummy functions for OSPF.Ondrej Filip
1999-03-03Introduced protocol priority (all 'normal' protocols should use theMartin Mares
default zero priority). No more "kernel syncer initialized before device routes" problems.
1999-03-01Renamed struct rtattr to struct rta to make things more consistent andMartin Mares
avoid namespace clashes with <linux/rtnetlink.h>. Other files should not be affected since they use 'rta' directly.
1999-02-13Perform gracious shutdown upon receipt of SIGTERM. Finally we canMartin Mares
test the whole protocol shutdown code... :)
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-06Added skeleton of static route protocol.Martin Mares
1998-11-29Added configuration of the device internal protocol. This is primarilyMartin Mares
intended to serve as an example of interface pattern list use. As a side effect, you can disable generating of device routes by disabling this protocol.
1998-11-29Allow setting debug value and `disabled' flag in protocol definition.Martin Mares
1998-10-20Insert/remove hooks return void, not int.Martin Mares
1998-10-19Proto struct now contain (down | starting | up) state.Martin Mares
1998-10-18Split protocol init to building of protocol list and real protocol init.Martin Mares
Added kernel route table syncer skeleton.
1998-10-18After contemplating about RIP route timeouts for a long time, I've implementedMartin Mares
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.
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-08-31Route update hook now gets network prefix as well as updatedMartin Mares
route attributes.
1998-07-09Adding proto_dump_all() functionPavel Machek
1998-06-03Changed protocol declarations a bit.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-20Added routing table and routing attribute code.Martin Mares
1998-05-03Next attempt on data structures...Martin Mares
1998-04-28Changed #include <x/y> to #include "x/y" for our local includes, so thatMartin Mares
gcc -MM can be used to separate them from the system ones. Added automatic generation of dependencies.
1998-04-22First look at data structures. More to come tomorrow...Martin Mares