Re: Problems with promiscuous mode (capture network traffic)
Posted: Fri Jul 28, 2017 1:51 am
No idea why your packets get corrupted; I have not seen that and I've received far more than 200 packets with my code. I doubt the issue is the ringbuffer: if it's full, depending on the timeout value it will either (non-zero) wait for a while for there to be space, or (zero) discard the packet alltogether. Corrupting packets is not intended behaviour 
The difference between the two lines is that the 2nd one will only push 4bytes (the size of the pointer 'packet') into the buffer; methinks that's not what you'd want.
The difference between the two lines is that the 2nd one will only push 4bytes (the size of the pointer 'packet') into the buffer; methinks that's not what you'd want.