Wiznet W5100 (Ethernet Shield) Buffer overflow fact monitoring

Hello! I need to catch a RX buffer overflow event on Wiznet W5100 (Ethernet Shield). This can happen when reading the data from RX buffer by programm is slower than its coming in from network.
When the network data is coming faster than it have to pick up by the program and some part of incoming data may be lost, some kind of “cut off”. Is there a method to monitor such events? For example, make a blink by LED diode.
I have made an analysis of w5100.cpp function:

void W5100Class::read_data(SOCKET s, volatile uint16_t src, volatile uint8_t *dst, uint16_t len)
{
  uint16_t size;
  uint16_t src_mask;
  uint16_t src_ptr;

  src_mask = src & RMASK;
  src_ptr = RBASE[s] + src_mask;

  if( (src_mask + len) > RSIZE ) 
  {
	digitalWrite(LED_BUILTIN, HIGH);
	delay(5); 
	digitalWrite(LED_BUILTIN, LOW);
    size = RSIZE - src_mask;
    read(src_ptr, (uint8_t *)dst, size);
    dst += size;
    read(RBASE[s], (uint8_t *) dst, len - size);
  } 
  else
    read(src_ptr, (uint8_t *) dst, len);
}

but i think it’s a only FIFO cycling buffer, which is rewritten in a circle, but the data buffer that have already been picked up by a programm, are not removed from the RX buffer, so i can not see the overflow fact.

How can i detect w5100 buffer overflow?
I will be grateful for any advice.

Thanks!

What makes you suspect you are getting a buffer overflow? Which protocol are you using? TCP/IP has functions that prevent overflow by receiving only one packet at a time. You must read the contents of a packet before the w5100 will send an ACK.

edit: If you are using a raw or UDP protocol, you are at the mercy of the sender. If it sends too fast, you will lose data.

SurferTim:
What makes you suspect you are getting a buffer overflow? Which protocol are you using? TCP/IP has functions that prevent overflow by receiving only one packet at a time. You must read the contents of a packet before the w5100 will send an ACK.

I send an UDP packets in a cicle (#include <EthernetUdp.h>), and I know how many packets I sent. I Catch packets through Serial.println () in programm, but the number of packets i sent by UDP is not equal to the number of packets received by the program.

SurferTim:
edit: If you are using a raw or UDP protocol, you are at the mercy of the sender. If it sends too fast, you will lose data.

Thats all is correct, but my task is to catch this event "lose data" and indicate by a led on a Arduino.

Are the packets numbered? If so, you can tell if you lost a packet. If not,…

SurferTim:
Are the packets numbered? If so, you can tell if you lost a packet. If not,...

that, will be a simple solution, but the packets are not numbered. There are random packets like:
"71724000100100"
"71724000100100"
"71724000001001"

and so on.

there is certainly a sense to make numbered packets like

"0000171724000100100"
"0000271724000100100"...

and check in the program this number and signal in fact of difference, but I would like to use a w5100 opportunities, if exist.