-/*Get Latency*/
-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)
-{
- if (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_t tmp_sons = as->routing_sons;
- char *tmp_name = as->name;
- xbt_dict_free(&tmp_sons);
- xbt_free(tmp_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)
-{
- /* delete recursively all the tree */
- finalize_rec(global_routing->root);
- /* delete last_route */
- xbt_dynar_free(&(global_routing->last_route));
- /* delete global routing structure */
- xbt_free(global_routing);
-}
-