X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ae7bffe6655b934fc4a09ca1a34e10de5d8dd366..59edffecb0a76e4bc29b38a7562e7179a59a8c4a:/src/surf/surf_routing.cpp?ds=sidebyside diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 439f9d8774..e50939ced3 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -75,7 +75,6 @@ As* routing_get_current() return current_routing; } -static void routing_parse_peer(sg_platf_peer_cbarg_t peer); /* peer bypass */ // static void routing_parse_Srandom(void); /* random bypass */ static void routing_parse_postparse(void); @@ -195,18 +194,6 @@ RoutingEdge *routing_add_host(As* current_routing, sg_platf_host_cbarg_t host) return routingEdge; } -/** - * \brief Store the route by calling the set_route function of the current routing component - */ -static void parse_E_route(sg_platf_route_cbarg_t route) -{ - /*FIXME:REMOVE:xbt_assert(current_routing->parse_route, - "no defined method \"set_route\" in \"%s\"", - current_routing->name);*/ - - current_routing->parseRoute(route); -} - /** * \brief Store the ASroute by calling the set_ASroute function of the current routing component */ @@ -218,30 +205,7 @@ static void parse_E_ASroute(sg_platf_route_cbarg_t ASroute) current_routing->parseASroute(ASroute); } -/** - * \brief Store the bypass route by calling the set_bypassroute function of the current routing component - */ -static void parse_E_bypassRoute(sg_platf_route_cbarg_t route) -{ - /*FIXME:REMOVE:xbt_assert(current_routing->parse_bypassroute, - "Bypassing mechanism not implemented by routing '%s'", - current_routing->name);*/ - - current_routing->parseBypassroute(route); -} - -/** - * \brief Store the bypass route by calling the set_bypassroute function of the current routing component - */ -static void parse_E_bypassASroute(sg_platf_route_cbarg_t ASroute) -{ - /*FIXME:REMOVE:xbt_assert(current_routing->parse_bypassroute, - "Bypassing mechanism not implemented by routing '%s'", - current_routing->name);*/ - current_routing->parseBypassroute(ASroute); -} - -static void routing_parse_trace(sg_platf_trace_cbarg_t trace) +void sg_platf_new_trace(sg_platf_trace_cbarg_t trace) { tmgr_trace_t tmgr_trace; if (!trace->file || strcmp(trace->file, "") != 0) { @@ -256,7 +220,7 @@ static void routing_parse_trace(sg_platf_trace_cbarg_t trace) xbt_dict_set(traces_set_list, trace->id, (void *) tmgr_trace, NULL); } -static void routing_parse_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect) +void sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect) { xbt_assert(xbt_dict_get_or_null (traces_set_list, trace_connect->trace), @@ -700,7 +664,7 @@ void routing_cluster_add_backbone(void* bb) { XBT_DEBUG("Add a backbone to AS '%s'", current_routing->p_name); } -static void routing_parse_cabinet(sg_platf_cabinet_cbarg_t cabinet) +void sg_platf_new_cabinet(sg_platf_cabinet_cbarg_t cabinet) { int start, end, i; char *groups , *host_id , *link_id = NULL; @@ -772,7 +736,7 @@ static void routing_parse_cabinet(sg_platf_cabinet_cbarg_t cabinet) xbt_dynar_free(&radical_elements); } -static void routing_parse_cluster(sg_platf_cluster_cbarg_t cluster) +void routing_new_cluster(sg_platf_cluster_cbarg_t cluster) { char *host_id, *groups, *link_id = NULL; xbt_dict_t patterns = NULL; @@ -1029,7 +993,7 @@ static void routing_parse_postparse(void) { xbt_dict_free(&random_value); } -static void routing_parse_peer(sg_platf_peer_cbarg_t peer) +void sg_platf_new_peer(sg_platf_peer_cbarg_t peer) { char *host_id = NULL; char *link_id = NULL; @@ -1251,21 +1215,9 @@ static void check_disk_attachment() void routing_register_callbacks() { - sg_platf_route_add_cb(parse_E_route); - sg_platf_ASroute_add_cb(parse_E_ASroute); - sg_platf_bypassRoute_add_cb(parse_E_bypassRoute); - sg_platf_bypassASroute_add_cb(parse_E_bypassASroute); - - sg_platf_cluster_add_cb(routing_parse_cluster); - sg_platf_cabinet_add_cb(routing_parse_cabinet); - - sg_platf_peer_add_cb(routing_parse_peer); sg_platf_postparse_add_cb(routing_parse_postparse); sg_platf_postparse_add_cb(check_disk_attachment); - sg_platf_trace_add_cb(routing_parse_trace); - sg_platf_trace_connect_add_cb(routing_parse_trace_connect); - instr_routing_define_callbacks(); }