Bug 638

Summary: Add a Tx trace source to UdpEchoClient class
Product: ns-3 Reporter: wilson thong <wilsonwk>
Component: applicationsAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: mathieu.lacage, tomh
Priority: P5 Keywords: feature-request, patch
Version: ns-3-dev   
Hardware: All   
OS: All   
URL: http://groups.google.com/group/ns-3-users/browse_thread/thread/96d96b91131bfd90#
Attachments: Based on changeset 2081e0f6709d
Call Tx trace sinks before packets are sent

Description wilson thong 2009-07-15 11:17:33 UTC
This add a "Tx" trace source to UdpEchoClient so that every time UdpEchoClient send a packet, a connected trace sink can receive the packet. I added this as I need to check the same packet when it is just transmitted out of a UdpEchoClient object and check again when it is just arrived to a PacketSink object. There are already many trace sources for PacketSink, but none is available to UdpEchoClient.

OnOffApplication can also generate traffic, and it provides many trace sources including the Tx trace source coded in this patch. Nevertheless, UdpEchoClient allows specifying traffic generation process in terms of number of packets and inter-packet time interval. These are not provided by OnOffApplication class.
Comment 1 wilson thong 2009-07-15 11:18:08 UTC
Created attachment 530 [details]
Based on changeset 2081e0f6709d
Comment 2 Tom Henderson 2009-07-16 09:34:52 UTC
+1; I noticed this trace is missing last week.
Comment 3 wilson thong 2009-07-16 11:36:54 UTC
Created attachment 535 [details]
Call Tx trace sinks before packets are sent

Fixed a bug in the previous patch. Now the Tx trace is called right before calling the udp socket send. In this way, PacketTag added in trace sinks can be sent across networks.

Previous patch placed the Tx trace after calling the udp socket send, thus adding PacketTag in trace sinks have no effect to the packets actually being sent.
Comment 4 Mathieu Lacage 2009-08-13 03:48:09 UTC
since tom acked it, I pushed a slightly-modified version of the patch

changeset e56da5fd6697