

Libtins – A multiplatform C++ network packet sniffing and crafting library - ingve
http://libtins.github.io/

======
VinzO
Anyone knows what are the differences or advantages compared to pcap?

~~~
pea-tear
This library uses libpcap to capture packets/read them from a pcap file. When
you sniff using libpcap you just get a pointer to the packet and the packet
size, you then have to parse the packet appropriately to do something useful
with it.

What libtins adds is the ability to parse and assemble packets easily. Parsing
is automatic, so you won't need to be checking protocol fields to determine
how to parse it: it will all be handled by the library.

~~~
grok2
libpcap does not support WiFi AFAIK (or maybe Winpcap doesn't)....does libtins
depend on an underlying driver on Windows for WiFi support? How good is the
802.11 support on Windows?

~~~
pea-tear
libpcap does support it. As for Winpcap, I don't know.

Yes, libtins uses libpcap to capture packets (and also to send, if you're
using Windows), so basically if winpcap supports it, then it should work on
libtins.

~~~
grok2
Winpcap it seems like does not support capturing raw 802.11 packets and
instead presents a pseudo-ethernet interface to the packets captured on WiFi
adapters and it only presents the actual ethernet packet to the application
using it (not the raw 802.11 packets). To actually capture 802.11, it seems
like you need to use 3rd party drivers like Airpcap (which are commercial and
it seems like this is a driver/wifi adapter combo). See
[https://www.winpcap.org/devel.htm...](https://www.winpcap.org/devel.htm...).

