Observation congestion window in ns3-dce

84 views
Skip to first unread message

Kyotaro Higuma

unread,
Dec 7, 2015, 7:35:28 AM12/7/15
to ns-3-users
Hello everyone,

I made the scenario for the congestion window observation in ns3-dce.
It was created on the basis of example/dce-tcp-ns3-nsc-comparison.cc
But,it didn't run.

...

void
CwndTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldcwnd, uint32_t newcwnd)
{
      *stream->GetStream() << Simulator::Now ().GetSeconds ()
        << " \t " << newcwnd << std::endl;
}

void
MyEventHandller (Ptr<Application> app, Ptr<OutputStreamWrapper> stream)
{
  Ptr<Socket> src_socket = app->GetObject<OnOffApplication>()->GetSocket();
  src_socket->TraceConnectWithoutContext("CongestionWindow",
                                              MakeBoundCallback(&CwndTracer, stream));
}

void MyEventWrapper (Ptr<Application> app, Ptr<OutputStreamWrapper> st)
{
  Simulator::Schedule (Seconds (cw_interval), &MyEventHandller, app, st);
}


...

// make trace file's name
  AsciiTraceHelper ascii2;
   std::string fname = std::string(prog_dir) + "my-dce-tcp-comparison.cwnd";
  Ptr<OutputStreamWrapper> stream = ascii2.CreateFileStream(fname);
 
  Simulator::Schedule (Seconds (0.5)+NanoSeconds (1.0),
                       &MyEventHandller, lefts.Get(0)->GetApplication(0), stream);


...

./waf --run , and Get the messege on command line.

Command ['/home/kyotaro/libos-nuse/net-next-nuse/tools/testing/libos/buildtop/source/ns-3-dce/build/bin/my-dce-tcp-ns3-nsc-comparison'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

Do not be a window of observation in dce?

Thanks for your help.
Kyotaro
Reply all
Reply to author
Forward
0 new messages