Bug 1811

Summary: feature request: basic traffic generator for network module
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: wave moduleAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: RESOLVED FIXED    
Severity: enhancement CC: ns-bugs, tomh
Priority: P3    
Version: ns-3-dev   
Hardware: PC   
OS: Mac OS   
Bug Depends on:    
Bug Blocks: 1941    
Attachments: test program
Simple sender and receiver

Description Tommaso Pecorella 2013-12-06 14:46:50 UTC
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 UTC
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 UTC
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 UTC
I'm already working on it, so I'm taking this one.
Comment 4 Tommaso Pecorella 2013-12-24 04:01:08 UTC
Created attachment 1743 [details]
test program
Comment 5 Tommaso Pecorella 2013-12-24 04:03:38 UTC
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 UTC
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 UTC
Added in changeset 10902:527fc624722a