route_t e_route = xbt_new0(s_route_t, 1);
e_route->link_list = parsed_link_list;
- if(!strcmp(current_routing->model_desc->name,"RuleBased")) {
+ if (!strcmp(current_routing->model_desc->name,"RuleBased")) {
e_route->src_gateway = (network_element_t) gw_src; // DIRTY HACK possible only
e_route->dst_gateway = (network_element_t) gw_dst; // because of what is in routing_parse_E_ASroute
- }
- else{
- e_route->src_gateway = ((network_element_t)xbt_lib_get_or_null(as_router_lib,gw_src,ROUTING_ASR_LEVEL));
- if(!e_route->src_gateway)
- e_route->src_gateway = ((network_element_t)xbt_lib_get_or_null(host_lib,gw_src,ROUTING_HOST_LEVEL));
- e_route->dst_gateway = ((network_element_t)xbt_lib_get_or_null(as_router_lib,gw_dst,ROUTING_ASR_LEVEL));
- if(!e_route->dst_gateway)
- e_route->dst_gateway = ((network_element_t)xbt_lib_get_or_null(host_lib,gw_dst,ROUTING_HOST_LEVEL));
+ } else {
+ e_route->src_gateway = xbt_lib_get_or_null(as_router_lib, gw_src,
+ ROUTING_ASR_LEVEL);
+ if (!e_route->src_gateway)
+ e_route->src_gateway = xbt_lib_get_or_null(host_lib, gw_src,
+ ROUTING_HOST_LEVEL);
+ e_route->dst_gateway = xbt_lib_get_or_null(as_router_lib, gw_dst,
+ ROUTING_ASR_LEVEL);
+ if (!e_route->dst_gateway)
+ e_route->dst_gateway = xbt_lib_get_or_null(host_lib, gw_dst,
+ ROUTING_HOST_LEVEL);
}
xbt_assert(current_routing->parse_ASroute,
"no defined method \"set_ASroute\" in \"%s\"",
{
route_t e_route = xbt_new0(s_route_t, 1);
e_route->link_list = parsed_link_list;
- e_route->src_gateway = ((network_element_t)xbt_lib_get_or_null(as_router_lib,gw_src,ROUTING_ASR_LEVEL));
- if(!e_route->src_gateway)
- e_route->src_gateway = ((network_element_t)xbt_lib_get_or_null(host_lib,gw_src,ROUTING_HOST_LEVEL));
- e_route->dst_gateway = ((network_element_t)xbt_lib_get_or_null(as_router_lib,gw_dst,ROUTING_ASR_LEVEL));
- if(!e_route->dst_gateway)
- e_route->dst_gateway = ((network_element_t)xbt_lib_get_or_null(host_lib,gw_dst,ROUTING_HOST_LEVEL));
+ e_route->src_gateway = xbt_lib_get_or_null(as_router_lib, gw_src,
+ ROUTING_ASR_LEVEL);
+ if (!e_route->src_gateway)
+ e_route->src_gateway = xbt_lib_get_or_null(host_lib, gw_src,
+ ROUTING_HOST_LEVEL);
+ e_route->dst_gateway = xbt_lib_get_or_null(as_router_lib, gw_dst,
+ ROUTING_ASR_LEVEL);
+ if (!e_route->dst_gateway)
+ e_route->dst_gateway = xbt_lib_get_or_null(host_lib, gw_dst,
+ ROUTING_HOST_LEVEL);
xbt_assert(current_routing->parse_bypassroute,
"Bypassing mechanism not implemented by routing '%s'",
current_routing->name);
network_element_t dst_data = dst;
src_as = src_data->rc_component;
dst_as = dst_data->rc_component;
+#ifndef NDEBUG
char* src_name = src_data->name;
char* dst_name = dst_data->name;
+#endif
xbt_assert(src_as && dst_as,
"Ask for route \"from\"(%s) or \"to\"(%s) no found", src_name, dst_name);
* walk through the routing components tree and find a route between hosts
* by calling the differents "get_route" functions in each routing component.
*/
-void routing_get_route_and_latency(network_element_t src, network_element_t dst,
+void routing_get_route_and_latency(network_element_t src,
+ network_element_t dst,
xbt_dynar_t * route, double *latency)
{
if (!*route) {
"Reading a storage, processing unit \"%s\" already exists", storage->id);
// Verification of an existing type_id
+#ifndef NDEBUG
void* storage_type = xbt_lib_get_or_null(storage_type_lib, storage->type_id,ROUTING_STORAGE_TYPE_LEVEL);
+#endif
xbt_assert(storage_type,"Reading a storage, type id \"%s\" does not exists", storage->type_id);
XBT_DEBUG("ROUTING Create a storage name '%s' with type_id '%s'",
(void *) xbt_strdup(storage->type_id));
}
-typedef struct s_content {
- char *user_rights;
- char *user;
- char *group;
- char *date;
- char *time;
- int size;
-} s_content_t, *content_t;
-
static void free_storage_content(void *p)
{
content_t content = p;
stype->content = parse_storage_content(storage_type->content);
stype->type_id = xbt_strdup(storage_type->id);
- XBT_INFO("ROUTING Create a storage type id '%s' with model '%s' content '%s' and properties '%p'",
+ XBT_DEBUG("ROUTING Create a storage type id '%s' with model '%s' content '%s' and properties '%p'",
stype->type_id,
stype->model,
storage_type->content,
static void routing_parse_mount(sg_platf_mount_cbarg_t mount)
{
// Verification of an existing storage
+#ifndef NDEBUG
void* storage = xbt_lib_get_or_null(storage_lib, mount->id,ROUTING_STORAGE_LEVEL);
+#endif
xbt_assert(storage,"Disk id \"%s\" does not exists", mount->id);
XBT_DEBUG("ROUTING Mount '%s' on '%s'",mount->id, mount->name);