From be4cd99a3688cef19f66e1c8b8e0506ffc1e13fc Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 22 Dec 2011 13:20:29 +0100 Subject: Implements deterministic MED handling. Thanks to Alexander V. Chernikov for many suggestions. --- nest/proto-hooks.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'nest/proto-hooks.c') diff --git a/nest/proto-hooks.c b/nest/proto-hooks.c index f026192..2582c48 100644 --- a/nest/proto-hooks.c +++ b/nest/proto-hooks.c @@ -267,6 +267,26 @@ void store_tmp_attrs(rte *e, ea_list *attrs) int import_control(struct proto *p, rte **e, ea_list **attrs, struct linpool *pool) { 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 -- cgit v1.2.3