ns3::Ptr<ns3::Node> node = ns3::CreateObject<ns3::Node> (0);
stack.Install(node);
nodes.Add(node);
- ns3host->node_num = number_of_nodes;
- ns3host->type = NS3_NETWORK_ELEMENT_HOST;
- number_of_nodes++;
+ ns3host->node_num = number_of_nodes ++;
host.extension_set(NS3_EXTENSION_ID, ns3host);
}
{
const char* router_id = router->name();
XBT_DEBUG("NS3_ADD_ROUTER '%s'",router_id);
- xbt_lib_set(as_router_lib, router_id, NS3_ASR_LEVEL, ns3_add_router(router_id)
- );
+ xbt_lib_set(as_router_lib, router_id, NS3_ASR_LEVEL, ns3_add_router(router_id) );
}
#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
xbt_assert(host_src && host_dst, "\tns3_add_link from %d to %d",host_src->node_num,host_dst->node_num);
- ns3_add_link(host_src->node_num,host_src->type,
- host_dst->node_num,host_dst->type,
+ ns3_add_link(host_src->node_num,NS3_NETWORK_ELEMENT_HOST,
+ host_dst->node_num,NS3_NETWORK_ELEMENT_HOST,
bw,lat);
free(router_id);
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_src->type,host_dst->node_num,host_dst->type,link_bdw,link_lat);
+ ns3_add_link(host_src->node_num,NS3_NETWORK_ELEMENT_HOST,host_dst->node_num,NS3_NETWORK_ELEMENT_HOST,link_bdw,link_lat);
xbt_free(link_bdw);
xbt_free(link_lat);
Cluster_nodes.Add(node);
nodes.Add(node);
host->node_num = number_of_nodes;
- host->type = NS3_NETWORK_ELEMENT_HOST;
number_of_nodes++;
return host;
}
stack.Install(node);
nodes.Add(node);
router->node_num = number_of_nodes;
- router->type = NS3_NETWORK_ELEMENT_ROUTER;
number_of_nodes++;
return router;
}