-static double get_latency(const char *src, const char *dst) {
- double latency = -1.0;
- get_route_latency(src, dst, NULL, &latency, 0);
- return latency;
-}
-
-/**
- * \brief Recursive function for finalize
- *
- * \param rc the source host name
- *
- * This fuction is call by "finalize". It allow to finalize the
- * AS or routing components. It delete all the structures.
- */
-static void finalize_rec(AS_t as) {
- xbt_dict_cursor_t cursor = NULL;
- char *key;
- AS_t elem;
-
- xbt_dict_foreach(as->routing_sons, cursor, key, elem)
- finalize_rec(elem);
-
- xbt_dict_free(&as->routing_sons);
- xbt_free(as->name);
- as->finalize(as);
-}
-
-/**
- * \brief Generic method: delete all the routing structures
- *
- * walk through the routing components tree and delete the structures
- * by calling the different "finalize" functions in each routing component
- */
-static void finalize(void) {
- finalize_rec(global_routing->root);
- xbt_dynar_free(&global_routing->last_route);
- xbt_free(global_routing);
-}
-