Question

libpcap is a packet capture library. It makes sense to me that packet sniffers/analyzers use it since they capture network traffic and analyze it. Why does a packet generator e.g Ostinato use libpcap? As far as I know, traffic generators do not need to capture packet traffic.

Please help me clarify the confusion.

Thank you.

Was it helpful?

Solution 2

As the creator of Ostinato, just want to highlight two things -

  1. libpcap/winpcap is not just a packet capture library but also a packet injection library; most importantly, it is cross platform
  2. Ostinato (and other traffic generators) support packet capture as well as packet generation

So libpcap/winpcap was an obvious choice for Ostinato

OTHER TIPS

libpcap is a packet capture library.

It's also, as of libpcap 0.9 (it's currently up to 1.4), a packet injection library, with pcap_inject() and pcap_sendpacket() APIs (two APIs for backwards compatibility with OpenBSD and WinPcap, but the difference is trivial).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top