1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "ns3_interface.h"
8 #include "ns3/core-module.h"
9 #include "ns3/simulator-module.h"
10 #include "ns3/node-module.h"
11 #include "ns3/helper-module.h"
12 #include "ns3/global-route-manager.h"
16 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(interface_ns3, surf,
17 "Logging specific to the SURF network NS3 module");
20 int number_of_nodes = 0;
22 void * ns3_add_host(char * id)
24 ns3_nodes_t host = xbt_new0(s_ns3_nodes_t,1);
25 XBT_INFO("Interface ns3 add host '%s'",id);
26 Ptr<Node> node = CreateObject<Node> (0);
28 host->node_num = number_of_nodes;
29 host->type = NS3_NETWORK_ELEMENT_HOST;
35 void * ns3_add_router(char * id)
37 ns3_nodes_t router = xbt_new0(s_ns3_nodes_t,1);
38 XBT_INFO("Interface ns3 add router '%s'",id);
39 Ptr<Node> node = CreateObject<Node> (0);
41 router->node_num = number_of_nodes;
42 router->type = NS3_NETWORK_ELEMENT_ROUTER;
48 void * ns3_add_AS(char * id)
50 XBT_INFO("Interface ns3 add AS '%s'",id);