if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
- ns3_add_link(host_src->node_num,host_dst->node_num,bw,lat);
+ ns3_add_link(host_src->node_num,host_src->type,
+ host_dst->node_num,host_dst->type,
+ bw,lat);
free(router_id);
free(host_id);
if(host_src && host_dst){}
else xbt_die("\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
- ns3_add_link(host_src->node_num,host_dst->node_num,link_bdw,link_lat);
+ ns3_add_link(host_src->node_num,host_src->type,host_dst->node_num,host_dst->type,link_bdw,link_lat);
xbt_free(link_bdw);
xbt_free(link_lat);
}
}
-static void define_callbacks_ns3(const char *filename)
+static void define_callbacks_ns3(void)
{
surfxml_add_callback(STag_surfxml_host_cb_list, &parse_ns3_add_host); //HOST
surfxml_add_callback(STag_surfxml_router_cb_list, &parse_ns3_add_router); //ROUTER
}
#endif
-void surf_network_model_init_NS3(const char *filename)
+void surf_network_model_init_NS3()
{
if (surf_network_model)
return;
}
routing_model_create(sizeof(s_surf_ns3_link_t), NULL, NULL);
- define_callbacks_ns3(filename);
+ define_callbacks_ns3();
NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
NS3_ASR_LEVEL = xbt_lib_add_level(as_router_lib,(void_f_pvoid_t)free_ns3_host);
{
ns3_finalize();
xbt_dynar_free_container(&IPV4addr);
+ xbt_dict_free(&dict_socket);
}
static double ns3_share_resources(double min)
if(ns3_get_socket_is_finished(data) == 1){
xbt_dynar_push(socket_to_destroy,&key);
+ XBT_DEBUG("Destroy socket %p of action %p", key, action);
action->generic_action.finish = now;
surf_action_state_set(&(action->generic_action), SURF_ACTION_DONE);
}