diff options
author | Martin Mares <mj@ucw.cz> | 1999-05-17 20:14:52 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-05-17 20:14:52 +0000 |
commit | 0e02abfd5770062768eeb4c75061b7d2f656489d (patch) | |
tree | c9ee70e3b8d7eff81ced44994b58e878d9edafdc /nest/protocol.h | |
parent | 4107df1d1b7454a16e6f45ea55aae13b01c9f566 (diff) |
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.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 5e1e2ce9..3aed2f21 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -73,6 +73,7 @@ struct proto_config { struct protocol *proto; /* Protocol */ char *name; unsigned debug, preference, disabled; /* Generic parameters */ + struct rtable_config *table; /* Table we're attached to */ struct filter *in_filter, *out_filter; /* Attached filters */ /* Protocol-specific data follow... */ @@ -128,9 +129,10 @@ struct proto { void (*rte_insert)(struct network *, struct rte *); void (*rte_remove)(struct network *, struct rte *); - struct rtable *table; /* Routing table we're connected to */ + struct rtable *table; /* Our primary routing table */ struct filter *in_filter; /* Input filter */ struct filter *out_filter; /* Output filter */ + struct announce_hook *ahooks; /* Announcement hooks for this protocol */ /* Hic sunt protocol-specific data */ }; @@ -223,6 +225,19 @@ void proto_notify_state(struct proto *p, unsigned state); extern struct proto_config *cf_dev_proto; /* + * Route Announcement Hook + */ + +struct announce_hook { + node n; + struct rtable *table; + struct proto *proto; + struct announce_hook *next; /* Next hook for the same protocol */ +}; + +struct announce_hook *proto_add_announce_hook(struct proto *, struct rtable *); + +/* * Callback to sysdep code when shutdown is finished */ |