//Search for network_element_t
switch (kind){
case INSTR_HOST:
- newContainer->net_elm = sg_host_edge(sg_host);
- if(!newContainer->net_elm) xbt_die("Element '%s' not found",name);
+ newContainer->netcard = sg_host->pimpl_netcard;
+ if(!newContainer->netcard) xbt_die("Element '%s' not found",name);
break;
case INSTR_ROUTER:
- newContainer->net_elm = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib,name,ROUTING_ASR_LEVEL);
- if(!newContainer->net_elm) xbt_die("Element '%s' not found",name);
+ newContainer->netcard = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib,name,ROUTING_ASR_LEVEL);
+ if(!newContainer->netcard) xbt_die("Element '%s' not found",name);
break;
case INSTR_AS:
- newContainer->net_elm = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib,name,ROUTING_ASR_LEVEL);
- if(!newContainer->net_elm) xbt_die("Element '%s' not found",name);
+ newContainer->netcard = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib,name,ROUTING_ASR_LEVEL);
+ if(!newContainer->netcard) xbt_die("Element '%s' not found",name);
break;
default:
- newContainer->net_elm = NULL;
+ newContainer->netcard = NULL;
break;
}
if (newContainer->kind == INSTR_HOST || newContainer->kind == INSTR_LINK || newContainer->kind == INSTR_ROUTER) {
xbt_dict_set (trivaNodeTypes, newContainer->type->name, xbt_strdup("1"), NULL);
}
-
return newContainer;
}