- //create link ns3
- HostNs3* host_src = ns3_find_host(src);
- if (!host_src)
- host_src = static_cast<HostNs3*>(xbt_lib_get_or_null(as_router_lib, src, NS3_ASR_LEVEL));
- HostNs3* host_dst = ns3_find_host(dst);
- if(!host_dst)
- host_dst = static_cast<HostNs3*>(xbt_lib_get_or_null(as_router_lib, dst, NS3_ASR_LEVEL));
-
- if (!host_src || !host_dst)
- 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);
-
- xbt_free(link_bdw);
- xbt_free(link_lat);
- }