
WinPcap Documentation
Introduction This Manual describes the programming interface and the source code of WinPcap. It provides detailed descriptions of the functions and structures exported to programmers, along with …
Handling offline dump files - WinPcap
The file is opened with pcap_open_offline (), then the usual pcap_loop () is used to sequence through the packets. As you can see, reading packets from an offline capture is nearly identical to receiving …
WinPcap: pcap.h File Reference
pcap.h File Reference Go to the source code of this file.
Filtering the traffic - WinPcap
The functions used to filter packets are pcap_compile () and pcap_setfilter (). pcap_compile () takes a string containing a high-level Boolean (filter) expression and produces a low-level byte code that can …
Opening an adapter and capturing the packets - WinPcap
In this lesson we'll write a program that prints some information about each packet flowing through the adapter. The function that opens a capture device is pcap_open (). The parameters, snaplen, flags …
Obtaining the device list - WinPcap
Both libpcap and WinPcap provide the pcap_findalldevs_ex () function for this purpose: this function returns a linked list of pcap_if structures, each of which contains comprehensive information about …
Capturing the packets without the callback - WinPcap
The parameters of this function are the same as a capture callback -- it takes an adapter descriptor and a couple of pointers that will be initialized and returned to the user (one to a pcap_pkthdr structure …
WinPcap · Frequently Asked Questions
Oct 19, 2009 · The problem is due to the fact that the standard WinPcap include file "pcap.h" contains only a forward declaration of "struct pcap", but not the actual definition of it.
Using WinPcap in your programs
Include the file pcap.h at the beginning of every source file that uses the functions exported by library. If your program uses Win32 specific functions of WinPcap, remember to include WPCAP among the …
Exported functions - WinPcap
pcap_compile_nopcap () is similar to pcap_compile () except that instead of passing a pcap structure, one passes the snaplen and linktype explicitly. It is intended to be used for compiling filters for direct …