/* Global vars */
routing_global_t global_routing = NULL;
routing_component_t current_routing = NULL;
-model_type_t current_routing_model = NULL;
+routing_model_description_t current_routing_model = NULL;
/* global parse functions */
xbt_dynar_t link_list = NULL; /* temporary store of current list link of a route */
*/
static void routing_parse_E_route(void)
{
- name_route_extended_t route = xbt_new0(s_name_route_extended_t, 1);
+ route_extended_t route = xbt_new0(s_route_extended_t, 1);
route->generic_route.link_list = link_list;
xbt_assert(current_routing->parse_route,
"no defined method \"set_route\" in \"%s\"",
*/
static void routing_parse_E_ASroute(void)
{
- name_route_extended_t e_route = xbt_new0(s_name_route_extended_t, 1);
+ route_extended_t e_route = xbt_new0(s_route_extended_t, 1);
e_route->generic_route.link_list = link_list;
e_route->src_gateway = xbt_strdup(gw_src);
e_route->dst_gateway = xbt_strdup(gw_dst);
void routing_AS_begin(const char *AS_id, const char *wanted_routing_type)
{
routing_component_t new_routing;
- model_type_t model = NULL;
+ routing_model_description_t model = NULL;
int cpt;
- surf_parse_models_setup(); /* ensure that the models are created after the last <config> tag and before the first <AS>-like */
-
/* search the routing model */
for (cpt = 0; routing_models[cpt].name; cpt++)
if (!strcmp(wanted_routing_type, routing_models[cpt].name))
return latency;
}
-static int surf_parse_models_setup_already_called = 0;
-/* Call the last initialization functions, that must be called after the
- * <config> tag, if any, and before the first of cluster|peer|AS|trace|trace_connect
- */
-void surf_parse_models_setup()
-{
- if (surf_parse_models_setup_already_called)
- return;
- surf_parse_models_setup_already_called = 1;
- surf_config_models_setup();
-}
-
-
/**
* \brief Recursive function for finalize
*
* \brief Generic method: delete all the routing structures
*
* walk through the routing components tree and delete the structures
- * by calling the differents "finalize" functions in each routing component
+ * by calling the different "finalize" functions in each routing component
*/
static void finalize(void)
{
xbt_dynar_free(&(global_routing->last_route));
/* delete global routing structure */
xbt_free(global_routing);
- /* make sure that we will reinit the models while loading the platf once reinited -- HACK but there is no proper surf_routing_init() */
- surf_parse_models_setup_already_called = 0;
}
static xbt_dynar_t recursive_get_onelink_routes(routing_component_t rc)