/** @ingroup internals
 */


/** @defgroup compilation How to compile WinPcap
 *  @{
@}
 
\htmlonly

&nbsp;<p>This section explains how to compile WinPcap, both the kernel level and
the user-level portion, on the various Win32 platforms. The source code can be
found on the WinPcap website, at <a href="http://winpcap.polito.it/install/">http://winpcap.polito.it/install/</a>.</p>
<h2>Compiling the driver</h2>
<p>Two main NPF sources are available for compilation: the Windows NTx one and
the Windows 9x one. Note that, since the NPF Driver is platform dependent, it is
STRONGLY suggested to compiled it on the OS where it will be used, in order to
link the correct DDK libraries. For example, if you compile the
driver with the Windows NT 4 DDK, it will not work properly in Windows 2000
and vice versa, also if the source code tree is the same.</p>
<h3>Co<a name="#NT40">mpili</a>ng the driver on Windows NTx</h3>
<p>Software requirements:</p>
<ul>
  <li>Microsoft Driver Developer Kit (DDK) for NT for Windows 2000 or Windows
    XP
  <li>Microsoft Software Development Kit (SDK)
  <li>Microsoft Visual C++ 6.0</li>
</ul>
<p>If your system satisfies these requirements, follow these steps:</p>
<ol>
  <li>From the Window NT Start menu, select the folder <em>Programs</em> and
    then <i>Development Kits</i>, then <em>Windows XXX DDK</em>, where XXX is
    the target system<em>.</em> From here select the voice <em>Checked Build
    Environment</em> if you want to build a debug version, or <em>Free Build
    Environment</em> if you want to build a release version.
  <li>A command prompt will be opened. Move to the directory PacketNTx inside the
    WinPcap source folder and type the command<br>
    <br>
    <i>CompileNT4</i>, to build the driver for Windows NT 4<i><br>
    </i>or<i><br>
    Compile2k</i>, to build the driver for Windows NT 5 OSes, (like Windows 2000
    or Windows XP)<i><br>
    </i><br>
    This commands will generate the driver (packet.sys), that will be put in the
    DDK output directory (usually \i386).
  <li>It is possible to generate a driver that uses the RDTSC x86 instruction
    instead of the KeQueryPerformanceCounter WinNTx kernel function. Such a
    driver is more efficient than the standard one, but in some situations (like
    processors with the Speedstep technology) it can show inconsistences in the
    timestamps. To build&nbsp; this driver, move to the directory PacketNTx inside the
    WinPcap source folder and type the command<br>
    <br>
    <i>CompileNT4 RDTSC</i>, to build the driver for Windows NT 4<i><br>
    </i>or<i><br>
    Compile2k RDTSC</i>, to build the driver for Windows NT 5 OSes, (like Windows 2000
    or Windows XP)<i><br>
    </i>
</ol>
<p><b>Warning</b>: sometimes, during the compilation of the driver, a lot of
'last line incomplete' errors are generated. Ignore these errors and let the
compilation process continue, they are due to bugs in some DDK versions.</p>
<h3><a name="#95-98">Compili</a>ng the driver on Windows 9x</h3>
<p>To compile the driver there are the following software requirements:</p>
<ul>
  <li><font size="3">Driver Developer Kit (DDK) for Windows 95/98/ME</font>
  <li><font size="3">Software Development Kit (SDK)</font>
  <li><font size="3">Visual C++ 6.0</font></li>
</ul>
<p>the steps to follow are:</p>
<ol>
  <li>Open a dos shell
  <li>Go to the VisualC++ BIN directory (for example C:\DEVSTUDIO\VC\BIN) and
    execute the command<br>
    <br>
    <em>Vcvars32<br>
    </em>
  <li>Go to the SDK directory (for example C:\MSSDK) and execute the command<br>
    <br>
    <em>Setenv sdk_path</em><br>
    <br>
    where <em>sdk_path</em> is the directory of SDK (for example Setenv C:\MSSDK)
  <li>Go to the DDK directory (for example C:\DDK) and execute the command<br>
    <br>
    <em>Ddkenv 32 net<br>
    </em>
  <li>Move to the directory whit the driver's source code and type the command<br>
    <br>
    <em>nmake rtl<br>
    <br>
    </em>to obtain a release version, or<br>
    <br>
    <em>nmake<br>
    <br>
    </em>to obtain a debug version.<br>
    The release version of <i>packet.vxd</i> will be placed in the <em>retail</em>
    directory, the debug version in the <em>debug</em> directory.</li>
</ol>
<p><strong>Warning</strong>: On some systems the NMAKE utility is not able to
launch ADRC2VXD, this means that the driver binary is generated correctly, but
without the copyright information. We don't know the cause of this problem.</p>
<h2>Compiling packet.dll</h2>
<p>Like for NPF, two sources are available for compilation: the Windows NTx one
and the Windows 9x one. They are located in PacketNTx\dll\ and in Packet9x\dll\.</p>
<p>Software requirements:</p>
<ul>
  <li>Microsoft Software Development Kit (SDK)</li>
  <li>Microsoft Visual C++ 6.0</li>
</ul>
<p>To compile the PACKET.DLL, load the project contained in the directory PacketNTx\dll\project
(or Packet9x\dll\project) in the Visual C++ IDE. Build the project to obtain the
PACKET.DLL and <em>packet.lib</em> files. The first one is the actual library,
the second one is the file that applications need to link in order to use the
it. The debug version of these files will be generated in the directory dll\project\debug,
the release version in dll\project\release.</p>
<h2>Compiling wpcap.dll</h2>
<p>wpcap.dll can be compiled on any Win32 platform and the generated dll is system independent.</p>
<p>Note that wpcap.dll contains the source code of libpcap,
from <a href="http://www.tcpdump.org/">www.tcpdump.org</a>. You will be able to
include and build a different libpcap version simply copying it in the directory
winpcap\wpcap\prj of the WinPcap source code distribution.

</p>
<p>System Requirement:</p>
<ul>
  <li>Microsoft <font size="3">Visual C++ 6.0 compiler.</font></li>
</ul>
<p>Project files are in the directory<em> winpcap\wpcap\prj</em> of the WinPcap
source code distribution. Load the project from the <font size="3">Visual C++
6.0 IDE and build the program. The output</font> file <em>wpcap.lib </em>will be
generated in <em>winpcap\wpcap\lib\. </em><font size="3">The output</font> dll <em>wpcap.dll
</em>will be generated in <em>winpcap\wpcap\prj\release </em>or<em> winpcap\wpcap\prj\debug<i>
</i></em>depending on the type of binary that is being generated.</p>
<p>&nbsp;
\endhtmlonly
*/
