From: Hugh Sasse Staff Elec Eng Date: 2000-10-10T19:25:27+09:00 Subject: [ruby-talk:5375] Re: Unit testing network code? On Tue, 10 Oct 2000, Mathieu Bouchard wrote: > This seems to be heavily architecture-dependent. Maybe there could be an Yes, it could be, but the problems will arise with different networks as well. > alternate version of the inet loopback (lo.o ?) module in Linux that could > do that... when the address matches a certain pattern (127.1.*.*) it would > drop packets according to a certain characteristic. Maybe you could > suggest the idea on the Linux kernel mailing-list. I'm not sure I can use that as I am on Solaris at the moment, but... > > Otherwise, a simple UDP/TCP emulator/filter could be written in Ruby, and > you would add rules of packet-dropping in it. This would be less universal > (Ruby only, and must be used explicitly) but much easier to write. ... this is maybe the way to go, because it could be applied to the simulation of any comms channel -- adding noise, dropping packets, using a stack to ensure packets arrive out of sequence. > > matju > Thank you, Hugh hgs@dmu.ac.uk