Bug 1811 - feature request: basic traffic generator for network module
feature request: basic traffic generator for network module
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wave module
ns-3-dev
PC Mac OS
: P3 enhancement
Assigned To: Tommaso Pecorella
:
Depends on:
Blocks: 1941
  Show dependency treegraph
 
Reported: 2013-12-06 14:46 EST by Tommaso Pecorella
Modified: 2014-09-10 00:13 EDT (History)
2 users (show)

See Also:


Attachments
test program (1.45 KB, application/octet-stream)
2013-12-24 04:01 EST, Tommaso Pecorella
Details
Simple sender and receiver (14.11 KB, patch)
2013-12-24 04:03 EST, Tommaso Pecorella
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2013-12-06 14:46:50 EST
The wave test uses OnOffApplication, which is *not* a module dependancy.

As a result, the linker doesn't search for it, and the test application fails to link.

Adding applications as a module dependancy fixes the issue, but this is not an acceptable way.
Comment 1 Tom Henderson 2013-12-06 16:16:59 EST
I put in the dependency for now, to fix the build.  Also mark it down in urgency. We can discuss whether to leave it.

There seem to be a few long-term solutions to this.

1) move the test to 'src/test' module, where we have done similar things to avoid introducing unnecessary dependencies

2) adjust waf so that separate module dependency specifiers can be used for the test libraries.

Not likely that we find a volunteer for 2).

3) A third option is to rewrite the test to avoid the use of OnOff by writing a custom traffic generator; some modules have done this as well.  In general, I would like to avoid making it hard on people to write tests by making them write custom traffic generators to stimulate the tests, so I don't really favor this option in general.

4) move the onoff application (or a basic traffic generator) to src/network/utils (it might need to be refactored to remove Udp dependency) or src/internet/model.
Comment 2 Tommaso Pecorella 2013-12-06 16:45:25 EST
I'd say option 4.

In the specific case, the test already avoid using UDP and IP by resorting to PacketSocket. This is a viable option, and enables us to write an "application" in the network module.

I'd call it SimplePacketSender. It might even be a reduced functionality OnOff, as it could be enough to send a simple data stream, without on or off periods.

Options to implement:
1) Data rate
2) Packet size
3) Max packet number

Cheers,

T.
Comment 3 Tommaso Pecorella 2013-12-14 02:40:22 EST
I'm already working on it, so I'm taking this one.
Comment 4 Tommaso Pecorella 2013-12-24 04:01:08 EST
Created attachment 1743 [details]
test program
Comment 5 Tommaso Pecorella 2013-12-24 04:03:38 EST
Created attachment 1744 [details]
Simple sender and receiver

Here are the two SimpleSendApp and SimpleRecvApp.

If you want leave comments, they're uploaded here:
http://codereview.appspot.com/45320043

The test program is in the other attachment.

Happy Xmas !
Comment 6 Tommaso Pecorella 2013-12-24 04:08:31 EST
Sorry, forgot to mention this.

The new apps are in src/network/utils for a specific purpose.

They're meant to be used primarily by test programs, and they must have no dependancy on the Internet module.

Since the "applications" module is dependant on the Internet model, we don't want to place them there.

Cheers,

T.
Comment 7 Tommaso Pecorella 2014-09-10 00:13:01 EDT
Added in changeset 10902:527fc624722a