Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: variable&fields renaming
[simgrid.git] / src / surf / surf_routing_rulebased.c
index 2e5a948..357c33d 100644 (file)
@@ -8,8 +8,6 @@
 
 /* Global vars */
 extern routing_global_t global_routing;
-extern AS_t current_routing;
-extern routing_model_description_t current_routing_model;
 extern xbt_dynar_t link_list;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_rulebased, surf, "Routing part of surf");
@@ -94,7 +92,7 @@ static void model_rulebased_parse_route(AS_t rc,
   const char *error;
   int erroffset;
 
-  if(!strcmp(rc->routing->name,"Vivaldi")){
+  if(!strcmp(rc->model_desc->name,"Vivaldi")){
          if(xbt_dynar_length(route->generic_route.link_list) != 0)
                  xbt_die("You can't have link_ctn with Model Vivaldi.");
   }
@@ -122,7 +120,7 @@ static void model_rulebased_parse_ASroute(AS_t rc,
   const char *error;
   int erroffset;
 
-  if(!strcmp(rc->routing->name,"Vivaldi")){
+  if(!strcmp(rc->model_desc->name,"Vivaldi")){
          if(xbt_dynar_length(route->generic_route.link_list) != 0)
                  xbt_die("You can't have link_ctn with Model Vivaldi.");
   }
@@ -232,7 +230,7 @@ static xbt_dynar_t rulebased_get_onelink_routes(AS_t rc)
   //find router
   char *router = NULL;
   xbt_dict_foreach(routing->dict_processing_units, c1, k1, d1) {
-    if (rc->get_network_element_type(k1) == SURF_NETWORK_ELEMENT_ROUTER){
+    if (routing_get_network_element_type(k1) == SURF_NETWORK_ELEMENT_ROUTER){
       router = k1;
     }
   }
@@ -397,7 +395,7 @@ static void rulebased_finalize(AS_t rc)
 AS_t model_rulebased_create(void) {
 
   routing_component_rulebased_t new_component = (routing_component_rulebased_t)
-      routmod_generic_create(sizeof(s_routing_component_rulebased_t));
+      model_generic_create_sized(sizeof(s_routing_component_rulebased_t));
 
   new_component->generic_routing.parse_PU = model_rulebased_parse_PU;
   new_component->generic_routing.parse_AS = model_rulebased_parse_AS;