Bug 638 - Add a Tx trace source to UdpEchoClient class
Add a Tx trace source to UdpEchoClient class
Product: ns-3
Classification: Unclassified
Component: applications
All All
: P5 enhancement
Assigned To: ns-bugs
: feature-request, patch
Depends on:
  Show dependency treegraph
Reported: 2009-07-15 11:17 EDT by wilson thong
Modified: 2009-08-13 03:48 EDT (History)
2 users (show)

See Also:

Based on changeset 2081e0f6709d (2.52 KB, patch)
2009-07-15 11:18 EDT, wilson thong
Details | Diff
Call Tx trace sinks before packets are sent (2.54 KB, patch)
2009-07-16 11:36 EDT, wilson thong
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wilson thong 2009-07-15 11:17:33 EDT
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 EDT
Created attachment 530 [details]
Based on changeset 2081e0f6709d
Comment 2 Tom Henderson 2009-07-16 09:34:52 EDT
+1; I noticed this trace is missing last week.
Comment 3 wilson thong 2009-07-16 11:36:54 EDT
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 EDT
since tom acked it, I pushed a slightly-modified version of the patch

changeset e56da5fd6697