Packet data is Zero - Packet size limited during capture
Opened this issue · 4 comments
Also getting this error.
Getting the same error. Any updates on this issue?
Same issue here on a TTGO-T Cell 18650 ESP32 Board.
So I checked the code and found out, that un-commenting
#if defined(ESP32)
if(incl_len > snaplen) incl_len = snaplen; /* safty check that the packet isn't too big (I ran into problems with the ESP8266 here) */
#endif
line 80-82 in PCAP.cpp solves that issue, but brings the "Malformed Packet" issue.
Btw: snaplen is defined as
uint32_t snaplen = sizeof(int);
which in my simple knowledge is 4?
Almost every received packet is greater than 4, such that the data will be virtually removed?
I set snaplen to 2500 now. That should do the trick for WiFi.
I think originally it was suppose to use the max value of an integer there but I must have failed horribly.
Thanks for pointing out the source of the issue. Haven't touched this code in forever.