Reputation: 18745
When I inject any packet via WinPcap it will be captured in this moment. I dont want to capture packets, witch were injected myself. What is the easiest way?
Upvotes: 1
Views: 875
Reputation: 6174
You could perhaps use a capture filter (pcap_setfilter()) and filter out packets by their source MAC address.
That may not be exactly what you want though, because MAC addresses can be spoofed, you might want to see outgoing packets from other sources on your machine, etc.
The only other thing I can think of would be to compute a hash value of each packet you send, and discard any captured packet with the same hash value.
There's got to be a better way…
Upvotes: 1