Reputation: 413
I'm learning source code of an application. The main usage is capturing and processing packets from interface, mainly based on pcap_open_live
and pcap_loop
. How to test packet loss? Is there any tool available? OS is Linux.
Upvotes: 1
Views: 290
Reputation: 919
You can't monitor packet loss on live monitoring since you can't see the packets that are lost!
If you just want to "test" the code (e.g. If you do lengthy computations on each packet which makes you lose packets during that time), simply send packets through the monitored interface at a steady rate, dummy packets.. (whatever.. A ping even) Then you know how many packets to expect. Compare your expected number of packets to the number sent. You can then try changing the rate and size of packets to see if you miss anything.
I doubt there are any particular tools for this test given the "simplicity" of the test.
Upvotes: 1