2

I have a program which sends data from one pc to another using UDP (size of data 150 bytes). That program is writen in delphi 7 (TldUDPClient and TldUDPServer components using to send and recive data). I need to test this program on 30% packet loss.

I use ipfw for windows (downloaded from sourceforge) :

ipfw -f flush
ipfw add pipe 1 ip from any to any out
ipfw pipe 1 config plr 0.3

When I use ping I see that 30% of data loss.

When I launch my delphi program, after some time of working it returns an error: socket error 10004. The description of the error was: Interrupted function call. A blocking operation was interrupted by a call to WSACancelBlockingCall.

Is that problem of capability between my network component and packet loss emulation? Or will I see that in real situations too, when suffering packet loss? Which another firewall or another software i can use for emulation of packet loss?

Xaver
  • 991
  • 2
  • 19
  • 37
  • How much data do you send using UDP in one UDP packet? If it is ore than the packet size of the underlying network (UDP packets are guaranteed to arrive whole or not at all but underlying there are possibly multiple network packets (don't know the official name)) I can assume that this might happen in real life also. – Ritsaert Hornstra Nov 23 '11 at 20:40

1 Answers1

3

Sounds more like a packet loss emulation issue. The ipfw tool seems to interrupt the connection - from this site - is it your version? - the source code does not implement this option - but it's 4 years old. With the ping command, you just know that you did not receive any answer within the expected time - there is no "connection" in the ARP protocol AFAIR.

From the UDP standard, packet loss is painless: there is no acknowledge nor error message retrieved to the socket layer.

On a real network connection, UDP packets are lost silently.

And painfully... perhaps ;)

Community
  • 1
  • 1
Arnaud Bouchez
  • 42,305
  • 3
  • 71
  • 159