Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill global_routing->get_route_no_cleanup()
[simgrid.git] / src / surf / surf_routing.c
index 42790c6..5f3e568 100644 (file)
@@ -627,7 +627,16 @@ static void _get_route_and_latency(const char *src, const char *dst,
 }
 
 /**
- * \brief Generic function for get_route, get_route_no_cleanup, and get_latency
+ * \brief Find a route between hosts
+ *
+ * \param src the source host name
+ * \param dst the destination host name
+ * \param route where to store the list of links (or NULL if you are not interested in it)
+ * \param latency where to store the latency experienced on the path (or NULL if not interested)
+ * \param cleanup boolean whether the dynar should be automatically destroyed or not
+ *
+ * walk through the routing components tree and find a route between hosts
+ * by calling the differents "get_route" functions in each routing component.
  */
 void routing_get_route_and_latency(const char *src, const char *dst,
                               xbt_dynar_t * route, double *latency, int cleanup)
@@ -644,39 +653,6 @@ void routing_get_route_and_latency(const char *src, const char *dst,
   }
 }
 
-/**
- * \brief Find a route between hosts
- *
- * \param src the source host name 
- * \param dst the destination host name
- * 
- * walk through the routing components tree and find a route between hosts
- * by calling the differents "get_route" functions in each routing component.
- * No need to free the returned dynar. It will be freed at the next call.
- */
-xbt_dynar_t routing_get_route(const char *src, const char *dst) {
-  xbt_dynar_t route = NULL;
-  routing_get_route_and_latency(src, dst, &route, NULL, 1);
-  return route;
-}
-
-/**
- * \brief Generic method: find a route between hosts
- *
- * \param src the source host name
- * \param dst the destination host name
- *
- * walk through the routing components tree and find a route between hosts
- * by calling the differents "get_route" functions in each routing component.
- * Leaves the caller the responsability to clean the returned dynar.
- */
-static xbt_dynar_t get_route_no_cleanup(const char *src, const char *dst)
-{
-  xbt_dynar_t route = NULL;
-  routing_get_route_and_latency(src, dst, &route, NULL, 0);
-  return route;
-}
-
 static xbt_dynar_t recursive_get_onelink_routes(AS_t rc)
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(onelink_t), xbt_free);
@@ -735,7 +711,6 @@ void routing_model_create(size_t size_of_links, void *loopback)
   /* config the uniq global routing */
   global_routing = xbt_new0(s_routing_global_t, 1);
   global_routing->root = NULL;
-  global_routing->get_route_no_cleanup = get_route_no_cleanup;
   global_routing->get_onelink_routes = get_onelink_routes;
   global_routing->loopback = loopback;
   global_routing->size_of_link = size_of_links;