Bug 1299 - EnableAsciiIpv4All tracing does not show transmitted and received packets
EnableAsciiIpv4All tracing does not show transmitted and received packets
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3.12
All All
: P5 normal
Assigned To: George Riley
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-18 16:15 UTC by SANTOSH GOGI
Modified: 2011-12-12 00:39 UTC (History)
2 users (show)

See Also:


Attachments
first.cc example tutorial script with Ipv4 Ascii Tracing enabled (1.59 KB, application/octet-stream)
2011-11-18 16:15 UTC, SANTOSH GOGI
Details
Patch to fix the issue (11.59 KB, patch)
2011-12-12 00:38 UTC, Adrian S.-W. Tam
Details | Diff
Output of the provided first.cc (as in attachment 1271) (982 bytes, application/octet-stream)
2011-12-12 00:39 UTC, Adrian S.-W. Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SANTOSH GOGI 2011-11-18 16:15:54 UTC
Created attachment 1271 [details]
first.cc example tutorial script with Ipv4 Ascii Tracing enabled

Overview:  ascii trace file generated using EnableAsciiIpv4 with InternetStackHelper does not show transmitted or received packets but shows dropped packets only if any.

Steps to Reproduce: As shown in the attachment script, one can generate ascii tracing for Ipv4 interfaces with InternetStackHelper object. 
        InternetStackHelper stack;
        .....
	.....
        AsciiTraceHelper ascii;
	Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream("ipv4_trace.tr");
	stack.EnableAsciiIpv4All(stream);

Actual Results: Trace file shows only dropped packet(marked as 'd') if any
Expected Results: SInce the simulation also had transmitted and received packets, they should have been present in the trace file.

Build Date & Platform: Build Nov-16-2011 on Ubuntu OS 11

Additional Builds and Platforms: Seen on Fedora 

Additional Information: Tested with first.cc example tutorial file present in ns-3.12 build. The trace file did not had anything since there are no dropped packets in point-to-point link but the important point is, it did not even have transmitted and received packets.
Comment 1 Adrian S.-W. Tam 2011-12-10 22:08:55 UTC
This bug arises from internet-stack-helper.cc, which hooks a handler to only m_dropTrace, but not m_txTrace and m_rxTrace. Fix shall be easy.
Comment 2 Adrian S.-W. Tam 2011-12-12 00:38:22 UTC
Created attachment 1282 [details]
Patch to fix the issue
Comment 3 Adrian S.-W. Tam 2011-12-12 00:39:13 UTC
Created attachment 1283 [details]
Output of the provided first.cc (as in attachment 1271 [details])