[Ns-bugs] [Bug 622] New: [PATCH] Friendly names for pcap traces
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Jul 3 05:51:43 PDT 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=622
Summary: [PATCH] Friendly names for pcap traces
Product: ns-3
Version: ns-3-dev
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: helpers
AssignedTo: ns-bugs at isi.edu
ReportedBy: zarhan at cc.hut.fi
Estimated Hours: 0.0
Created an attachment (id=512)
--> (http://www.nsnam.org/bugzilla/attachment.cgi?id=512)
Patch to add friendly names for pcap traces
Attached is a patch that gives out more meaningful names for trace files.
Instead of filename-nodeid-deviceid, which can get quite cumbersome if you have
lots of devices, this one uses format filename-nodename-devname if they have
been given via Names::Add facility.
For Nodes, simply use
Ptr<Node> TestBoxNode;
Names::Add("TestBox", TestBoxNode)
For devices, you need to specify the name belongs to specific node (so you can
use e.g. "eth0" for multiple nodes), like so:
Ptr<NetDevice> TestDev = TestBoxNode->GetDevice(0);
Names::Add(TestBoxNode, "eth0", TestDev);
End result what you'll see when you use e.g.
PointToPointHelper::EnablePcapAll ("testtrace");
will be that instead of testrace-0-0.pcap, you get testrace-TestBox-eth0.pcap
...which I think is quite useful addition.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list