/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/platf_interface.h" // platform creation API internal interface
#include "surf_routing_private.h"
#include "simgrid/platf_interface.h" // platform creation API internal interface
#include "surf_routing_private.h"
int ROUTING_ASR_LEVEL; //Routing level
int COORD_ASR_LEVEL; //Coordinates level
int NS3_ASR_LEVEL; //host node for ns3
int ROUTING_ASR_LEVEL; //Routing level
int COORD_ASR_LEVEL; //Coordinates level
int NS3_ASR_LEVEL; //host node for ns3
xbt_assert(!xbt_lib_get_or_null(host_lib, host->id, ROUTING_HOST_LEVEL),
"Reading a host, processing unit \"%s\" already exists", host->id);
xbt_assert(!xbt_lib_get_or_null(host_lib, host->id, ROUTING_HOST_LEVEL),
"Reading a host, processing unit \"%s\" already exists", host->id);
info->rc_component = current_routing;
info->rc_type = SURF_NETWORK_ELEMENT_HOST;
info->name = xbt_strdup(host->id);
info->rc_component = current_routing;
info->rc_type = SURF_NETWORK_ELEMENT_HOST;
info->name = xbt_strdup(host->id);
info->rc_component = current_routing;
info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
info->name = xbt_strdup(router->id);
info->rc_component = current_routing;
info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
info->name = xbt_strdup(router->id);
(as_router_lib, AS->id, ROUTING_ASR_LEVEL),
"The AS \"%s\" already exists", AS->id);
(as_router_lib, AS->id, ROUTING_ASR_LEVEL),
"The AS \"%s\" already exists", AS->id);
/* search the routing model */
switch(AS->routing){
case A_surfxml_AS_routing_Cluster: model = &routing_models[SURF_MODEL_CLUSTER];break;
/* search the routing model */
switch(AS->routing){
case A_surfxml_AS_routing_Cluster: model = &routing_models[SURF_MODEL_CLUSTER];break;
- xbt_lib_set(as_router_lib, new_as->name, ROUTING_ASR_LEVEL,
+ xbt_lib_set(as_router_lib, info->name, ROUTING_ASR_LEVEL,
s_sg_platf_route_cbarg_t route;
memset(&route,0,sizeof(route));
s_sg_platf_route_cbarg_t route;
memset(&route,0,sizeof(route));
/* Find how src and dst are interconnected */
AS_t common_father, src_father, dst_father;
/* Find how src and dst are interconnected */
AS_t common_father, src_father, dst_father;