TCP/IP and UDP question.

I have with me 3 version of TCP/IP: 5.00A, 5.00B, 5.00C.

I think the one that is available in the official package is 5.00A, not
sure. I don’t know where 5.00B came from. 5.00C seems to come from the
Patch A which was never release and seems to have vanish (too bad because
Tcpip Patch A had some extra options to make it more real-time friendly when
exchanging data with Windows). Can somebody clarify this?

Now onto a more technical question:

I have a program reading UDP packets. These packet are sent at a rate of
1000hz. Each packet payload is 202 bytes. I have increase RCVBUF to 181000
bytes which is 120 packets of ~1500 bytes or in my case 896 packets of 202
bytes. The program works great under normal condition.

Basicaly the program does

while (1 )
{
select();
do
{
recvfrom();
} while ( there is data );
}

The socket is set to be non blocking, hence when there is no packet recvfrom
return with 0 bytes. Undernormal contion the inner while loop calls
recvfrom 1 or 2, meaning we are keeping the UDP buffer almost empty.

To test the UDP buffer, I added a delay(200) which I can invoked with a key
press. Strangely everytime the program will miss about 100 packets.
Blocked during 200ms the stack should have received about 200 packets, but
since the buffer has space for 896 packets of 202 bytes I don’t understand
how the stack could be missing these packets?

Is it possible the packets store in the stack’s internal buffer are always
take the space of the MTU and not the size of the packet payload. That
would explain why the program is loosing 100 packets?

  • Mario