X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bbab4619c1dbcfedc93e2d14812a684119c75136..3072be2de56fbf379bb67604b4aef9701cc76244:/src/surf/surf_routing_vivaldi.c?ds=sidebyside diff --git a/src/surf/surf_routing_vivaldi.c b/src/surf/surf_routing_vivaldi.c index d53c81233f..687bc872ff 100644 --- a/src/surf/surf_routing_vivaldi.c +++ b/src/surf/surf_routing_vivaldi.c @@ -7,22 +7,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf"); -/* Routing model structure */ - -typedef struct { - s_routing_component_t generic_routing; - xbt_dict_t dict_processing_units; - xbt_dict_t dict_autonomous_systems; -} s_routing_component_vivaldi_t, *routing_component_vivaldi_t; - -/* Parse routing model functions */ - -static route_extended_t vivaldi_get_route(routing_component_t rc, - const char *src, - const char *dst); - /* Business methods */ -static route_extended_t vivaldi_get_route(routing_component_t rc, +static route_extended_t vivaldi_get_route(AS_t rc, const char *src, const char *dst) { @@ -70,7 +56,7 @@ static double base_vivaldi_get_latency (const char *src, const char *dst) return euclidean_dist / 1000; } -static double vivaldi_get_link_latency (routing_component_t rc,const char *src, const char *dst, route_extended_t e_route) +static double vivaldi_get_link_latency (AS_t rc,const char *src, const char *dst, route_extended_t e_route) { if(get_network_element_type(src) == SURF_NETWORK_ELEMENT_AS) { int need_to_clean = e_route?0:1; @@ -85,10 +71,10 @@ static double vivaldi_get_link_latency (routing_component_t rc,const char *src, } /* Creation routing model functions */ -void *model_vivaldi_create(void) +AS_t model_vivaldi_create(void) { - routing_component_vivaldi_t new_component = model_none_create(); - new_component->generic_routing.get_route = vivaldi_get_route; - new_component->generic_routing.get_latency = vivaldi_get_link_latency; + AS_t new_component = model_none_create(); + new_component->get_route = vivaldi_get_route; + new_component->get_latency = vivaldi_get_link_latency; return new_component; }