Click here to Skip to main content
15,888,047 members
Articles / Programming Languages / C#

TCP Session Reconstruction Tool

Rate me:
Please Sign up or sign in to vote.
4.65/5 (17 votes)
21 Sep 2007CPOL6 min read 166.1K   8.2K   74  
A TCP session reconstruction tool for C#.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>WinPcap: Packet.dll -- Packet Driver API</title>
<link href="style.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>Packet.dll -- Packet Driver API<br>
<small>
[<a class="el" href="group__internals.html">WinPcap internals</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
</table>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>

<body>
Packet.dll is a dynamic link library that offers a set of low level functions
to:
<ul>
  <li>install, start and stop the NPF device driver</li>
  <li>Receive packets from the NPF driver</li>
  <li>send packets to the NPF driver</li>
  <li>obtain the list of the available network adapters</li>
  <li>retrieve various information about an adapter, like the description and
    the list of addresses and netmasks</li>
  <li>query and set various low-level parameters of an adapter</li>
</ul>
<p> There are two versions of packet.dll: the first one runs under Windows 95/98/ME, the second 
one is for&nbsp; Windows
NT/2000/XP.</p>
<p>Packet.dll was created to provide a layer to access the low level
functionalities of WinPcap in a system independent way. This library handles all 
the system-dependent details (like managing the devices, interacting with the OS 
to manage the adapters, looking for the information in the registry and so on), 
and exports an API that is uniform across all Windows OSes. In this way,
applications or libraries based on it can run without being recompiled
under any Windows operating system. </p>
<p>However, not all of the packet.dll API is totally portable: some advanced features, like kernel-mode dump, are present only in the WinNTx version of WinPcap, 
while packet.dll for Win9x does not provide them. On the other side, the NTx 
version is a superset of the 9x one, in other words all the function present in 
the Win9x version are present in WinNTx too.</p>
<p>The other important feature of this library is its ability to handle NPF driver.
Packet.dll transparently installs and starts the driver when an application
attempts to access an adapter. This avoids the manual installation of the driver
through the control panel.</p>
<h2>Important note, read carefully!</h2>
<p>The source code of Packet.dll is freely available and completely documented. 
However, packet.dll should be considered an internal API, because its purpose 
inside WinPcap is to be a building block for the real public API: wpcap.dll.</p>
<p>As a consequence, since the <b>normal</b> and <b>suggested</b> way for an
application to use WinPcap is through wpcap.dll, <b>we don't guarantee that the packet.dll 
API will not be changed in future releases of winpcap, and we don't provide 
support for this API</b>. For the same reason, <b>this manual doesn't contain 
any more the Doxygen-generated documentation of Packet.dll</b>: the user will 
have to run Doxygen on his own to create it, or read the comments in the source 
code.</p>

</body>

</html>
 
<hr>
<p align="right"><img border="0" src="winpcap_small.gif" align="absbottom" width="91" height="27">
documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2007 
CACE Technologies. All rights reserved.</p>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Microsoft
Israel Israel
Saar, has been programing since 1997. He enjoys taking things a part and designing simple solutions to complex problems. Currently, works for Microsoft writing in a variety of languages and flavors. During the last year he is taking a closer look into mobile and web development.

Comments and Discussions