0

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.

  • 4
    just because it's called pcap(ture), doesn't that capturing is **ALL** that the library does... – Marc B Oct 22 '13 at 18:06

2 Answers2

2

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).

1

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

Srivats P
  • 91
  • 3