Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the routing stuff to its namespace
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 18 Jun 2016 21:43:29 +0000 (23:43 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 19 Jun 2016 19:55:09 +0000 (21:55 +0200)
45 files changed:
include/simgrid/forward.h
include/simgrid/s4u/As.hpp
include/simgrid/s4u/host.hpp
src/include/surf/surf.h
src/s4u/s4u_as.cpp
src/surf/AsCluster.cpp
src/surf/AsCluster.hpp
src/surf/AsClusterDragonfly.cpp
src/surf/AsClusterDragonfly.hpp
src/surf/AsClusterFatTree.cpp
src/surf/AsClusterFatTree.hpp
src/surf/AsClusterTorus.cpp
src/surf/AsClusterTorus.hpp
src/surf/AsDijkstra.cpp
src/surf/AsDijkstra.hpp
src/surf/AsFloyd.cpp
src/surf/AsFloyd.hpp
src/surf/AsFull.cpp
src/surf/AsFull.hpp
src/surf/AsImpl.cpp
src/surf/AsImpl.hpp
src/surf/AsNone.cpp
src/surf/AsNone.hpp
src/surf/AsRoutedGraph.cpp
src/surf/AsRoutedGraph.hpp
src/surf/AsVivaldi.cpp
src/surf/AsVivaldi.hpp
src/surf/HostImpl.cpp
src/surf/HostImpl.hpp
src/surf/instr_routing.cpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_ib.cpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/surf_interface.cpp
src/surf/surf_routing.cpp
src/surf/surf_routing.hpp
teshsuite/simdag/is-router/is-router.cpp

index 3e2ac32..a4ef9bd 100644 (file)
@@ -21,9 +21,11 @@ namespace simgrid {
   namespace surf {
     class Resource;
     class Cpu;
-    class NetCard;
     class Link;
   }
+  namespace routing {
+    class NetCard;
+  }    
   namespace trace_mgr {
     class trace;
     class future_evt_set;
@@ -35,7 +37,7 @@ typedef simgrid::s4u::Host simgrid_Host;
 typedef simgrid::s4u::Mailbox simgrid_Mailbox;
 typedef simgrid::simix::Synchro simix_Synchro;
 typedef simgrid::surf::Cpu surf_Cpu;
-typedef simgrid::surf::NetCard surf_NetCard;
+typedef simgrid::routing::NetCard routing_NetCard;
 typedef simgrid::surf::Link Link;
 typedef simgrid::surf::Resource surf_Resource;
 typedef simgrid::trace_mgr::trace tmgr_Trace;
@@ -47,7 +49,7 @@ typedef struct simgrid_Host simgrid_Host;
 typedef struct simgrid_Mailbox simgrid_Mailbox;
 typedef struct simix_Synchro simix_Synchro;
 typedef struct surf_Cpu surf_Cpu;
-typedef struct surf_NetCard surf_NetCard;
+typedef struct routing_NetCard routing_NetCard;
 typedef struct surf_Resource surf_Resource;
 typedef struct Link Link;
 typedef struct Trace tmgr_Trace;
@@ -60,7 +62,7 @@ typedef simgrid_Mailbox* sg_mbox_t;
 typedef simix_Synchro *smx_synchro_t;
 
 typedef surf_Cpu *surf_cpu_t;
-typedef surf_NetCard *sg_netcard_t;
+typedef routing_NetCard *sg_netcard_t;
 typedef surf_Resource *sg_resource_t;
 
 // Types which are in fact dictelmt:
index 445424f..3106d01 100644 (file)
 namespace simgrid {
 
 namespace surf {
-  class AsImpl;
   class Link;
+}
+namespace routing {
+  class AsImpl;
   class NetCard;
 }
 namespace s4u {
@@ -31,7 +33,7 @@ namespace s4u {
  */
 XBT_PUBLIC_CLASS As {
 protected:
-  friend simgrid::surf::AsImpl;
+  friend simgrid::routing::AsImpl;
 
   explicit As(const char *name);
   virtual ~As();
@@ -47,7 +49,7 @@ public:
   As *father_ = nullptr; // FIXME: hide me
 public:
   /* Add content to the AS, at parsing time. It should be sealed afterward. */
-  virtual int addComponent(surf::NetCard *elm); /* A host, a router or an AS, whatever */
+  virtual int addComponent(routing::NetCard *elm); /* A host, a router or an AS, whatever */
   virtual void addRoute(sg_platf_route_cbarg_t route);
   void addBypassRoute(sg_platf_route_cbarg_t e_route);
 
index 6a4103e..4283ab5 100644 (file)
@@ -100,7 +100,7 @@ public:
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
   surf::Cpu     *pimpl_cpu = nullptr;
   /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
-  surf::NetCard *pimpl_netcard = nullptr;
+  routing::NetCard *pimpl_netcard = nullptr;
 
 public:
   /*** Called on each newly created object */
index 478cf52..be7819f 100644 (file)
@@ -52,6 +52,8 @@ class NetworkCm02Link;
 class Action;
 class ActionLmm;
 class StorageActionLmm;
+}
+namespace routing {
 class RoutingPlatf;
 }
 }
@@ -70,7 +72,7 @@ typedef simgrid::surf::NetworkCm02Link surf_NetworkCm02Link;
 typedef simgrid::surf::Action surf_Action;
 typedef simgrid::surf::ActionLmm surf_ActionLmm;
 typedef simgrid::surf::StorageActionLmm surf_StorageActionLmm;
-typedef simgrid::surf::RoutingPlatf surf_RoutingPlatf;
+typedef simgrid::routing::RoutingPlatf surf_RoutingPlatf;
 
 #else
 
index 7dae44a..14827e0 100644 (file)
@@ -57,7 +57,7 @@ namespace simgrid {
       xbt_dynar_t res =  xbt_dynar_new(sizeof(sg_host_t), nullptr);
 
       for (unsigned int index = 0; index < xbt_dynar_length(vertices_); index++) {
-        simgrid::surf::NetCard *card = xbt_dynar_get_as(vertices_, index, simgrid::surf::NetCard*);
+        simgrid::routing::NetCard *card = xbt_dynar_get_as(vertices_, index, simgrid::routing::NetCard*);
         simgrid::s4u::Host     *host = simgrid::s4u::Host::by_name_or_null(card->name());
         if (host!=nullptr)
           xbt_dynar_push(res, &host);
@@ -65,8 +65,8 @@ namespace simgrid {
       return res;
     }
 
-    int As::addComponent(surf::NetCard *elm) {
-      xbt_dynar_push_as(vertices_, surf::NetCard*, elm);
+    int As::addComponent(routing::NetCard *elm) {
+      xbt_dynar_push_as(vertices_, routing::NetCard*, elm);
       return xbt_dynar_length(vertices_)-1;
     }
 
index cd81e1e..228a0fa 100644 (file)
@@ -12,7 +12,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"
  * Note that a router is created, easing the interconnexion with the rest of the world. */
 
 namespace simgrid {
-namespace surf {
+namespace routing {
   AsCluster::AsCluster(const char*name)
     : AsImpl(name)
   {}
index 80a93ff..8e79c33 100644 (file)
@@ -3,13 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SURF_ROUTING_CLUSTER_HPP_
-#define SURF_ROUTING_CLUSTER_HPP_
+#ifndef SIMGRID_ROUTING_CLUSTER_HPP_
+#define SIMGRID_ROUTING_CLUSTER_HPP_
 
 #include "src/surf/AsImpl.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 class XBT_PRIVATE AsCluster: public AsImpl {
 public:
@@ -36,4 +36,4 @@ public:
 }
 }
 
-#endif /* SURF_ROUTING_CLUSTER_HPP_ */
+#endif /* SIMGRID_ROUTING_CLUSTER_HPP_ */
index a99a296..663da3a 100644 (file)
@@ -14,12 +14,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_dragonfly, surf_route_cluster
 
 
 
-
-
-
-
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 AsClusterDragonfly::AsClusterDragonfly(const char*name)
   : AsCluster(name) {
index 7bca70d..115abfb 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/surf/AsCluster.hpp"
 
 namespace simgrid {
-  namespace surf {
+  namespace routing {
 
 
 class XBT_PRIVATE DragonflyRouter {
@@ -17,10 +17,10 @@ class XBT_PRIVATE DragonflyRouter {
       unsigned int group_;
       unsigned int chassis_;
       unsigned int blade_;
-      Link** blueLinks_=NULL;
-      Link** blackLinks_=NULL;
-      Link** greenLinks_=NULL;
-      Link** myNodes_=NULL;
+      surf::Link** blueLinks_=NULL;
+      surf::Link** blackLinks_=NULL;
+      surf::Link** greenLinks_=NULL;
+      surf::Link** myNodes_=NULL;
       DragonflyRouter(int i, int j, int k);
       ~DragonflyRouter();
 };
@@ -59,7 +59,8 @@ class XBT_PRIVATE DragonflyRouter {
  *    is also not realistic, as blue level can use more links than a single
  *    Aries can handle, thus it should use several routers.
  */
-class XBT_PRIVATE AsClusterDragonfly:public simgrid::surf::AsCluster {
+class XBT_PRIVATE AsClusterDragonfly
+  : public AsCluster {
     public:
       explicit AsClusterDragonfly(const char*name);
       ~AsClusterDragonfly() override;
index 263d2d5..8fea21e 100644 (file)
@@ -21,7 +21,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_fat_tree, surf, "Routing for fat trees");
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 AsClusterFatTree::AsClusterFatTree(const char*name)
   : AsCluster(name)
index f42da50..0b36185 100644 (file)
@@ -3,13 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SURF_ROUTING_CLUSTER_FAT_TREE_HPP_
-#define SURF_ROUTING_CLUSTER_FAT_TREE_HPP_
+#ifndef SIMGRID_ROUTING_CLUSTER_FAT_TREE_HPP_
+#define SIMGRID_ROUTING_CLUSTER_FAT_TREE_HPP_
 
 #include "src/surf/AsCluster.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 class XBT_PRIVATE FatTreeLink;
 
index 946b349..acf6ebf 100644 (file)
@@ -25,7 +25,7 @@ inline unsigned int *rankId_to_coords(int rankId, xbt_dynar_t dimensions)
 
 
 namespace simgrid {
-  namespace surf {
+  namespace routing {
     AsClusterTorus::AsClusterTorus(const char*name)
       : AsCluster(name) {
     }
index f91735e..6571971 100644 (file)
@@ -9,9 +9,9 @@
 #include "src/surf/AsCluster.hpp"
 
 namespace simgrid {
-  namespace surf {
+  namespace routing {
 
-    class XBT_PRIVATE AsClusterTorus:public simgrid::surf::AsCluster {
+    class XBT_PRIVATE AsClusterTorus : public simgrid::routing::AsCluster {
     public:
       explicit AsClusterTorus(const char*name);
       ~AsClusterTorus() override;
index 420b699..377d2d3 100644 (file)
@@ -37,7 +37,7 @@ static void graph_edge_data_free(void *e) // FIXME: useless code duplication
 /* Utility functions */
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 void AsDijkstra::seal()
 {
   xbt_node_t node = nullptr;
index 302d650..7d315a7 100644 (file)
@@ -23,7 +23,7 @@ typedef struct route_cache_element {
 } s_route_cache_element_t, *route_cache_element_t;
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /***********
  * Classes *
index 99ab0df..7949cf2 100644 (file)
@@ -15,7 +15,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
 #define TO_FLOYD_LINK(i,j) (linkTable_)[(i)+(j)*table_size]
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 AsFloyd::AsFloyd(const char*name)
   : AsRoutedGraph(name)
index 60e7a16..2cc4cf2 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/surf/AsRoutedGraph.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /** Floyd routing data: slow initialization, fast lookup, lesser memory requirements, shortest path routing only */
 class XBT_PRIVATE AsFloyd: public AsRoutedGraph {
index c2b4ca5..3b931a3 100644 (file)
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
 #define TO_ROUTE_FULL(i,j) routingTable_[(i)+(j)*table_size]
 
 namespace simgrid {
-namespace surf {
+namespace routing {
   AsFull::AsFull(const char*name)
     : AsRoutedGraph(name)
   {
index fdf757f..cfd7e5e 100644 (file)
@@ -3,13 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SURF_ROUTING_FULL_HPP_
-#define SURF_ROUTING_FULL_HPP_
+#ifndef SIMGRID_ROUTING_FULL_HPP_
+#define SIMGRID_ROUTING_FULL_HPP_
 
 #include "src/surf/AsRoutedGraph.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /** Full routing: fast, large memory requirements, fully expressive */
 class XBT_PRIVATE AsFull: public AsRoutedGraph {
@@ -28,4 +28,4 @@ public:
 }
 }
 
-#endif /* SURF_ROUTING_FULL_HPP_ */
+#endif /* SIMGRID_ROUTING_FULL_HPP_ */
index 780056b..291a79b 100644 (file)
@@ -11,7 +11,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(AsImpl,surf, "Implementation of S4U autonomous systems");
 
 namespace simgrid {
-  namespace surf {
+  namespace routing {
 
     AsImpl::AsImpl(const char *name)
     : As(name)
@@ -79,7 +79,7 @@ namespace simgrid {
 
 
     /* PRECONDITION: this is the common ancestor of src and dst */
-    std::vector<surf::Link*> *AsImpl::getBypassRoute(surf::NetCard *src, surf::NetCard *dst)
+    std::vector<surf::Link*> *AsImpl::getBypassRoute(routing::NetCard *src, routing::NetCard *dst)
     {
       // If never set a bypass route return nullptr without any further computations
       XBT_DEBUG("generic_get_bypassroute from %s to %s", src->name(), dst->name());
@@ -164,7 +164,7 @@ namespace simgrid {
      * \param links Where to store the links and the gw information
      * \param latency If not nullptr, the latency of all links will be added in it
      */
-    void AsImpl::getRouteRecursive(surf::NetCard *src, surf::NetCard *dst,
+    void AsImpl::getRouteRecursive(routing::NetCard *src, routing::NetCard *dst,
         /* OUT */ std::vector<surf::Link*> * links, double *latency)
     {
       s_sg_platf_route_cbarg_t route;
index 66df50f..5e64ccd 100644 (file)
@@ -14,7 +14,7 @@
 #include "src/surf/xml/platf_private.hpp" // FIXME: kill sg_platf_route_cbarg_t to remove that UGLY include
 
 namespace simgrid {
-namespace surf {
+namespace routing {
   class RoutingPlatf; // FIXME: KILLME
 
 /** @brief Autonomous Systems
@@ -23,7 +23,7 @@ namespace surf {
  * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).
  */
 XBT_PUBLIC_CLASS AsImpl : public s4u::As {
-  friend simgrid::surf::RoutingPlatf;
+  friend simgrid::routing::RoutingPlatf;
 protected:
   explicit AsImpl(const char *name);
   ~AsImpl() override;
@@ -53,13 +53,13 @@ public:
    * @param into Container into which the traversed links should be pushed
    * @param latency Accumulator in which the latencies should be added (caller must set it to 0)
    */
-  virtual void getRouteAndLatency(surf::NetCard *src, surf::NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0;
+  virtual void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0;
   /** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
   virtual xbt_dynar_t getOneLinkRoutes();
-  std::vector<surf::Link*> *getBypassRoute(surf::NetCard *src, surf::NetCard *dst);
+  std::vector<surf::Link*> *getBypassRoute(routing::NetCard *src, routing::NetCard *dst);
 
   virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0;
-  static void getRouteRecursive(surf::NetCard *src, surf::NetCard *dst, /* OUT */ std::vector<surf::Link*> * links, double *latency);
+  static void getRouteRecursive(routing::NetCard *src, routing::NetCard *dst, /* OUT */ std::vector<surf::Link*> * links, double *latency);
 
 
   enum class RoutingMode {
@@ -69,7 +69,7 @@ public:
   };
   /* FIXME: protect the following fields once the construction madness is sorted out */
   RoutingMode hierarchy_ = RoutingMode::unset;
-  surf::NetCard *netcard_ = nullptr; // Our representative in the father AS
+  routing::NetCard *netcard_ = nullptr; // Our representative in the father AS
 };
 
 }}; // Namespace simgrid::s4u
index 396a9fc..4d4dfbf 100644 (file)
@@ -8,7 +8,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 AsNone::AsNone(const char*name)
   : AsImpl(name)
 {}
index cc51670..30708f9 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/surf/AsImpl.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /** No specific routing. Mainly useful with the constant network model */
 class XBT_PRIVATE AsNone : public AsImpl {
index ee1f3c5..c849af3 100644 (file)
@@ -23,7 +23,7 @@ void routing_route_free(sg_platf_route_cbarg_t route)
 }
 
 namespace simgrid {
-namespace surf {
+namespace routing {
   
 AsRoutedGraph::AsRoutedGraph(const char*name)
   : AsImpl(name)
@@ -83,7 +83,7 @@ xbt_edge_t new_xbt_graph_edge(xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt
 }
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
   xbt_dynar_t AsRoutedGraph::getOneLinkRoutes()
   {
index ac49bbe..c5fb0ad 100644 (file)
@@ -3,13 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef SURF_ROUTING_GENERIC_HPP_
-#define SURF_ROUTING_GENERIC_HPP_
+#ifndef SIMGRID_ROUTING_GENERIC_HPP_
+#define SIMGRID_ROUTING_GENERIC_HPP_
 
 #include "src/surf/AsImpl.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 class XBT_PRIVATE AsRoutedGraph : public AsImpl {
 public:
@@ -28,4 +28,4 @@ protected:
 }
 }
 
-#endif /* SURF_ROUTING_GENERIC_HPP_ */
+#endif /* SIMGRID_ROUTING_GENERIC_HPP_ */
index 5e310fa..f9d772a 100644 (file)
@@ -9,7 +9,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf");
 
 namespace simgrid {
-namespace surf {
+namespace routing {
   static inline double euclidean_dist_comp(int index, xbt_dynar_t src, xbt_dynar_t dst) {
     double src_coord = xbt_dynar_get_as(src, index, double);
     double dst_coord = xbt_dynar_get_as(dst, index, double);
index 4470eb8..4e072d8 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/surf/AsCluster.hpp"
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /* This derivates from cluster because each host has a private link */
 class XBT_PRIVATE AsVivaldi: public AsCluster {
index d5105ea..c19465c 100644 (file)
@@ -31,7 +31,7 @@ simgrid::xbt::Extension<simgrid::s4u::Host, HostImpl> HostImpl::EXTENSION_ID;
 /*********
  * Model *
  *********/
-HostImpl *HostModel::createHost(const char *name, NetCard *netElm, Cpu *cpu){
+HostImpl *HostModel::createHost(const char *name, routing::NetCard *netElm, Cpu *cpu){
   xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
 
   HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
index f31677a..da9970b 100644 (file)
@@ -52,7 +52,7 @@ public:
   HostModel() : Model() {}
   ~HostModel() override {}
 
-  HostImpl *createHost(const char *name, NetCard *net, Cpu *cpu);
+  HostImpl *createHost(const char *name, routing::NetCard *net, Cpu *cpu);
 
   virtual void adjustWeightOfDummyCpuActions();
   virtual Action *executeParallelTask(int host_nb, sg_host_t *host_list,
index 76fb677..cd376b1 100644 (file)
@@ -152,7 +152,7 @@ static void recursiveGraphExtraction (simgrid::s4u::As *as, container_t containe
     xbt_dict_cursor_t cursor = nullptr;
     char *edge_name;
 
-    static_cast<simgrid::surf::AsImpl*>(as)->getGraph(graph, nodes, edges);
+    static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
     xbt_dict_foreach(edges,cursor,edge_name,edge) {
         linkContainers(
           PJ_container_get((const char*) edge->src->data),
@@ -459,7 +459,7 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb
     }
   }
 
-  static_cast<simgrid::surf::AsImpl*>(as)->getGraph(graph, nodes, edges);
+  static_cast<simgrid::routing::AsImpl*>(as)->getGraph(graph, nodes, edges);
 }
 
 xbt_graph_t instr_routing_platform_graph (void)
index 3edbdbf..98ea4c3 100644 (file)
@@ -289,7 +289,7 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
   }
 }
 
-Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, double rate)
+Action *NetworkCm02Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
 {
   int failed = 0;
   double bandwidth_bound;
index 0392c29..3819984 100644 (file)
@@ -44,7 +44,7 @@ namespace simgrid {
           xbt_dict_t properties) override;
       void updateActionsStateLazy(double now, double delta) override;
       void updateActionsStateFull(double now, double delta) override;
-      Action *communicate(NetCard *src, NetCard *dst, double size, double rate) override;
+      Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
       bool next_occuring_event_isIdempotent() override;
       virtual void gapAppend(double size, const Link* link, NetworkAction* action);
     protected:
@@ -72,7 +72,7 @@ namespace simgrid {
      * Action *
      **********/
     class NetworkCm02Action : public NetworkAction {
-      friend Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, double rate);
+      friend Action *NetworkCm02Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate);
       friend NetworkSmpiModel;
     public:
       NetworkCm02Action(Model *model, double cost, bool failed)
index 396b285..b9c377e 100644 (file)
@@ -79,7 +79,7 @@ namespace simgrid {
       }
     }
 
-    Action *NetworkConstantModel::communicate(NetCard *src, NetCard *dst, double size, double rate)
+    Action *NetworkConstantModel::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
     {
       NetworkConstantAction *action = new NetworkConstantAction(this, size, sg_latency_factor);
 
index d4f3939..93fd2f1 100644 (file)
@@ -29,7 +29,7 @@ namespace simgrid {
       NetworkConstantModel()  : NetworkModel() { };
       ~NetworkConstantModel() override;
 
-      Action *communicate(NetCard *src, NetCard *dst, double size, double rate) override;
+      Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
       double next_occuring_event(double now) override;
       bool next_occuring_event_isIdempotent() override {return true;}
       void updateActionsState(double now, double delta) override;
index 59e2935..9023115 100644 (file)
@@ -48,7 +48,7 @@ static void IB_action_state_changed_callback(
 
 
 static void IB_action_init_callback(
-    simgrid::surf::NetworkAction *action, simgrid::surf::NetCard *src, simgrid::surf::NetCard *dst)
+    simgrid::surf::NetworkAction *action, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)
 {
   simgrid::surf::NetworkIBModel* ibModel = (simgrid::surf::NetworkIBModel*)surf_network_model;
 
index 7194d5d..7912f20 100644 (file)
@@ -96,7 +96,7 @@ namespace simgrid {
     simgrid::xbt::signal<void(simgrid::surf::Link*)> Link::onStateChange;
 
     simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::surf::Action::State, simgrid::surf::Action::State)> networkActionStateChangedCallbacks;
-    simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::surf::NetCard *src, simgrid::surf::NetCard *dst)> Link::onCommunicate;
+    simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)> Link::onCommunicate;
 
   }
 }
index 421f399..027a626 100644 (file)
@@ -77,7 +77,7 @@ namespace simgrid {
        * unlimited.
        * @return The action representing the communication
        */
-      virtual Action *communicate(NetCard *src, NetCard *dst, double size, double rate)=0;
+      virtual Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)=0;
 
       /** @brief Function pointer to the function to use to solve the lmm_system_t
        *
@@ -163,7 +163,7 @@ namespace simgrid {
 
       /** @brief Callback signal fired when a communication starts
        *  Signature: `void(NetworkAction *action, RoutingEdge *src, RoutingEdge *dst)` */
-      static simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::surf::NetCard *src, simgrid::surf::NetCard *dst)> onCommunicate;
+      static simgrid::xbt::signal<void(simgrid::surf::NetworkAction*, simgrid::routing::NetCard *src, simgrid::routing::NetCard *dst)> onCommunicate;
 
 
 
index e97c67d..79252f2 100644 (file)
@@ -63,7 +63,7 @@ static void ns3_add_host(simgrid::s4u::Host& host)
   host.extension_set(NS3_EXTENSION_ID, ns3host);
 }
 
-static void ns3_add_netcard(simgrid::surf::NetCard* netcard)
+static void ns3_add_netcard(simgrid::routing::NetCard* netcard)
 {
   const char* id = netcard->name();
 
index 40049b2..272aa59 100644 (file)
@@ -254,7 +254,7 @@ L07Action::L07Action(Model *model, int host_nb, sg_host_t*host_list,
   xbt_free(host_list);
 }
 
-Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst, double size, double rate)
+Action *NetworkL07Model::communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate)
 {
   sg_host_t*host_list = xbt_new0(sg_host_t, 2);
   double *flops_amount = xbt_new0(double, 2);
index 403ad2b..80a1fa4 100644 (file)
@@ -66,7 +66,7 @@ public:
       e_surf_link_sharing_policy_t policy,
       xbt_dict_t properties) override;
 
-  Action *communicate(NetCard *src, NetCard *dst, double size, double rate) override;
+  Action *communicate(routing::NetCard *src, routing::NetCard *dst, double size, double rate) override;
   bool next_occuring_event_isIdempotent() override {return true;}
 
   HostL07Model *p_hostModel;
@@ -122,7 +122,7 @@ public:
 
   int unref() override;
 
-  std::vector<NetCard*> * p_netcardList = new std::vector<NetCard*>();
+  std::vector<routing::NetCard*> * p_netcardList = new std::vector<routing::NetCard*>();
   double *p_computationAmount;
   double *p_communicationAmount;
   double m_latency;
index 2dd9f68..c675e25 100644 (file)
@@ -88,8 +88,8 @@ static std::vector<int> *explodesRadical(const char*radicals){
 
 
 /** The current AS in the parsing */
-static simgrid::surf::AsImpl *current_routing = nullptr;
-static simgrid::surf::AsImpl* routing_get_current()
+static simgrid::routing::AsImpl *current_routing = nullptr;
+static simgrid::routing::AsImpl* routing_get_current()
 {
   return current_routing;
 }
@@ -114,12 +114,12 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
 {
   xbt_assert(sg_host_by_name(host->id) == nullptr, "Refusing to create a second host named '%s'.", host->id);
 
-  simgrid::surf::AsImpl* current_routing = routing_get_current();
-  if (current_routing->hierarchy_ == simgrid::surf::AsImpl::RoutingMode::unset)
-    current_routing->hierarchy_ = simgrid::surf::AsImpl::RoutingMode::base;
+  simgrid::routing::AsImpl* current_routing = routing_get_current();
+  if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
+    current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::base;
 
-  simgrid::surf::NetCard *netcard =
-      new simgrid::surf::NetCardImpl(host->id, simgrid::surf::NetCard::Type::Host, current_routing);
+  simgrid::routing::NetCard *netcard =
+      new simgrid::routing::NetCardImpl(host->id, simgrid::routing::NetCard::Type::Host, current_routing);
 
   sg_host_t h = simgrid::s4u::Host::by_name_or_create(host->id);
   h->pimpl_netcard = netcard;
@@ -175,15 +175,15 @@ void sg_platf_new_host(sg_platf_host_cbarg_t host)
 /** @brief Add a "router" to the network element list */
 void sg_platf_new_router(sg_platf_router_cbarg_t router)
 {
-  simgrid::surf::AsImpl* current_routing = routing_get_current();
+  simgrid::routing::AsImpl* current_routing = routing_get_current();
 
-  if (current_routing->hierarchy_ == simgrid::surf::AsImpl::RoutingMode::unset)
-    current_routing->hierarchy_ = simgrid::surf::AsImpl::RoutingMode::base;
+  if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
+    current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::base;
   xbt_assert(nullptr == xbt_lib_get_or_null(as_router_lib, router->id, ROUTING_ASR_LEVEL),
              "Refusing to create a router named '%s': this name already describes a node.", router->id);
 
-  simgrid::surf::NetCard* netcard =
-    new simgrid::surf::NetCardImpl(router->id, simgrid::surf::NetCard::Type::Router, current_routing);
+  simgrid::routing::NetCard* netcard =
+    new simgrid::routing::NetCardImpl(router->id, simgrid::routing::NetCard::Type::Router, current_routing);
   xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, netcard);
   XBT_DEBUG("Router '%s' has the id %d", router->id, netcard->id());
 
@@ -236,10 +236,13 @@ void sg_platf_new_link(sg_platf_link_cbarg_t link){
 
 void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
 {
-  using simgrid::surf::AsCluster;
-  using simgrid::surf::AsClusterTorus;
-  using simgrid::surf::AsClusterDragonfly;
-  using simgrid::surf::AsClusterFatTree;
+  using simgrid::routing::AsCluster;
+  using simgrid::routing::AsClusterTorus;
+  using simgrid::routing::AsClusterFatTree;
+  using simgrid::routing::AsCluster;
+  using simgrid::routing::AsClusterTorus;
+  using simgrid::routing::AsClusterDragonfly;
+  using simgrid::routing::AsClusterFatTree;
 
   int rankId=0;
 
@@ -263,7 +266,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
     break;
   }
   sg_platf_new_AS_begin(&AS);
-  simgrid::surf::AsCluster *current_as = static_cast<AsCluster*>(routing_get_current());
+  simgrid::routing::AsCluster *current_as = static_cast<AsCluster*>(routing_get_current());
   current_as->parse_specific_arguments(cluster);
 
   if(cluster->loopback_bw!=0 || cluster->loopback_lat!=0){
@@ -372,7 +375,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
   if (!router.id || !strcmp(router.id, ""))
     router.id = newid = bprintf("%s%s_router%s", cluster->prefix, cluster->id, cluster->suffix);
   sg_platf_new_router(&router);
-  current_as->router_ = (simgrid::surf::NetCard*) xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL);
+  current_as->router_ = (simgrid::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL);
   free(newid);
 
   //Make the backbone
@@ -397,7 +400,7 @@ void sg_platf_new_cluster(sg_platf_cluster_cbarg_t cluster)
   simgrid::surf::on_cluster(cluster);
 }
 void routing_cluster_add_backbone(simgrid::surf::Link* bb) {
-  simgrid::surf::AsCluster *cluster = dynamic_cast<simgrid::surf::AsCluster*>(current_routing);
+  simgrid::routing::AsCluster *cluster = dynamic_cast<simgrid::routing::AsCluster*>(current_routing);
 
   xbt_assert(cluster, "Only hosts from Cluster can get a backbone.");
   xbt_assert(nullptr == cluster->backbone_, "Cluster %s already has a backbone link!", cluster->name());
@@ -642,8 +645,8 @@ void sg_platf_new_process(sg_platf_process_cbarg_t process)
 
 void sg_platf_new_peer(sg_platf_peer_cbarg_t peer)
 {
-  using simgrid::surf::NetCard;
-  using simgrid::surf::AsCluster;
+  using simgrid::routing::NetCard;
+  using simgrid::routing::AsCluster;
 
   char *host_id = bprintf("peer_%s", peer->id);
   char *router_id = bprintf("router_%s", peer->id);
@@ -822,23 +825,23 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
 
 
   /* search the routing model */
-  simgrid::surf::AsImpl *new_as = nullptr;
+  simgrid::routing::AsImpl *new_as = nullptr;
   switch(AS->routing){
-    case A_surfxml_AS_routing_Cluster:        new_as = new simgrid::surf::AsCluster(AS->id);        break;
-    case A_surfxml_AS_routing_ClusterTorus:   new_as = new simgrid::surf::AsClusterTorus(AS->id);   break;
-    case A_surfxml_AS_routing_ClusterDragonfly:   new_as = new simgrid::surf::AsClusterDragonfly(AS->id);   break;
-    case A_surfxml_AS_routing_ClusterFatTree: new_as = new simgrid::surf::AsClusterFatTree(AS->id); break;
-    case A_surfxml_AS_routing_Dijkstra:       new_as = new simgrid::surf::AsDijkstra(AS->id, 0);    break;
-    case A_surfxml_AS_routing_DijkstraCache:  new_as = new simgrid::surf::AsDijkstra(AS->id, 1);    break;
-    case A_surfxml_AS_routing_Floyd:          new_as = new simgrid::surf::AsFloyd(AS->id);          break;
-    case A_surfxml_AS_routing_Full:           new_as = new simgrid::surf::AsFull(AS->id);           break;
-    case A_surfxml_AS_routing_None:           new_as = new simgrid::surf::AsNone(AS->id);           break;
-    case A_surfxml_AS_routing_Vivaldi:        new_as = new simgrid::surf::AsVivaldi(AS->id);        break;
+    case A_surfxml_AS_routing_Cluster:        new_as = new simgrid::routing::AsCluster(AS->id);        break;
+    case A_surfxml_AS_routing_ClusterDragonfly:   new_as = new simgrid::routing::AsClusterDragonfly(AS->id);   break;
+    case A_surfxml_AS_routing_ClusterTorus:   new_as = new simgrid::routing::AsClusterTorus(AS->id);   break;
+    case A_surfxml_AS_routing_ClusterFatTree: new_as = new simgrid::routing::AsClusterFatTree(AS->id); break;
+    case A_surfxml_AS_routing_Dijkstra:       new_as = new simgrid::routing::AsDijkstra(AS->id, 0);    break;
+    case A_surfxml_AS_routing_DijkstraCache:  new_as = new simgrid::routing::AsDijkstra(AS->id, 1);    break;
+    case A_surfxml_AS_routing_Floyd:          new_as = new simgrid::routing::AsFloyd(AS->id);          break;
+    case A_surfxml_AS_routing_Full:           new_as = new simgrid::routing::AsFull(AS->id);           break;
+    case A_surfxml_AS_routing_None:           new_as = new simgrid::routing::AsNone(AS->id);           break;
+    case A_surfxml_AS_routing_Vivaldi:        new_as = new simgrid::routing::AsVivaldi(AS->id);        break;
     default:                                  xbt_die("Not a valid model!");                        break;
   }
 
   /* make a new routing component */
-  simgrid::surf::NetCard *netcard = new simgrid::surf::NetCardImpl(new_as->name(), simgrid::surf::NetCard::Type::As, current_routing);
+  simgrid::routing::NetCard *netcard = new simgrid::routing::NetCardImpl(new_as->name(), simgrid::routing::NetCard::Type::As, current_routing);
 
   if (current_routing == nullptr && routing_platf->root_ == nullptr) { /* it is the first one */
     routing_platf->root_ = new_as;
@@ -849,8 +852,8 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
     /* it is a part of the tree */
     new_as->father_ = current_routing;
     /* set the father behavior */
-    if (current_routing->hierarchy_ == simgrid::surf::AsImpl::RoutingMode::unset)
-      current_routing->hierarchy_ = simgrid::surf::AsImpl::RoutingMode::recursive;
+    if (current_routing->hierarchy_ == simgrid::routing::AsImpl::RoutingMode::unset)
+      current_routing->hierarchy_ = simgrid::routing::AsImpl::RoutingMode::recursive;
     /* add to the sons dictionary */
     xbt_dict_set(current_routing->children(), AS->id, (void *) new_as, nullptr);
   } else {
@@ -864,7 +867,7 @@ simgrid::s4u::As * sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
   current_routing = new_as;
   current_routing->netcard_ = netcard;
 
-  simgrid::surf::asCreatedCallbacks(new_as);
+  simgrid::routing::asCreatedCallbacks(new_as);
   if (TRACE_is_enabled())
     sg_instr_AS_begin(AS);
 
@@ -881,7 +884,7 @@ void sg_platf_new_AS_seal()
 {
   xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
   current_routing->seal();
-  current_routing = static_cast<simgrid::surf::AsImpl*>(current_routing->father());
+  current_routing = static_cast<simgrid::routing::AsImpl*>(current_routing->father());
 
   if (TRACE_is_enabled())
     sg_instr_AS_end();
@@ -890,9 +893,9 @@ void sg_platf_new_AS_seal()
 /** @brief Add a link connecting an host to the rest of its AS (which must be cluster or vivaldi) */
 void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
 {
-  simgrid::surf::NetCard *netcard = sg_host_by_name(hostlink->id)->pimpl_netcard;
+  simgrid::routing::NetCard *netcard = sg_host_by_name(hostlink->id)->pimpl_netcard;
   xbt_assert(netcard, "Host '%s' not found!", hostlink->id);
-  xbt_assert(dynamic_cast<simgrid::surf::AsCluster*>(current_routing),
+  xbt_assert(dynamic_cast<simgrid::routing::AsCluster*>(current_routing),
       "Only hosts from Cluster and Vivaldi ASes can get an host_link.");
 
   s_surf_parsing_link_up_down_t link_up_down;
@@ -903,7 +906,7 @@ void sg_platf_new_hostlink(sg_platf_host_link_cbarg_t hostlink)
   xbt_assert(link_up_down.linkDown, "Link '%s' not found!",hostlink->link_down);
 
   // If dynar is is greater than netcard id and if the host_link is already defined
-  auto as_cluster = static_cast<simgrid::surf::AsCluster*>(current_routing);
+  auto as_cluster = static_cast<simgrid::routing::AsCluster*>(current_routing);
   if((int)xbt_dynar_length(as_cluster->privateLinks_) > netcard->id() &&
       xbt_dynar_get_as(as_cluster->privateLinks_, netcard->id(), void*))
   surf_parse_error("Host_link for '%s' is already defined!",hostlink->id);
index 32f9d99..4ff30ed 100644 (file)
@@ -287,7 +287,7 @@ void surf_init(int *argc, char **argv)
   XBT_DEBUG("Add routing levels");
   ROUTING_PROP_ASR_LEVEL = xbt_lib_add_level(as_router_lib, nullptr);
   ROUTING_ASR_LEVEL = xbt_lib_add_level(as_router_lib, [](void* p) {
-    delete static_cast<simgrid::surf::NetCard*>(p);
+    delete static_cast<simgrid::routing::NetCard*>(p);
   });
 
   XBT_DEBUG("Add SURF levels");
index 315e712..7875245 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013-2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
   /* Callbacks */
-  simgrid::xbt::signal<void(simgrid::surf::NetCard*)> netcardCreatedCallbacks;
+  simgrid::xbt::signal<void(simgrid::routing::NetCard*)> netcardCreatedCallbacks;
   simgrid::xbt::signal<void(simgrid::s4u::As*)> asCreatedCallbacks;
 
 
-}} // namespace simgrid::surf
+}} // namespace simgrid::routing
 
 /**
  * @ingroup SURF_build_api
@@ -49,17 +49,17 @@ int ROUTING_PROP_ASR_LEVEL = -1;     //Where the properties are stored
  *
  * Netcards are the thing that connect host or routers to the network
  */
-simgrid::surf::NetCard *sg_netcard_by_name_or_null(const char *name)
+simgrid::routing::NetCard *sg_netcard_by_name_or_null(const char *name)
 {
   sg_host_t h = sg_host_by_name(name);
-  simgrid::surf::NetCard *netcard = h==nullptr ? nullptr: h->pimpl_netcard;
+  simgrid::routing::NetCard *netcard = h==nullptr ? nullptr: h->pimpl_netcard;
   if (!netcard)
-    netcard = (simgrid::surf::NetCard*) xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
+    netcard = (simgrid::routing::NetCard*) xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL);
   return netcard;
 }
 
 /* Global vars */
-simgrid::surf::RoutingPlatf *routing_platf = nullptr;
+simgrid::routing::RoutingPlatf *routing_platf = nullptr;
 
 
 void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
@@ -76,7 +76,7 @@ void sg_platf_new_trace(sg_platf_trace_cbarg_t trace)
 }
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
 /**
  * \brief Find a route between hosts
@@ -99,7 +99,7 @@ void RoutingPlatf::getRouteAndLatency(NetCard *src, NetCard *dst, std::vector<Li
   AsImpl::getRouteRecursive(src, dst, route, latency);
 }
 
-static xbt_dynar_t _recursiveGetOneLinkRoutes(surf::AsImpl *as)
+static xbt_dynar_t _recursiveGetOneLinkRoutes(AsImpl *as)
 {
   xbt_dynar_t ret = xbt_dynar_new(sizeof(Onelink*), xbt_free_f);
 
@@ -130,7 +130,7 @@ xbt_dynar_t RoutingPlatf::getOneLinkRoutes(){
 /** @brief create the root AS */
 void routing_model_create(Link *loopback)
 {
-  routing_platf = new simgrid::surf::RoutingPlatf(loopback);
+  routing_platf = new simgrid::routing::RoutingPlatf(loopback);
 }
 
 /* ************************************************************************** */
@@ -141,7 +141,7 @@ static void check_disk_attachment()
   xbt_lib_cursor_t cursor;
   char *key;
   void **data;
-  simgrid::surf::NetCard *host_elm;
+  simgrid::routing::NetCard *host_elm;
   xbt_lib_foreach(storage_lib, cursor, key, data) {
     if(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL) != nullptr) {
     simgrid::surf::Storage *storage = static_cast<simgrid::surf::Storage*>(xbt_lib_get_level(xbt_lib_get_elm_or_null(storage_lib, key), SURF_STORAGE_LEVEL));
@@ -164,11 +164,11 @@ void routing_exit(void) {
   delete routing_platf;
 }
 
-simgrid::surf::RoutingPlatf::RoutingPlatf(simgrid::surf::Link *loopback)
+simgrid::routing::RoutingPlatf::RoutingPlatf(simgrid::surf::Link *loopback)
 : loopback_(loopback)
 {
 }
-simgrid::surf::RoutingPlatf::~RoutingPlatf()
+simgrid::routing::RoutingPlatf::~RoutingPlatf()
 {
   delete root_;
 }
index e404638..274ff24 100644 (file)
@@ -24,7 +24,7 @@ XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_
 SG_END_DECL()
 
 namespace simgrid {
-namespace surf {
+namespace routing {
 
   XBT_PUBLIC_DATA(simgrid::xbt::signal<void(s4u::As*)>) asCreatedCallbacks;
   XBT_PUBLIC_DATA(simgrid::xbt::signal<void(NetCard*)>) netcardCreatedCallbacks;
@@ -64,7 +64,7 @@ public:
   {
     if (containingAS != nullptr)
       id_ = containingAS->addComponent(this);
-    simgrid::surf::netcardCreatedCallbacks(this);
+    simgrid::routing::netcardCreatedCallbacks(this);
   }
   ~NetCardImpl() { xbt_free(name_);};
 
index 9e056dd..5e61276 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2008-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2008-2016. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -25,12 +24,12 @@ int main(int argc, char **argv)
   printf("Host number: %zu, link number: %d, elmts number: %d\n", sg_host_count(), sg_link_count(), size);
 
   xbt_dict_foreach(host_list, cursor, key, data) {
-    simgrid::surf::NetCard * nc = sg_netcard_by_name_or_null(key);
+    simgrid::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
     printf("   - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host"));
   }
 
   xbt_lib_foreach(as_router_lib, cursor, key, data) {
-    simgrid::surf::NetCard * nc = sg_netcard_by_name_or_null(key);
+    simgrid::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
     printf("   - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host"));
   }