Bugzilla – Bug 1811
feature request: basic traffic generator for network module
Last modified: 2014-09-10 00:13:01 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.
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.
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.
I'm already working on it, so I'm taking this one.
Created attachment 1743 [details] test program
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 !
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.
Added in changeset 10902:527fc624722a