• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Under Win32, libpcap is integrated in the WinPcap packet capture system.
2WinPcap provides a framework that allows libpcap to capture the packets
3under Windows 95, Windows 98, Windows ME, Windows NT 4, Windows 2000
4and Windows XP.
5WinPcap binaries and source code can be found at http://winpcap.polito.it:
6they include also a developer's pack with all the necessary to compile
7libpcap-based applications under Windows.
8
9How to compile libpcap with Visual Studio
10-----------------------------------------
11
12In order to compile libpcap you will need:
13
14- version 6 (or higher) of Microsoft Visual Studio
15- The November 2001 (or later) edition of Microsoft Platform
16Software Development Kit (SDK), that contains some necessary includes
17for IPv6 support. You can download it from http://www.microsoft.com/sdk
18- the latest WinPcap sources from http://winpcap.polito.it/install
19
20The WinPcap source code already contains a recent (usually the latest
21stable) version of libpcap. If you need to compile a different one,
22simply download it from www.tcpdump.org and copy the sources in the
23winpcap\wpcap\libpcap folder of the WinPcap distribution. If you want to
24compile a libpcap source retrieved from the tcpdump.org Git, you will
25have to create the scanner and the grammar by hand (with lex and yacc)
26or with the cygnus makefile, since The Visual Studio project is not able
27to build them.
28
29Open the project file winpcap\wpcap\prj\wpcap.dsw with Visual Studio and
30build wpcap.dll. wpcap.lib, the library file to link with the applications,
31will be generated in winpcap\wpcap\lib\. wpcap.dll will be generated in
32winpcap\wpcap\prj\release or winpcap\wpcap\prj\debug depending on the type
33of binary that is being created.
34
35How to compile libpcap with Cygnus
36----------------------------------
37
38To build wpcap.dll, cd to the directory WPCAP/PRJ of the WinPcap source code
39distribution and type "make". libwpcap.a, the library file to link with the
40applications, will be generated in winpcap\wpcap\lib\. wpcap.dll will be
41generated in winpcap\wpcap\prj.
42
43Remember, you CANNOT use the MSVC-generated .lib files with gcc, use
44libwpcap.a instead.
45
46"make install" installs wpcap.dll in the Windows system folder.
47