Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3, trace] categorized resource utilization active also for NS3
[simgrid.git] / src / surf / network_ns3.c
index 0d18ffd..b9f2de5 100644 (file)
@@ -349,6 +349,13 @@ static int ns3_get_link_latency_limited(surf_action_t action)
 }
 #endif
 
+#ifdef HAVE_TRACING
+static void ns3_action_set_category(surf_action_t action, const char *category)
+{
+  action->category = xbt_strdup (category);
+}
+#endif
+
 void surf_network_model_init_NS3(const char *filename)
 {
        if (surf_network_model)
@@ -370,8 +377,13 @@ void surf_network_model_init_NS3(const char *filename)
        surf_network_model->action_unref = action_unref;
        surf_network_model->extension.network.communicate = ns3_communicate;
 
+#ifdef HAVE_TRACING
+  surf_network_model->set_category = ns3_action_set_category;
+#endif
+
        /* Added the initialization for NS3 interface */
-       if (ns3_initialize()) {
+
+       if (ns3_initialize(xbt_cfg_get_string(_surf_cfg_set,"ns3/TcpModel"))) {
        xbt_die("Impossible to initialize NS3 interface");
        }