+}
+
+/**
+ * \brief Returns the route between two workstations
+ *
+ * Use SD_route_get_size() to know the array size.
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return a new array of \ref SD_link_t representating the route between these two workstations
+ * \see SD_route_get_size(), SD_link_t
+ */
+const SD_link_t *SD_route_get_list(SD_workstation_t src,
+ SD_workstation_t dst)
+{
+ void *surf_src;
+ void *surf_dst;
+ xbt_dynar_t surf_route;
+ const char *link_name;
+ void *surf_link;
+ unsigned int cpt;
+
+ if (sd_global->recyclable_route == NULL) {
+ /* first run */
+ sd_global->recyclable_route = xbt_new(SD_link_t, SD_link_get_number());
+ }
+
+ surf_src = src;
+ surf_dst = dst;
+ surf_route =
+ surf_workstation_model->extension.workstation.get_route(surf_src,
+ surf_dst);
+
+ xbt_dynar_foreach(surf_route, cpt, surf_link) {
+ link_name = surf_resource_name(surf_link);
+ sd_global->recyclable_route[cpt] =
+ xbt_lib_get_or_null(link_lib, link_name, SD_LINK_LEVEL);
+ }
+ return sd_global->recyclable_route;
+}
+
+/**
+ * \brief Returns the number of links on the route between two workstations
+ *
+ * \param src a workstation
+ * \param dst another workstation
+ * \return the number of links on the route between these two workstations
+ * \see SD_route_get_list()
+ */
+int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst)
+{
+ return xbt_dynar_length(surf_workstation_model->extension.
+ workstation.get_route(src, dst));
+}