The Winpcap programming environment can be set up in the following steps:
1. Download Winpcap and Development Kit.
- Windows AP: http://www.winpcap.org/install/default.htm
- Winpcap Development Kit: http://www.winpcap.org/devel.htm
2. Install Winpcap
3. decompress the Winpcap development kit and a wpdpack directory contains five subdirectories: Docs, examples-pcap, examples-remote, include, and Lib.
- It is a Winpcap help document in docs, which is easy to understand.
- Examples of examples
- Include and Lib are the header files and link libraries of the C ++ project respectively.
4. Create a Winpcap project.
- In each source that uses WinpcapProgram, SetPcap. hHeader file inclusion (include.
- If you use the unique function provided by Winpcap to the Win32 platform in the program, you must addWpcap.
- If your program uses the remote capture function of Winpcap, you need to addHave_remote.NoAdd the remote-ext.h directly to your source file.
- Set the linker of VC ++ and addWpcap. LibLibrary (provided in the lib directory of the Development Kit) andWs2_32.libLibrary (system library ).
PS: The examples-pcap directory of the development kit contains many created project files. If an error occurs during Winpcap project creation, you can refer to their settings.