Winpcap programming 2-Environment setup

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.