From 291b955b78f742f1065614f1c6a1674fa8b476ca Mon Sep 17 00:00:00 2001 From: Lucas Schnorr Date: Mon, 5 Sep 2011 16:58:34 +0200 Subject: [PATCH] [NS3, trace] categorized resource utilization active also for NS3 --- src/surf/network_ns3.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/surf/network_ns3.c b/src/surf/network_ns3.c index 095f401d92..b9f2de575c 100644 --- a/src/surf/network_ns3.c +++ b/src/surf/network_ns3.c @@ -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,6 +377,10 @@ 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(xbt_cfg_get_string(_surf_cfg_set,"ns3/TcpModel"))) { -- 2.20.1