diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2011-12-22 13:20:29 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2011-12-22 13:20:29 +0100 |
commit | be4cd99a3688cef19f66e1c8b8e0506ffc1e13fc (patch) | |
tree | 2ac6aed8d703b4150976493ddcc179b395a795c8 /nest/proto-hooks.c | |
parent | cf7f0645316f5df0984467cf7001f5466254eaf3 (diff) |
Implements deterministic MED handling.
Thanks to Alexander V. Chernikov for many suggestions.
Diffstat (limited to 'nest/proto-hooks.c')
-rw-r--r-- | nest/proto-hooks.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nest/proto-hooks.c b/nest/proto-hooks.c index f0261922..2582c48b 100644 --- a/nest/proto-hooks.c +++ b/nest/proto-hooks.c @@ -268,6 +268,26 @@ int import_control(struct proto *p, rte **e, ea_list **attrs, struct linpool *po { DUMMY; } /** + * rte_recalculate - prepare routes for comparison + * @table: a routing table + * @net: a network entry + * @new: new route for the network + * @old: old route for the network + * @old_best: old best route for the network (may be NULL) + * + * This hook is called when a route change (from @old to @new for a + * @net entry) is propagated to a @table. It may be used to prepare + * routes for comparison by rte_better() in the best route + * selection. @new may or may not be in @net->routes list, + * @old is not there. + * + * Result: 1 if the ordering implied by rte_better() changes enough + * that full best route calculation have to be done, 0 otherwise. + */ +int rte_recalculate(struct rtable *table, struct network *net, struct rte *new, struct rte *old, struct rte *old_best) +{ DUMMY; } + +/** * rte_better - compare metrics of two routes * @new: the new route * @old: the original route |