mame/3rdparty/winpcap/docs/html/Packet_8h_source.html
2015-01-10 12:21:12 +01:00

573 lines
66 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>WinPcap: Packet.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</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 class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>Packet.h</h1><a href="Packet_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 2005 - 2010 CACE Technologies, Davis (California)</span>
<a name="l00004"></a>00004 <span class="comment"> * All rights reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00008"></a>00008 <span class="comment"> * are met:</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00011"></a>00011 <span class="comment"> * notice, this list of conditions and the following disclaimer.</span>
<a name="l00012"></a>00012 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00013"></a>00013 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
<a name="l00014"></a>00014 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
<a name="l00015"></a>00015 <span class="comment"> * 3. Neither the name of the Politecnico di Torino, CACE Technologies </span>
<a name="l00016"></a>00016 <span class="comment"> * nor the names of its contributors may be used to endorse or promote </span>
<a name="l00017"></a>00017 <span class="comment"> * products derived from this software without specific prior written </span>
<a name="l00018"></a>00018 <span class="comment"> * permission.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span>
<a name="l00021"></a>00021 <span class="comment"> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span>
<a name="l00022"></a>00022 <span class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span>
<a name="l00023"></a>00023 <span class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span>
<a name="l00024"></a>00024 <span class="comment"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
<a name="l00025"></a>00025 <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span>
<a name="l00026"></a>00026 <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span>
<a name="l00027"></a>00027 <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span>
<a name="l00028"></a>00028 <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00029"></a>00029 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
<a name="l00030"></a>00030 <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00031"></a>00031 <span class="comment"> *</span>
<a name="l00032"></a>00032 <span class="comment"> */</span>
<a name="l00033"></a>00033
<a name="l00042"></a>00042 <span class="preprocessor">#ifndef __PACKET_INCLUDE______</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define __PACKET_INCLUDE______</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="preprocessor">#if !defined(NDIS30) &amp;&amp; !defined(NDIS50)</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#error NDIS30 or NDIS50 should be defined</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor">#ifdef _X86_</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define NTKERNEL </span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &quot;jitter.h&quot;</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 <span class="preprocessor">#ifdef HAVE_BUGGY_TME_SUPPORT</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#ifndef _X86_</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#error TME support is available only on x86 architectures</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif // _X86_</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#endif //HAVE_BUGGY_TME_SUPPORT</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="comment">//</span>
<a name="l00062"></a>00062 <span class="comment">// Needed to disable a warning due to the #pragma prefast directives,</span>
<a name="l00063"></a>00063 <span class="comment">// that are ignored by the normal DDK compiler</span>
<a name="l00064"></a>00064 <span class="comment">//</span>
<a name="l00065"></a>00065 <span class="preprocessor">#ifndef _PREFAST_</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(disable:4068)</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>
<a name="l00069"></a>00069 <span class="preprocessor">#include &quot;win_bpf.h&quot;</span>
<a name="l00070"></a>00070
<a name="l00071"></a><a class="code" href="group__NPF__include.html#ga8fc96cee4177a369a99de7026ebeba81">00071</a> <span class="preprocessor">#define MAX_REQUESTS 32 </span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00073"></a><a class="code" href="group__NPF__include.html#ga8463d2101446f74b83ed10006d772384">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define Packet_ALIGNMENT sizeof(int) </span>
<a name="l00074"></a><a class="code" href="group__NPF__include.html#ga6ad53095b69ed77878dc683754e3264a">00074</a> <span class="preprocessor">#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&amp;~(Packet_ALIGNMENT-1)) </span>
<a name="l00075"></a>00075 <span class="preprocessor"></span>
<a name="l00076"></a>00076 <span class="preprocessor"></span>
<a name="l00077"></a><a class="code" href="group__NPF__include.html#ga9cd2ca337001428aa9e1cb512a28ecc2">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define KERNEL_EVENT_NAMESPACE L&quot;\\BaseNamedObjects\\&quot;</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <span class="comment">// Working modes</span>
<a name="l00081"></a><a class="code" href="group__NPF__include.html#gac93c0a6ad1d2a3143b1115bdab3ac04d">00081</a> <span class="preprocessor">#define MODE_CAPT 0x0 </span>
<a name="l00082"></a><a class="code" href="group__NPF__include.html#ga503326906a62e96c147ae6af31fb5659">00082</a> <span class="preprocessor">#define MODE_STAT 0x1 </span>
<a name="l00083"></a><a class="code" href="group__NPF__include.html#ga528e7e542cb1a028a10a3a318880dffb">00083</a> <span class="preprocessor">#define MODE_MON 0x2 </span>
<a name="l00084"></a><a class="code" href="group__NPF__include.html#ga89853f93dc8cc890b0665629d16d2831">00084</a> <span class="preprocessor">#define MODE_DUMP 0x10 </span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="preprocessor"></span>
<a name="l00087"></a><a class="code" href="group__NPF__include.html#ga4f6749b7708a411df2a3341a3fcef917">00087</a> <span class="preprocessor">#define IMMEDIATE 1 </span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>
<a name="l00089"></a><a class="code" href="group__NPF__include.html#ga0a110077bb4fcbcc75512d8988c90de8">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define NDIS_FLAGS_SKIP_LOOPBACK_W2K 0x400 </span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>
<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="comment">// The following definitions are used to provide compatibility </span>
<a name="l00092"></a>00092 <span class="comment">// of the dump files with the ones of libpcap</span>
<a name="l00093"></a><a class="code" href="group__NPF__include.html#gafedcc0aa0cf5abe7b20c68eefdfcb126">00093</a> <span class="preprocessor">#define TCPDUMP_MAGIC 0xa1b2c3d4 </span>
<a name="l00094"></a><a class="code" href="group__NPF__include.html#gaac031371d41e21ff96e80409e05a7ddb">00094</a> <span class="preprocessor">#define PCAP_VERSION_MAJOR 2 </span>
<a name="l00095"></a><a class="code" href="group__NPF__include.html#ga9c200b070c9f626d38184588b16849c2">00095</a> <span class="preprocessor">#define PCAP_VERSION_MINOR 4 </span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="comment">// Loopback behaviour definitions</span>
<a name="l00098"></a><a class="code" href="group__NPF__include.html#ga7ccc8974741059b5ae25231a56dbed09">00098</a> <span class="preprocessor">#define NPF_DISABLE_LOOPBACK 1 </span>
<a name="l00099"></a><a class="code" href="group__NPF__include.html#ga4a60d1f215d5b2af2b3b86a0f2a90ae2">00099</a> <span class="preprocessor">#define NPF_ENABLE_LOOPBACK 2 </span>
<a name="l00100"></a>00100 <span class="preprocessor"></span>
<a name="l00101"></a>00101 <span class="preprocessor"></span>
<a name="l00106"></a><a class="code" href="structpacket__file__header.html">00106</a> <span class="keyword">struct </span><a class="code" href="structpacket__file__header.html" title="Header of a libpcap dump file.">packet_file_header</a>
<a name="l00107"></a>00107 {
<a name="l00108"></a><a class="code" href="structpacket__file__header.html#ab396ddef34e11edb49e5edfcc39c2dc7">00108</a> UINT <a class="code" href="structpacket__file__header.html#ab396ddef34e11edb49e5edfcc39c2dc7" title="Libpcap magic number.">magic</a>;
<a name="l00109"></a><a class="code" href="structpacket__file__header.html#a312dffcaa516df104318626fbdc01a77">00109</a> USHORT <a class="code" href="structpacket__file__header.html#a312dffcaa516df104318626fbdc01a77" title="Libpcap major version.">version_major</a>;
<a name="l00110"></a><a class="code" href="structpacket__file__header.html#a143bc467378ffbd0460662bd8912082b">00110</a> USHORT <a class="code" href="structpacket__file__header.html#a143bc467378ffbd0460662bd8912082b" title="Libpcap minor version.">version_minor</a>;
<a name="l00111"></a><a class="code" href="structpacket__file__header.html#ab0f3e0ccc83861eb84cd3da32f01f090">00111</a> UINT <a class="code" href="structpacket__file__header.html#ab0f3e0ccc83861eb84cd3da32f01f090" title="Gmt to local correction.">thiszone</a>;
<a name="l00112"></a><a class="code" href="structpacket__file__header.html#a5938c470e9e548ad2ac04923725e7721">00112</a> UINT <a class="code" href="structpacket__file__header.html#a5938c470e9e548ad2ac04923725e7721" title="Accuracy of timestamps.">sigfigs</a>;
<a name="l00113"></a><a class="code" href="structpacket__file__header.html#a45b189420d67014dba25bd13da85ddae">00113</a> UINT <a class="code" href="structpacket__file__header.html#a45b189420d67014dba25bd13da85ddae" title="Length of the max saved portion of each packet.">snaplen</a>;
<a name="l00114"></a><a class="code" href="structpacket__file__header.html#ab2a8854181cde7a065a43380b56fd2a1">00114</a> UINT <a class="code" href="structpacket__file__header.html#ab2a8854181cde7a065a43380b56fd2a1" title="Data link type (DLT_*). See win_bpf.h for details.">linktype</a>;
<a name="l00115"></a>00115 };
<a name="l00116"></a>00116
<a name="l00121"></a><a class="code" href="structsf__pkthdr.html">00121</a> <span class="keyword">struct </span><a class="code" href="structsf__pkthdr.html" title="Header associated to a packet in the driver&amp;#39;s buffer when the driver is in dump...">sf_pkthdr</a> {
<a name="l00122"></a><a class="code" href="structsf__pkthdr.html#a21be78b2818c91cb205885b8a6f5aed8">00122</a> <span class="keyword">struct </span>timeval <a class="code" href="structsf__pkthdr.html#a21be78b2818c91cb205885b8a6f5aed8" title="time stamp">ts</a>;
<a name="l00123"></a><a class="code" href="structsf__pkthdr.html#addde4bcd837b0ac2f4ab6472162c8ec2">00123</a> UINT <a class="code" href="structsf__pkthdr.html#addde4bcd837b0ac2f4ab6472162c8ec2">caplen</a>;
<a name="l00124"></a>00124
<a name="l00125"></a>00125
<a name="l00126"></a><a class="code" href="structsf__pkthdr.html#aacda8195c98d3cc32ebece7b17dac774">00126</a> UINT <a class="code" href="structsf__pkthdr.html#aacda8195c98d3cc32ebece7b17dac774" title="Length of the original packet (off wire).">len</a>;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="comment">//</span>
<a name="l00130"></a>00130 <span class="comment">// NT4 DDK doesn&apos;t have C_ASSERT</span>
<a name="l00131"></a>00131 <span class="comment">//</span>
<a name="l00132"></a>00132 <span class="preprocessor">#ifndef C_ASSERT</span>
<a name="l00133"></a><a class="code" href="group__NPF__include.html#ga7300b6880da1b61717e7ff815d579bf6">00133</a> <span class="preprocessor"></span><span class="preprocessor">#define C_ASSERT(a)</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span>
<a name="l00143"></a><a class="code" href="struct__PACKET__OID__DATA.html">00143</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__PACKET__OID__DATA.html" title="Structure containing an OID request.">_PACKET_OID_DATA</a> {
<a name="l00144"></a><a class="code" href="struct__PACKET__OID__DATA.html#a7f776f07ead21514e4c48555980644c8">00144</a> ULONG <a class="code" href="struct__PACKET__OID__DATA.html#a7f776f07ead21514e4c48555980644c8">Oid</a>;
<a name="l00145"></a>00145
<a name="l00146"></a><a class="code" href="struct__PACKET__OID__DATA.html#abfb371817eb1c8f0d8a165bb2b798092">00146</a> ULONG <a class="code" href="struct__PACKET__OID__DATA.html#abfb371817eb1c8f0d8a165bb2b798092" title="Length of the data field.">Length</a>;
<a name="l00147"></a><a class="code" href="struct__PACKET__OID__DATA.html#a4cbcc2ef0ca2424d2488748b944f4507">00147</a> UCHAR <a class="code" href="struct__PACKET__OID__DATA.html#a4cbcc2ef0ca2424d2488748b944f4507">Data</a>[1];
<a name="l00148"></a>00148
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150 <a class="code" href="struct__PACKET__OID__DATA.html" title="Structure containing an OID request.">PACKET_OID_DATA</a>, *<a class="code" href="struct__PACKET__OID__DATA.html" title="Structure containing an OID request.">PPACKET_OID_DATA</a>;
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <a class="code" href="group__NPF__include.html#ga7300b6880da1b61717e7ff815d579bf6">C_ASSERT</a>(<span class="keyword">sizeof</span>(<a class="code" href="struct__PACKET__OID__DATA.html" title="Structure containing an OID request.">PACKET_OID_DATA</a>) == 12);
<a name="l00153"></a>00153
<a name="l00163"></a><a class="code" href="struct__INTERNAL__REQUEST.html">00163</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__INTERNAL__REQUEST.html" title="Stores an OID request.">_INTERNAL_REQUEST</a> {
<a name="l00164"></a><a class="code" href="struct__INTERNAL__REQUEST.html#a52c50c47cc14f9989d741158ef6da1b9">00164</a> LIST_ENTRY <a class="code" href="struct__INTERNAL__REQUEST.html#a52c50c47cc14f9989d741158ef6da1b9" title="Used to handle lists of requests.">ListElement</a>;
<a name="l00165"></a>00165 <span class="comment">// PIRP Irp; ///&lt; Irp that performed the request</span>
<a name="l00166"></a>00166 <span class="comment">// BOOLEAN Internal; ///&lt; True if the request is for internal use of npf.sys. False if the request is performed by the user through an IOCTL.</span>
<a name="l00167"></a><a class="code" href="struct__INTERNAL__REQUEST.html#aa27c26f410846e10408bc8ac558430b9">00167</a> NDIS_EVENT <a class="code" href="struct__INTERNAL__REQUEST.html#aa27c26f410846e10408bc8ac558430b9">InternalRequestCompletedEvent</a>;
<a name="l00168"></a><a class="code" href="struct__INTERNAL__REQUEST.html#a9d22abed5e537b5a86700c0cae0aeeda">00168</a> NDIS_REQUEST <a class="code" href="struct__INTERNAL__REQUEST.html#a9d22abed5e537b5a86700c0cae0aeeda" title="The structure with the actual request, that will be passed to NdisRequest().">Request</a>;
<a name="l00169"></a><a class="code" href="struct__INTERNAL__REQUEST.html#a1948690a3012c81acf392ba489b32b60">00169</a> NDIS_STATUS <a class="code" href="struct__INTERNAL__REQUEST.html#a1948690a3012c81acf392ba489b32b60">RequestStatus</a>;
<a name="l00170"></a>00170
<a name="l00171"></a>00171 } <a class="code" href="struct__INTERNAL__REQUEST.html" title="Stores an OID request.">INTERNAL_REQUEST</a>, *<a class="code" href="struct__INTERNAL__REQUEST.html" title="Stores an OID request.">PINTERNAL_REQUEST</a>;
<a name="l00172"></a>00172
<a name="l00180"></a><a class="code" href="struct__PACKET__RESERVED.html">00180</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__PACKET__RESERVED.html" title="Contains a NDIS packet.">_PACKET_RESERVED</a> {
<a name="l00181"></a><a class="code" href="struct__PACKET__RESERVED.html#a52c50c47cc14f9989d741158ef6da1b9">00181</a> LIST_ENTRY <a class="code" href="struct__PACKET__RESERVED.html#a52c50c47cc14f9989d741158ef6da1b9" title="Used to handle lists of packets.">ListElement</a>;
<a name="l00182"></a><a class="code" href="struct__PACKET__RESERVED.html#a4bee02d146b824008b9d03379b085b1e">00182</a> PIRP <a class="code" href="struct__PACKET__RESERVED.html#a4bee02d146b824008b9d03379b085b1e" title="Irp that performed the request.">Irp</a>;
<a name="l00183"></a><a class="code" href="struct__PACKET__RESERVED.html#a3bbb67b64845622d97356325852ef6be">00183</a> PMDL <a class="code" href="struct__PACKET__RESERVED.html#a3bbb67b64845622d97356325852ef6be" title="MDL mapping the buffer of the packet.">pMdl</a>;
<a name="l00184"></a><a class="code" href="struct__PACKET__RESERVED.html#abc42eac7c5d3593aa809edceadb0743f">00184</a> BOOLEAN <a class="code" href="struct__PACKET__RESERVED.html#abc42eac7c5d3593aa809edceadb0743f">FreeBufAfterWrite</a>;
<a name="l00185"></a>00185
<a name="l00186"></a><a class="code" href="struct__PACKET__RESERVED.html#a761baf004d76cf5faf3c898787fceeb6">00186</a> ULONG <a class="code" href="struct__PACKET__RESERVED.html#a761baf004d76cf5faf3c898787fceeb6" title="The CPU on which the packet was pulled out of the linked list of free packets.">Cpu</a>;
<a name="l00187"></a>00187 } <a class="code" href="struct__PACKET__RESERVED.html" title="Contains a NDIS packet.">PACKET_RESERVED</a>, *<a class="code" href="struct__PACKET__RESERVED.html" title="Contains a NDIS packet.">PPACKET_RESERVED</a>;
<a name="l00188"></a>00188
<a name="l00189"></a><a class="code" href="group__NPF__include.html#ga048ba8dfabc6ac16c602a1ca6fe994fc">00189</a> <span class="preprocessor">#define RESERVED(_p) ((PPACKET_RESERVED)((_p)-&gt;ProtocolReserved)) </span>
<a name="l00190"></a>00190 <span class="preprocessor"></span>
<a name="l00191"></a>00191 <span class="preprocessor"></span>
<a name="l00196"></a><a class="code" href="struct__DEVICE__EXTENSION.html">00196</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__DEVICE__EXTENSION.html" title="Port device extension.">_DEVICE_EXTENSION</a> {
<a name="l00197"></a><a class="code" href="struct__DEVICE__EXTENSION.html#a8201dab43dd06ad55b93317cbbd54211">00197</a> NDIS_STRING <a class="code" href="struct__DEVICE__EXTENSION.html#a8201dab43dd06ad55b93317cbbd54211" title="Name of the adapter.">AdapterName</a>;
<a name="l00198"></a><a class="code" href="struct__DEVICE__EXTENSION.html#a147b6ff0677e88b5721e51ab7759121a">00198</a> PWSTR <a class="code" href="struct__DEVICE__EXTENSION.html#a147b6ff0677e88b5721e51ab7759121a">ExportString</a>;
<a name="l00199"></a>00199
<a name="l00200"></a>00200 } <a class="code" href="struct__DEVICE__EXTENSION.html" title="Port device extension.">DEVICE_EXTENSION</a>, *<a class="code" href="struct__DEVICE__EXTENSION.html" title="Port device extension.">PDEVICE_EXTENSION</a>;
<a name="l00201"></a>00201
<a name="l00207"></a><a class="code" href="struct____CPU__Private__Data.html">00207</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct____CPU__Private__Data.html" title="Kernel buffer of each CPU.">__CPU_Private_Data</a>
<a name="l00208"></a>00208 {
<a name="l00209"></a><a class="code" href="struct____CPU__Private__Data.html#a897d2179904e0d6fafd73b3d400052de">00209</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#a897d2179904e0d6fafd73b3d400052de" title="Zero-based index of the producer in the buffer. It indicates the first free byte...">P</a>;
<a name="l00210"></a><a class="code" href="struct____CPU__Private__Data.html#a2df61425b58c12f1de6f0e6aaeb131ea">00210</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#a2df61425b58c12f1de6f0e6aaeb131ea" title="Zero-based index of the consumer in the buffer. It indicates the first free byte...">C</a>;
<a name="l00211"></a><a class="code" href="struct____CPU__Private__Data.html#acaf5ef1e959170b06d01fc65a27bb951">00211</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#acaf5ef1e959170b06d01fc65a27bb951" title="Number of the free bytes in the buffer.">Free</a>;
<a name="l00212"></a><a class="code" href="struct____CPU__Private__Data.html#a7ed9f5e612c567cfa25af0f46a25dad4">00212</a> PUCHAR <a class="code" href="struct____CPU__Private__Data.html#a7ed9f5e612c567cfa25af0f46a25dad4" title="Pointer to the kernel buffer used to capture packets.">Buffer</a>;
<a name="l00213"></a><a class="code" href="struct____CPU__Private__Data.html#ac723ebbda9ff2ef8e4d773c7305db1f6">00213</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#ac723ebbda9ff2ef8e4d773c7305db1f6">Accepted</a>;
<a name="l00214"></a>00214
<a name="l00215"></a>00215
<a name="l00216"></a>00216
<a name="l00217"></a><a class="code" href="struct____CPU__Private__Data.html#a82febc79f3f3bbf857a4fd34447b5ca2">00217</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#a82febc79f3f3bbf857a4fd34447b5ca2">Received</a>;
<a name="l00218"></a>00218
<a name="l00219"></a>00219
<a name="l00220"></a>00220
<a name="l00221"></a><a class="code" href="struct____CPU__Private__Data.html#a04eecb86252e644a73f38346274340dc">00221</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#a04eecb86252e644a73f38346274340dc">Dropped</a>;
<a name="l00222"></a>00222
<a name="l00223"></a>00223
<a name="l00224"></a>00224
<a name="l00225"></a><a class="code" href="struct____CPU__Private__Data.html#a59c9030d87b24c9cb4efdabe9c7b9337">00225</a> NDIS_SPIN_LOCK <a class="code" href="struct____CPU__Private__Data.html#a59c9030d87b24c9cb4efdabe9c7b9337" title="It protects the buffer associated with this CPU.">BufferLock</a>;
<a name="l00226"></a><a class="code" href="struct____CPU__Private__Data.html#acae03ade5065032ceaeef0bd03217b4f">00226</a> PMDL <a class="code" href="struct____CPU__Private__Data.html#acae03ade5065032ceaeef0bd03217b4f" title="MDL used to map the portion of the buffer that will contain an incoming packet.">TransferMdl1</a>;
<a name="l00227"></a><a class="code" href="struct____CPU__Private__Data.html#a17b59e156d00ef5c76bdfe454c73ca49">00227</a> PMDL <a class="code" href="struct____CPU__Private__Data.html#a17b59e156d00ef5c76bdfe454c73ca49" title="Second MDL used to map the portion of the buffer that will contain an incoming packet...">TransferMdl2</a>;
<a name="l00228"></a><a class="code" href="struct____CPU__Private__Data.html#a58f2c915dfc7041ccb0d568eb79b494e">00228</a> ULONG <a class="code" href="struct____CPU__Private__Data.html#a58f2c915dfc7041ccb0d568eb79b494e" title="Used by NdisTransferData() (when we call NdisTransferData, p index must be updated...">NewP</a>;
<a name="l00229"></a>00229 }
<a name="l00230"></a>00230 <a class="code" href="struct____CPU__Private__Data.html" title="Kernel buffer of each CPU.">CpuPrivateData</a>;
<a name="l00231"></a>00231
<a name="l00232"></a>00232
<a name="l00240"></a><a class="code" href="struct__OPEN__INSTANCE.html">00240</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__OPEN__INSTANCE.html" title="Contains the state of a running instance of the NPF driver.">_OPEN_INSTANCE</a>
<a name="l00241"></a>00241 {
<a name="l00242"></a><a class="code" href="struct__OPEN__INSTANCE.html#aaa72c26b5a1b98197da412302325e009">00242</a> PDEVICE_EXTENSION <a class="code" href="struct__OPEN__INSTANCE.html#aaa72c26b5a1b98197da412302325e009">DeviceExtension</a>;
<a name="l00243"></a>00243
<a name="l00244"></a><a class="code" href="struct__OPEN__INSTANCE.html#aa017f65671fb96e4a0d3e875536579df">00244</a> NDIS_HANDLE <a class="code" href="struct__OPEN__INSTANCE.html#aa017f65671fb96e4a0d3e875536579df" title="NDIS idetifier of the adapter used by this instance.">AdapterHandle</a>;
<a name="l00245"></a><a class="code" href="struct__OPEN__INSTANCE.html#af6a81c046e634d6149550d3475924c05">00245</a> UINT <a class="code" href="struct__OPEN__INSTANCE.html#af6a81c046e634d6149550d3475924c05">Medium</a>;
<a name="l00246"></a>00246
<a name="l00247"></a><a class="code" href="struct__OPEN__INSTANCE.html#abb035c7e10216edcf41fa1576fecca42">00247</a> NDIS_HANDLE <a class="code" href="struct__OPEN__INSTANCE.html#abb035c7e10216edcf41fa1576fecca42" title="Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver...">PacketPool</a>;
<a name="l00248"></a><a class="code" href="struct__OPEN__INSTANCE.html#abe53f2762ef5451c80b2fcadeff59884">00248</a> KSPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#abe53f2762ef5451c80b2fcadeff59884" title="SpinLock used to synchronize the OID requests.">RequestSpinLock</a>;
<a name="l00249"></a><a class="code" href="struct__OPEN__INSTANCE.html#a805c530d7fa5f6078b9170dc0cd03f5c">00249</a> LIST_ENTRY <a class="code" href="struct__OPEN__INSTANCE.html#a805c530d7fa5f6078b9170dc0cd03f5c" title="List of pending OID requests.">RequestList</a>;
<a name="l00250"></a><a class="code" href="struct__OPEN__INSTANCE.html#a1836c9a11084bf113d902946c5c41499">00250</a> LIST_ENTRY <a class="code" href="struct__OPEN__INSTANCE.html#a1836c9a11084bf113d902946c5c41499" title="List of pending adapter reset requests.">ResetIrpList</a>;
<a name="l00251"></a><a class="code" href="struct__OPEN__INSTANCE.html#a9a6854a154d332159dbcb19e5d104441">00251</a> <a class="code" href="struct__INTERNAL__REQUEST.html" title="Stores an OID request.">INTERNAL_REQUEST</a> <a class="code" href="struct__OPEN__INSTANCE.html#a9a6854a154d332159dbcb19e5d104441" title="Array of structures that wrap every single OID request.">Requests</a>[<a class="code" href="group__NPF__include.html#ga8fc96cee4177a369a99de7026ebeba81" title="Maximum number of simultaneous IOCTL requests.">MAX_REQUESTS</a>];
<a name="l00252"></a><a class="code" href="struct__OPEN__INSTANCE.html#a006227bc7ca0b2df920a8adfb7740ecb">00252</a> PMDL <a class="code" href="struct__OPEN__INSTANCE.html#a006227bc7ca0b2df920a8adfb7740ecb" title="Pointer to a Memory descriptor list (MDL) that maps the circular buffer&amp;#39;s memory...">BufferMdl</a>;
<a name="l00253"></a><a class="code" href="struct__OPEN__INSTANCE.html#a6139735ab3e4fa797d344e314bba6473">00253</a> PKEVENT <a class="code" href="struct__OPEN__INSTANCE.html#a6139735ab3e4fa797d344e314bba6473" title="Pointer to the event on which the read calls on this instance must wait.">ReadEvent</a>;
<a name="l00254"></a><a class="code" href="struct__OPEN__INSTANCE.html#a312a1a6ffddf98f960cd0ac2d56fce52">00254</a> PUCHAR <a class="code" href="struct__OPEN__INSTANCE.html#a312a1a6ffddf98f960cd0ac2d56fce52">bpfprogram</a>;
<a name="l00255"></a>00255
<a name="l00256"></a>00256
<a name="l00257"></a>00257
<a name="l00258"></a>00258
<a name="l00259"></a>00259 <span class="preprocessor">#ifdef _X86_</span>
<a name="l00260"></a>00260 <span class="preprocessor"></span> <a class="code" href="structJIT__BPF__Filter.html" title="Structure describing a x86 filtering program created by the jitter.">JIT_BPF_Filter</a> *Filter;
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="preprocessor">#endif //_X86_</span>
<a name="l00263"></a><a class="code" href="struct__OPEN__INSTANCE.html#a263f7d6f5db5625541d275380685f0b1">00263</a> <span class="preprocessor"></span> UINT <a class="code" href="struct__OPEN__INSTANCE.html#a263f7d6f5db5625541d275380685f0b1">MinToCopy</a>;
<a name="l00264"></a>00264
<a name="l00265"></a><a class="code" href="struct__OPEN__INSTANCE.html#aa6709070de8443c026e3b86913942c2b">00265</a> LARGE_INTEGER <a class="code" href="struct__OPEN__INSTANCE.html#aa6709070de8443c026e3b86913942c2b">TimeOut</a>;
<a name="l00266"></a>00266
<a name="l00267"></a>00267
<a name="l00268"></a><a class="code" href="struct__OPEN__INSTANCE.html#a1ea5d0cb93f22f7d0fdf804bd68c3326">00268</a> <span class="keywordtype">int</span> <a class="code" href="struct__OPEN__INSTANCE.html#a1ea5d0cb93f22f7d0fdf804bd68c3326" title="Working mode of the driver. See PacketSetMode() for details.">mode</a>;
<a name="l00269"></a><a class="code" href="struct__OPEN__INSTANCE.html#a87b5968c02200b033f7c6e15da439e62">00269</a> LARGE_INTEGER <a class="code" href="struct__OPEN__INSTANCE.html#a87b5968c02200b033f7c6e15da439e62" title="Amount of bytes accepted by the filter when this instance is in statistical mode...">Nbytes</a>;
<a name="l00270"></a><a class="code" href="struct__OPEN__INSTANCE.html#a51a42386327e2a337854dd20cbe83061">00270</a> LARGE_INTEGER <a class="code" href="struct__OPEN__INSTANCE.html#a51a42386327e2a337854dd20cbe83061" title="Number of packets accepted by the filter when this instance is in statistical mode...">Npackets</a>;
<a name="l00271"></a><a class="code" href="struct__OPEN__INSTANCE.html#a7bd68a3950090232f1147e501a4ccf78">00271</a> NDIS_SPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#a7bd68a3950090232f1147e501a4ccf78" title="SpinLock that protects the statistical mode counters.">CountersLock</a>;
<a name="l00272"></a><a class="code" href="struct__OPEN__INSTANCE.html#af6b5b0a348f7a40d795b554b0eceed73">00272</a> UINT <a class="code" href="struct__OPEN__INSTANCE.html#af6b5b0a348f7a40d795b554b0eceed73">Nwrites</a>;
<a name="l00273"></a>00273
<a name="l00274"></a><a class="code" href="struct__OPEN__INSTANCE.html#aaa76c3b87b73baaa785c459188d769e0">00274</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#aaa76c3b87b73baaa785c459188d769e0" title="Counts the number of times a single write has already physically repeated.">Multiple_Write_Counter</a>;
<a name="l00275"></a><a class="code" href="struct__OPEN__INSTANCE.html#a46f6423b318291c7cc6ae32c226b33fd">00275</a> NDIS_EVENT <a class="code" href="struct__OPEN__INSTANCE.html#a46f6423b318291c7cc6ae32c226b33fd" title="Event used to synchronize the multiple write process.">WriteEvent</a>;
<a name="l00276"></a><a class="code" href="struct__OPEN__INSTANCE.html#af854d4eefa0f15302eaccee06e1ef447">00276</a> BOOLEAN <a class="code" href="struct__OPEN__INSTANCE.html#af854d4eefa0f15302eaccee06e1ef447">WriteInProgress</a>;
<a name="l00277"></a>00277
<a name="l00278"></a><a class="code" href="struct__OPEN__INSTANCE.html#a44ab7ba650b09972a0677958ad0ea4e0">00278</a> NDIS_SPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#a44ab7ba650b09972a0677958ad0ea4e0" title="SpinLock that protects the WriteInProgress variable.">WriteLock</a>;
<a name="l00279"></a><a class="code" href="struct__OPEN__INSTANCE.html#af63559424b5849687cc5c5fbad184c0f">00279</a> NDIS_EVENT <a class="code" href="struct__OPEN__INSTANCE.html#af63559424b5849687cc5c5fbad184c0f" title="Event used to synchronize I/O requests with the callback structure of NDIS.">NdisRequestEvent</a>;
<a name="l00280"></a><a class="code" href="struct__OPEN__INSTANCE.html#a445a6029d067430cd761ae692443b573">00280</a> BOOLEAN <a class="code" href="struct__OPEN__INSTANCE.html#a445a6029d067430cd761ae692443b573" title="True if this instance should not capture back the packets that it transmits.">SkipSentPackets</a>;
<a name="l00281"></a><a class="code" href="struct__OPEN__INSTANCE.html#af4f46bc8ed07a40605aeac6743a3e760">00281</a> NDIS_STATUS <a class="code" href="struct__OPEN__INSTANCE.html#af4f46bc8ed07a40605aeac6743a3e760" title="Maintains the status of and OID request call, that will be passed to the application...">IOStatus</a>;
<a name="l00282"></a><a class="code" href="struct__OPEN__INSTANCE.html#affef27f71b541e5dfab6a3dc9ea7dd86">00282</a> HANDLE <a class="code" href="struct__OPEN__INSTANCE.html#affef27f71b541e5dfab6a3dc9ea7dd86" title="Handle of the file used in dump mode.">DumpFileHandle</a>;
<a name="l00283"></a><a class="code" href="struct__OPEN__INSTANCE.html#a093d2624638004aafcc3193328cf2626">00283</a> PFILE_OBJECT <a class="code" href="struct__OPEN__INSTANCE.html#a093d2624638004aafcc3193328cf2626" title="Pointer to the object of the file used in dump mode.">DumpFileObject</a>;
<a name="l00284"></a><a class="code" href="struct__OPEN__INSTANCE.html#af5fc8480398782ff1f676f25f5097768">00284</a> PKTHREAD <a class="code" href="struct__OPEN__INSTANCE.html#af5fc8480398782ff1f676f25f5097768" title="Pointer to the object of the thread used in dump mode.">DumpThreadObject</a>;
<a name="l00285"></a><a class="code" href="struct__OPEN__INSTANCE.html#afb4bb3d6e021e9b1cc1206fa23d4c8f7">00285</a> HANDLE <a class="code" href="struct__OPEN__INSTANCE.html#afb4bb3d6e021e9b1cc1206fa23d4c8f7" title="Handle of the thread created by dump mode to asynchronously move the buffer to disk...">DumpThreadHandle</a>;
<a name="l00286"></a><a class="code" href="struct__OPEN__INSTANCE.html#a1485cbdca5f70ed6a4eb8fd26feec1e0">00286</a> NDIS_EVENT <a class="code" href="struct__OPEN__INSTANCE.html#a1485cbdca5f70ed6a4eb8fd26feec1e0" title="Event used to synchronize the dump thread with the tap when the instance is in dump...">DumpEvent</a>;
<a name="l00287"></a><a class="code" href="struct__OPEN__INSTANCE.html#a00c3ae6811320e03dea5b400fc5f9da8">00287</a> LARGE_INTEGER <a class="code" href="struct__OPEN__INSTANCE.html#a00c3ae6811320e03dea5b400fc5f9da8" title="Current offset in the dump file.">DumpOffset</a>;
<a name="l00288"></a><a class="code" href="struct__OPEN__INSTANCE.html#ad26771cfc74dde2d2ce22b38db3124b0">00288</a> UNICODE_STRING <a class="code" href="struct__OPEN__INSTANCE.html#ad26771cfc74dde2d2ce22b38db3124b0" title="String containing the name of the dump file.">DumpFileName</a>;
<a name="l00289"></a><a class="code" href="struct__OPEN__INSTANCE.html#acfde736fb2a011607da168a05b5100b0">00289</a> UINT <a class="code" href="struct__OPEN__INSTANCE.html#acfde736fb2a011607da168a05b5100b0">MaxDumpBytes</a>;
<a name="l00290"></a>00290
<a name="l00291"></a><a class="code" href="struct__OPEN__INSTANCE.html#a3f6accd17a8dccf9b44acc678510a094">00291</a> UINT <a class="code" href="struct__OPEN__INSTANCE.html#a3f6accd17a8dccf9b44acc678510a094">MaxDumpPacks</a>;
<a name="l00292"></a>00292
<a name="l00293"></a>00293
<a name="l00294"></a><a class="code" href="struct__OPEN__INSTANCE.html#a612913cea459725cff2085d29e534aae">00294</a> BOOLEAN <a class="code" href="struct__OPEN__INSTANCE.html#a612913cea459725cff2085d29e534aae">DumpLimitReached</a>;
<a name="l00295"></a>00295
<a name="l00296"></a>00296 <span class="preprocessor">#ifdef HAVE_BUGGY_TME_SUPPORT</span>
<a name="l00297"></a>00297 <span class="preprocessor"></span> MEM_TYPE mem_ex;
<a name="l00298"></a>00298 TME_CORE tme;
<a name="l00299"></a>00299 <span class="preprocessor">#endif //HAVE_BUGGY_TME_SUPPORT</span>
<a name="l00300"></a>00300 <span class="preprocessor"></span>
<a name="l00301"></a><a class="code" href="struct__OPEN__INSTANCE.html#afe174f20f512159a454365613846eca5">00301</a> NDIS_SPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#afe174f20f512159a454365613846eca5" title="SpinLock that protects the BPF filter and the TME engine, if in use.">MachineLock</a>;
<a name="l00302"></a><a class="code" href="struct__OPEN__INSTANCE.html#ac672771358770d24087aaa12a80d01cb">00302</a> UINT <a class="code" href="struct__OPEN__INSTANCE.html#ac672771358770d24087aaa12a80d01cb">MaxFrameSize</a>;
<a name="l00303"></a>00303
<a name="l00304"></a>00304 <span class="comment">//</span>
<a name="l00305"></a>00305 <span class="comment">// KAFFINITY is used as a bit mask for the affinity in the system. So on every supported OS is big enough for all the CPUs on the system (32 bits on x86, 64 on x64?).</span>
<a name="l00306"></a>00306 <span class="comment">// We use its size to compute the max number of CPUs.</span>
<a name="l00307"></a>00307 <span class="comment">//</span>
<a name="l00308"></a><a class="code" href="struct__OPEN__INSTANCE.html#a289c7590d7f5d96fa9051d20c2a95a04">00308</a> <a class="code" href="struct____CPU__Private__Data.html" title="Kernel buffer of each CPU.">CpuPrivateData</a> <a class="code" href="struct__OPEN__INSTANCE.html#a289c7590d7f5d96fa9051d20c2a95a04" title="Pool of kernel buffer structures, one for each CPU.">CpuData</a>[<span class="keyword">sizeof</span>(KAFFINITY) * 8];
<a name="l00309"></a><a class="code" href="struct__OPEN__INSTANCE.html#a80fd41275e80049cbe8238917a1dfb33">00309</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#a80fd41275e80049cbe8238917a1dfb33" title="Sequence number of the next packet to be read from the pool of kernel buffers.">ReaderSN</a>;
<a name="l00310"></a><a class="code" href="struct__OPEN__INSTANCE.html#ae58565fec941091aa7164b49121ffe2b">00310</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#ae58565fec941091aa7164b49121ffe2b">WriterSN</a>;
<a name="l00311"></a>00311
<a name="l00312"></a><a class="code" href="struct__OPEN__INSTANCE.html#a1ce5ea4c97c82145e50d4b5157889a0e">00312</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#a1ce5ea4c97c82145e50d4b5157889a0e" title="Size of each kernel buffer contained in the CpuData field.">Size</a>;
<a name="l00313"></a><a class="code" href="struct__OPEN__INSTANCE.html#a7157ac074af79faeddb2feef7a891af7">00313</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#a7157ac074af79faeddb2feef7a891af7">AdapterHandleUsageCounter</a>;
<a name="l00314"></a><a class="code" href="struct__OPEN__INSTANCE.html#adbc32cf0b83107c2ad2785b8c71a946b">00314</a> NDIS_SPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#adbc32cf0b83107c2ad2785b8c71a946b">AdapterHandleLock</a>;
<a name="l00315"></a><a class="code" href="struct__OPEN__INSTANCE.html#aa8dd1c538f9932a866ac342d50277929">00315</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#aa8dd1c538f9932a866ac342d50277929" title="Specifies if NPF is still bound to the adapter used by this instance, it&amp;#39;s unbinding...">AdapterBindingStatus</a>;
<a name="l00316"></a>00316
<a name="l00317"></a><a class="code" href="struct__OPEN__INSTANCE.html#a58faf70e2b245f7d3f2b1a90257e823e">00317</a> NDIS_EVENT <a class="code" href="struct__OPEN__INSTANCE.html#a58faf70e2b245f7d3f2b1a90257e823e">NdisOpenCloseCompleteEvent</a>;
<a name="l00318"></a><a class="code" href="struct__OPEN__INSTANCE.html#ae16d8f96321924cea79edfba9a2aed9f">00318</a> NDIS_EVENT <a class="code" href="struct__OPEN__INSTANCE.html#ae16d8f96321924cea79edfba9a2aed9f" title="Event that is signalled when all the packets have been successfully sent by NdisSend...">NdisWriteCompleteEvent</a>;
<a name="l00319"></a><a class="code" href="struct__OPEN__INSTANCE.html#ae3c547ec9f715618b461b221fa2e3f09">00319</a> NTSTATUS <a class="code" href="struct__OPEN__INSTANCE.html#ae3c547ec9f715618b461b221fa2e3f09">OpenCloseStatus</a>;
<a name="l00320"></a><a class="code" href="struct__OPEN__INSTANCE.html#a3134a9bd6b67acf8eb8f5fd7a36228d7">00320</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#a3134a9bd6b67acf8eb8f5fd7a36228d7" title="Specifies the number of packets that are pending to be transmitted, i.e. have been...">TransmitPendingPackets</a>;
<a name="l00321"></a><a class="code" href="struct__OPEN__INSTANCE.html#ad829423b08d53cd76dc8bed902d5af72">00321</a> ULONG <a class="code" href="struct__OPEN__INSTANCE.html#ad829423b08d53cd76dc8bed902d5af72">NumPendingIrps</a>;
<a name="l00322"></a><a class="code" href="struct__OPEN__INSTANCE.html#ae00f3e1e556edb44c5bbf7f4f75f117a">00322</a> BOOLEAN <a class="code" href="struct__OPEN__INSTANCE.html#ae00f3e1e556edb44c5bbf7f4f75f117a">ClosePending</a>;
<a name="l00323"></a><a class="code" href="struct__OPEN__INSTANCE.html#a4c6d0506eca78eb6602764234ce07e62">00323</a> NDIS_SPIN_LOCK <a class="code" href="struct__OPEN__INSTANCE.html#a4c6d0506eca78eb6602764234ce07e62">OpenInUseLock</a>;
<a name="l00324"></a>00324 }
<a name="l00325"></a>00325 <a class="code" href="struct__OPEN__INSTANCE.html" title="Contains the state of a running instance of the NPF driver.">OPEN_INSTANCE</a>, *<a class="code" href="struct__OPEN__INSTANCE.html" title="Contains the state of a running instance of the NPF driver.">POPEN_INSTANCE</a>;
<a name="l00326"></a>00326
<a name="l00327"></a><a class="code" href="group__NPF__include.html#gaa80226df1c5ee18b01580d23ed4f31cb">00327</a> <span class="keyword">enum</span> <a class="code" href="group__NPF__include.html#gaa80226df1c5ee18b01580d23ed4f31cb">ADAPTER_BINDING_STATUS</a>
<a name="l00328"></a>00328 {
<a name="l00329"></a><a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cba6e4cdf9f09abf447cffdfd5058357822">00329</a> <a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cba6e4cdf9f09abf447cffdfd5058357822">ADAPTER_UNBOUND</a>,
<a name="l00330"></a><a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cba3e0c0f314d2e9dc41c205ab44bf087bc">00330</a> <a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cba3e0c0f314d2e9dc41c205ab44bf087bc">ADAPTER_BOUND</a>,
<a name="l00331"></a><a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cbadc92e852ef35fac0f033487a3be66a93">00331</a> <a class="code" href="group__NPF__include.html#ggaa80226df1c5ee18b01580d23ed4f31cbadc92e852ef35fac0f033487a3be66a93">ADAPTER_UNBINDING</a>,
<a name="l00332"></a>00332 };
<a name="l00333"></a>00333
<a name="l00341"></a><a class="code" href="structPacketHeader.html">00341</a> <span class="keyword">struct </span><a class="code" href="structPacketHeader.html" title="Structure prepended to each packet in the kernel buffer pool.">PacketHeader</a>
<a name="l00342"></a>00342 {
<a name="l00343"></a><a class="code" href="structPacketHeader.html#afbd4efa90a98223b9ebe18574c057b47">00343</a> ULONG <a class="code" href="structPacketHeader.html#afbd4efa90a98223b9ebe18574c057b47" title="Sequence number of the packet.">SN</a>;
<a name="l00344"></a><a class="code" href="structPacketHeader.html#ae2f3ed1162db1cfdbd9abe8f203426ad">00344</a> <span class="keyword">struct </span>bpf_hdr <a class="code" href="structPacketHeader.html#ae2f3ed1162db1cfdbd9abe8f203426ad" title="bpf header, created by the tap, and copied unmodified to user level programs.">header</a>;
<a name="l00345"></a>00345 };
<a name="l00346"></a>00346
<a name="l00347"></a>00347 <span class="keyword">extern</span> ULONG <a class="code" href="group__NPF__include.html#ga980b14c18716a1788990f8e68fed9420">g_NCpu</a>;
<a name="l00348"></a>00348 <span class="keyword">extern</span> NDIS_HANDLE <a class="code" href="group__NPF__include.html#ga5d6fbe2176d19b191fa7aaac4d6d6bb5">g_NdisProtocolHandle</a>;
<a name="l00349"></a>00349 <span class="keyword">extern</span> <span class="keyword">struct </span>time_conv <a class="code" href="group__NPF__include.html#ga8bd3dab633cae7a1a47c4ddb2705a31b">G_Start_Time</a>; <span class="comment">// from openclos.c</span>
<a name="l00350"></a>00350 <span class="keyword">extern</span> UINT <a class="code" href="group__NPF__include.html#gab325d08691ab69e4f942f6a418a41db2">g_SendPacketFlags</a>;
<a name="l00351"></a>00351
<a name="l00352"></a><a class="code" href="group__NPF__include.html#ga652e6173ee1441712652d74a5533e042">00352</a> <span class="preprocessor">#define TRANSMIT_PACKETS 256 </span>
<a name="l00353"></a>00353 <span class="preprocessor"></span>
<a name="l00354"></a>00354 <span class="preprocessor"></span>
<a name="l00355"></a>00355 <span class="preprocessor"></span>
<a name="l00357"></a><a class="code" href="group__NPF__include.html#gacabf25322566f3bcd1e564e4939f5821">00357</a> <span class="preprocessor">#define EXIT_SUCCESS(quantity) Irp-&gt;IoStatus.Information=quantity;\</span>
<a name="l00358"></a>00358 <span class="preprocessor"> Irp-&gt;IoStatus.Status = STATUS_SUCCESS;\</span>
<a name="l00359"></a>00359 <span class="preprocessor"> IoCompleteRequest(Irp, IO_NO_INCREMENT);\</span>
<a name="l00360"></a>00360 <span class="preprocessor"> return STATUS_SUCCESS;\</span>
<a name="l00361"></a>00361 <span class="preprocessor"></span>
<a name="l00363"></a><a class="code" href="group__NPF__include.html#gad6d1f5522a147ddeb7d9b11916acd50a">00363</a> <span class="preprocessor">#define EXIT_FAILURE(quantity) Irp-&gt;IoStatus.Information=quantity;\</span>
<a name="l00364"></a>00364 <span class="preprocessor"> Irp-&gt;IoStatus.Status = STATUS_UNSUCCESSFUL;\</span>
<a name="l00365"></a>00365 <span class="preprocessor"> IoCompleteRequest(Irp, IO_NO_INCREMENT);\</span>
<a name="l00366"></a>00366 <span class="preprocessor"> return STATUS_UNSUCCESSFUL;\</span>
<a name="l00367"></a>00367 <span class="preprocessor"></span>
<a name="l00368"></a>00368 <span class="preprocessor"></span>
<a name="l00373"></a>00373 <span class="comment">/***************************/</span>
<a name="l00374"></a>00374 <span class="comment">/* Prototypes */</span>
<a name="l00375"></a>00375 <span class="comment">/***************************/</span>
<a name="l00376"></a>00376
<a name="l00393"></a>00393 NTSTATUS
<a name="l00394"></a>00394 <a class="code" href="group__NPF__code.html#ga6502d781bd20234a06710b92d540baba" title="The initialization routine of the driver.">DriverEntry</a>(
<a name="l00395"></a>00395 IN PDRIVER_OBJECT DriverObject,
<a name="l00396"></a>00396 IN PUNICODE_STRING RegistryPath
<a name="l00397"></a>00397 );
<a name="l00398"></a>00398
<a name="l00408"></a>00408 PWCHAR <a class="code" href="group__NPF__code.html#gafc395636686df00f554efbd2010f73cb" title="Returns the list of the MACs available on the system.">getAdaptersList</a>(VOID);
<a name="l00409"></a>00409
<a name="l00416"></a>00416 PKEY_VALUE_PARTIAL_INFORMATION <a class="code" href="group__NPF__code.html#gacf0e32b371eb9283e5cf1de0dfb15629" title="Returns the MACs that bind to TCP/IP.">getTcpBindings</a>(VOID);
<a name="l00417"></a>00417
<a name="l00428"></a>00428 BOOLEAN <a class="code" href="group__NPF__code.html#ga5d152d59c86209c5128ac788a7ae61b3" title="Creates a device for a given MAC.">NPF_CreateDevice</a>(
<a name="l00429"></a>00429 IN OUT PDRIVER_OBJECT adriverObjectP,
<a name="l00430"></a>00430 IN PUNICODE_STRING amacNameP
<a name="l00431"></a>00431 );
<a name="l00443"></a>00443 NTSTATUS
<a name="l00444"></a>00444 <a class="code" href="group__NPF__code.html#ga82e557625e52fe4395bbe2e494fe8c4a" title="Opens a new instance of the driver.">NPF_Open</a>(
<a name="l00445"></a>00445 IN PDEVICE_OBJECT DeviceObject,
<a name="l00446"></a>00446 IN PIRP Irp
<a name="l00447"></a>00447 );
<a name="l00448"></a>00448
<a name="l00458"></a>00458 VOID
<a name="l00459"></a>00459 <a class="code" href="group__NPF__code.html#ga155ae51be29c6d36f8109781b8f6e7b2" title="Ends the opening of an adapter.">NPF_OpenAdapterComplete</a>(
<a name="l00460"></a>00460 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00461"></a>00461 IN NDIS_STATUS Status,
<a name="l00462"></a>00462 IN NDIS_STATUS OpenErrorStatus
<a name="l00463"></a>00463 );
<a name="l00464"></a>00464
<a name="l00475"></a>00475 NTSTATUS
<a name="l00476"></a>00476 <a class="code" href="group__NPF__code.html#gafae94a0e7fda8de180cff6e596cc2803" title="Closes an instance of the driver.">NPF_Cleanup</a>(
<a name="l00477"></a>00477 IN PDEVICE_OBJECT DeviceObject,
<a name="l00478"></a>00478 IN PIRP Irp
<a name="l00479"></a>00479 );
<a name="l00480"></a>00480
<a name="l00481"></a>00481 NTSTATUS
<a name="l00482"></a>00482 <a class="code" href="group__NPF__code.html#gaf8b70be389645c912cf09f1e9ea4b975">NPF_Close</a>(
<a name="l00483"></a>00483 IN PDEVICE_OBJECT DeviceObject,
<a name="l00484"></a>00484 IN PIRP Irp
<a name="l00485"></a>00485 );
<a name="l00486"></a>00486
<a name="l00487"></a>00487
<a name="l00488"></a>00488
<a name="l00497"></a>00497 VOID
<a name="l00498"></a>00498 <a class="code" href="group__NPF__code.html#ga300118a9a6cc28c2c880f6bb39d86b53" title="Ends the closing of an adapter.">NPF_CloseAdapterComplete</a>(
<a name="l00499"></a>00499 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00500"></a>00500 IN NDIS_STATUS Status
<a name="l00501"></a>00501 );
<a name="l00502"></a>00502
<a name="l00525"></a>00525 NDIS_STATUS
<a name="l00526"></a>00526 <a class="code" href="group__NPF__code.html#ga92f84ced372baf09f1c00a6b252a0564" title="Callback invoked by NDIS when a packet arrives from the network.">NPF_tap</a>(
<a name="l00527"></a>00527 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00528"></a>00528 IN NDIS_HANDLE MacReceiveContext,
<a name="l00529"></a>00529 IN PVOID HeaderBuffer,
<a name="l00530"></a>00530 IN UINT HeaderBufferSize,
<a name="l00531"></a>00531 IN PVOID LookAheadBuffer,
<a name="l00532"></a>00532 IN UINT LookaheadBufferSize,
<a name="l00533"></a>00533 IN UINT PacketSize
<a name="l00534"></a>00534 );
<a name="l00535"></a>00535
<a name="l00546"></a>00546 VOID
<a name="l00547"></a>00547 <a class="code" href="group__NPF__code.html#ga0c34f931d6718be202c7c62406f279fd" title="Ends the transfer of a packet.">NPF_TransferDataComplete</a>(
<a name="l00548"></a>00548 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00549"></a>00549 IN PNDIS_PACKET Packet,
<a name="l00550"></a>00550 IN NDIS_STATUS Status,
<a name="l00551"></a>00551 IN UINT BytesTransferred
<a name="l00552"></a>00552 );
<a name="l00553"></a>00553
<a name="l00560"></a>00560 VOID
<a name="l00561"></a>00561 <a class="code" href="group__NPF__code.html#gae7863db01a628ed11324c49953195855" title="Callback function that signals the end of a packet reception.">NPF_ReceiveComplete</a>(IN NDIS_HANDLE ProtocolBindingContext);
<a name="l00562"></a>00562
<a name="l00586"></a>00586 NTSTATUS
<a name="l00587"></a>00587 <a class="code" href="group__NPF__code.html#gad8b208720b6e5149dabcd7fb058b16f7" title="Handles the IOCTL calls.">NPF_IoControl</a>(
<a name="l00588"></a>00588 IN PDEVICE_OBJECT DeviceObject,
<a name="l00589"></a>00589 IN PIRP Irp
<a name="l00590"></a>00590 );
<a name="l00591"></a>00591
<a name="l00592"></a>00592 VOID
<a name="l00593"></a>00593
<a name="l00603"></a>00603 <a class="code" href="group__NPF__code.html#ga4ff37c0fd3273f829a1f84b9ab40755b" title="Ends an OID request.">NPF_RequestComplete</a>(
<a name="l00604"></a>00604 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00605"></a>00605 IN PNDIS_REQUEST pRequest,
<a name="l00606"></a>00606 IN NDIS_STATUS Status
<a name="l00607"></a>00607 );
<a name="l00608"></a>00608
<a name="l00621"></a>00621 NTSTATUS
<a name="l00622"></a>00622 <a class="code" href="group__NPF__code.html#ga595338435296a4d1e15363ebfcb3a38c" title="Writes a raw packet to the network.">NPF_Write</a>(
<a name="l00623"></a>00623 IN PDEVICE_OBJECT DeviceObject,
<a name="l00624"></a>00624 IN PIRP Irp
<a name="l00625"></a>00625 );
<a name="l00626"></a>00626
<a name="l00627"></a>00627
<a name="l00647"></a>00647 INT <a class="code" href="group__NPF__code.html#ga9a97dd25ae757da4bfed3723a4eb4bce" title="Writes a buffer of raw packets to the network.">NPF_BufferedWrite</a>(IN PIRP Irp,
<a name="l00648"></a>00648 IN PCHAR UserBuff,
<a name="l00649"></a>00649 IN ULONG UserBuffSize,
<a name="l00650"></a>00650 BOOLEAN sync);
<a name="l00651"></a>00651
<a name="l00659"></a>00659 VOID <a class="code" href="group__NPF__code.html#ga8861b474efcb6578c9fe2075ff3e6aef" title="Waits the completion of all the sends performed by NPF_BufferedWrite.">NPF_WaitEndOfBufferedWrite</a>(POPEN_INSTANCE Open);
<a name="l00660"></a>00660
<a name="l00670"></a>00670 VOID
<a name="l00671"></a>00671 <a class="code" href="group__NPF__code.html#gaed126572458eed2dcd18d1824ac86601" title="Ends a send operation.">NPF_SendComplete</a>(
<a name="l00672"></a>00672 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00673"></a>00673 IN PNDIS_PACKET pPacket,
<a name="l00674"></a>00674 IN NDIS_STATUS Status
<a name="l00675"></a>00675 );
<a name="l00676"></a>00676
<a name="l00686"></a>00686 VOID
<a name="l00687"></a>00687 <a class="code" href="group__NPF__code.html#ga4e7934d9adb1826ed5e9112b9182f74a" title="Ends a reset of the adapter.">NPF_ResetComplete</a>(
<a name="l00688"></a>00688 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00689"></a>00689 IN NDIS_STATUS Status
<a name="l00690"></a>00690 );
<a name="l00691"></a>00691
<a name="l00695"></a>00695 VOID
<a name="l00696"></a>00696 <a class="code" href="group__NPF__code.html#ga1a8cf4fdeed6e93fcf1f50da654402b7" title="Callback for NDIS StatusHandler. Not used by NPF.">NPF_Status</a>(
<a name="l00697"></a>00697 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00698"></a>00698 IN NDIS_STATUS Status,
<a name="l00699"></a>00699 IN PVOID StatusBuffer,
<a name="l00700"></a>00700 IN UINT StatusBufferSize
<a name="l00701"></a>00701 );
<a name="l00702"></a>00702
<a name="l00703"></a>00703
<a name="l00707"></a>00707 VOID
<a name="l00708"></a>00708 <a class="code" href="group__NPF__code.html#ga70f97109adcd6de8b157534e5ecf2e56" title="Callback for NDIS StatusCompleteHandler. Not used by NPF.">NPF_StatusComplete</a>(IN NDIS_HANDLE ProtocolBindingContext);
<a name="l00709"></a>00709
<a name="l00718"></a>00718 VOID
<a name="l00719"></a>00719 <a class="code" href="group__NPF__code.html#ga5eb5a8e754198d1bbc6572cbc9e59b9c" title="Function called by the OS when NPF is unloaded.">NPF_Unload</a>(IN PDRIVER_OBJECT DriverObject);
<a name="l00720"></a>00720
<a name="l00721"></a>00721
<a name="l00740"></a>00740 NTSTATUS
<a name="l00741"></a>00741 <a class="code" href="group__NPF__code.html#ga827b1433b2d08cbac11b3844d721668f" title="Function that serves the user&amp;#39;s reads.">NPF_Read</a>(
<a name="l00742"></a>00742 IN PDEVICE_OBJECT DeviceObject,
<a name="l00743"></a>00743 IN PIRP Irp
<a name="l00744"></a>00744 );
<a name="l00745"></a>00745
<a name="l00751"></a>00751 NTSTATUS
<a name="l00752"></a>00752 <a class="code" href="group__NPF__code.html#ga1a3ce25625792c74e5792b8fa86a489c" title="Reads the registry keys associated woth NPF if the driver is manually installed via...">NPF_ReadRegistry</a>(
<a name="l00753"></a>00753 IN PWSTR *MacDriverName,
<a name="l00754"></a>00754 IN PWSTR *PacketDriverName,
<a name="l00755"></a>00755 IN PUNICODE_STRING RegistryPath
<a name="l00756"></a>00756 );
<a name="l00757"></a>00757
<a name="l00764"></a>00764 NTSTATUS
<a name="l00765"></a>00765 <a class="code" href="group__NPF__code.html#ga8831b54dcd5361e81ddf0d3165f1fb8f" title="Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF...">NPF_QueryRegistryRoutine</a>(
<a name="l00766"></a>00766 IN PWSTR ValueName,
<a name="l00767"></a>00767 IN ULONG ValueType,
<a name="l00768"></a>00768 IN PVOID ValueData,
<a name="l00769"></a>00769 IN ULONG ValueLength,
<a name="l00770"></a>00770 IN PVOID Context,
<a name="l00771"></a>00771 IN PVOID EntryContext
<a name="l00772"></a>00772 );
<a name="l00773"></a>00773
<a name="l00779"></a>00779 VOID <a class="code" href="group__NPF__code.html#ga9a78f9937b2d7d00250f49dcaeb5bab0" title="Callback for NDIS BindAdapterHandler. Not used by NPF.">NPF_BindAdapter</a>(
<a name="l00780"></a>00780 OUT PNDIS_STATUS Status,
<a name="l00781"></a>00781 IN NDIS_HANDLE BindContext,
<a name="l00782"></a>00782 IN PNDIS_STRING DeviceName,
<a name="l00783"></a>00783 IN PVOID SystemSpecific1,
<a name="l00784"></a>00784 IN PVOID SystemSpecific2
<a name="l00785"></a>00785 );
<a name="l00786"></a>00786
<a name="l00798"></a>00798 VOID
<a name="l00799"></a>00799 <a class="code" href="group__NPF__code.html#ga54d94e883ff4c580289eefaf0d1fc356" title="Callback for NDIS UnbindAdapterHandler.">NPF_UnbindAdapter</a>(
<a name="l00800"></a>00800 OUT PNDIS_STATUS Status,
<a name="l00801"></a>00801 IN NDIS_HANDLE ProtocolBindingContext,
<a name="l00802"></a>00802 IN NDIS_HANDLE UnbindContext
<a name="l00803"></a>00803 );
<a name="l00804"></a>00804
<a name="l00805"></a>00805
<a name="l00813"></a>00813 NTSTATUS <a class="code" href="group__NPF__code.html#gae3d1118c72b474fe214517a65afdfe09" title="Creates the file that will receive the packets when the driver is in dump mode.">NPF_OpenDumpFile</a>(POPEN_INSTANCE Open , PUNICODE_STRING fileName, BOOLEAN append);
<a name="l00814"></a>00814
<a name="l00823"></a>00823 NTSTATUS <a class="code" href="group__NPF__code.html#gaeffce124cbc3e3ae09bd7a6d10367cbb" title="Starts dump to file.">NPF_StartDump</a>(POPEN_INSTANCE Open);
<a name="l00824"></a>00824
<a name="l00832"></a>00832 VOID <a class="code" href="group__NPF__code.html#ga1566082cef91cf79ba4a855e3f44ede9" title="The dump thread.">NPF_DumpThread</a>(PVOID Open);
<a name="l00833"></a>00833
<a name="l00840"></a>00840 NTSTATUS <a class="code" href="group__NPF__code.html#gafcdcf5a4d9bfb8fbdb179963d4c789bd" title="Saves the content of the packet buffer to the file associated with current instance...">NPF_SaveCurrentBuffer</a>(POPEN_INSTANCE Open);
<a name="l00841"></a>00841
<a name="l00854"></a>00854 VOID <a class="code" href="group__NPF__code.html#ga57b9ee7752f00c8858bda8ca060a033b" title="Writes a block of packets on the dump file.">NPF_WriteDumpFile</a>(PFILE_OBJECT FileObject,
<a name="l00855"></a>00855 PLARGE_INTEGER Offset,
<a name="l00856"></a>00856 ULONG Length,
<a name="l00857"></a>00857 PMDL Mdl,
<a name="l00858"></a>00858 PIO_STATUS_BLOCK IoStatusBlock);
<a name="l00859"></a>00859
<a name="l00860"></a>00860
<a name="l00861"></a>00861
<a name="l00867"></a>00867 NTSTATUS <a class="code" href="group__NPF__code.html#gac911742b9f71c12c77452614db14c4a1" title="Closes the dump file associated with an instance of the driver.">NPF_CloseDumpFile</a>(POPEN_INSTANCE Open);
<a name="l00868"></a>00868
<a name="l00869"></a>00869 BOOLEAN
<a name="l00870"></a>00870 <a class="code" href="group__NPF__code.html#ga64dab96bfced5d22cc55a42fc6339833">NPF_StartUsingBinding</a>(
<a name="l00871"></a>00871 IN POPEN_INSTANCE pOpen);
<a name="l00872"></a>00872
<a name="l00873"></a>00873 VOID
<a name="l00874"></a>00874 <a class="code" href="group__NPF__code.html#gacd54077d4c2d9186486d3504523ba4f0">NPF_StopUsingBinding</a>(
<a name="l00875"></a>00875 IN POPEN_INSTANCE pOpen);
<a name="l00876"></a>00876
<a name="l00877"></a>00877 VOID
<a name="l00878"></a>00878 <a class="code" href="group__NPF__code.html#ga76d4e48415cea8e0e65ba93d7355b89f">NPF_CloseBinding</a>(
<a name="l00879"></a>00879 IN POPEN_INSTANCE pOpen);
<a name="l00880"></a>00880
<a name="l00881"></a>00881 BOOLEAN
<a name="l00882"></a>00882 <a class="code" href="group__NPF__code.html#ga504e61b1229a9a604080fc8607b24084">NPF_StartUsingOpenInstance</a>(
<a name="l00883"></a>00883 IN POPEN_INSTANCE pOpen);
<a name="l00884"></a>00884
<a name="l00885"></a>00885 VOID
<a name="l00886"></a>00886 <a class="code" href="group__NPF__code.html#ga6ceb77291c077b05efd3b588a6a30867">NPF_StopUsingOpenInstance</a>(
<a name="l00887"></a>00887 IN POPEN_INSTANCE pOpen);
<a name="l00888"></a>00888
<a name="l00889"></a>00889 VOID
<a name="l00890"></a>00890 <a class="code" href="group__NPF__code.html#ga99878d91732973e7b4020d8e42b4cf32">NPF_CloseOpenInstance</a>(
<a name="l00891"></a>00891 IN POPEN_INSTANCE pOpen);
<a name="l00892"></a>00892
<a name="l00893"></a>00893 NTSTATUS
<a name="l00894"></a>00894 <a class="code" href="group__NPF__code.html#ga8bad85679d2e8c57f7501052f9b07284">NPF_GetDeviceMTU</a>(
<a name="l00895"></a>00895 IN POPEN_INSTANCE pOpen,
<a name="l00896"></a>00896 IN PIRP pIrp,
<a name="l00897"></a>00897 OUT PUINT pMtu);
<a name="l00898"></a>00898
<a name="l00903"></a>00903 UINT <a class="code" href="group__NPF__code.html#gadd6737f745e21b37b8613b489a96687d" title="Returns the amount of bytes present in the packet buffer.">GetBuffOccupation</a>(POPEN_INSTANCE Open);
<a name="l00904"></a>00904
<a name="l00916"></a>00916 <span class="preprocessor">#ifdef NDIS50</span>
<a name="l00917"></a>00917 <span class="preprocessor"></span>NDIS_STATUS NPF_PowerChange(IN NDIS_HANDLE ProtocolBindingContext, IN PNET_PNP_EVENT pNetPnPEvent);
<a name="l00918"></a>00918 <span class="preprocessor">#endif</span>
<a name="l00919"></a>00919 <span class="preprocessor"></span>
<a name="l00920"></a>00920 <span class="comment">// </span>
<a name="l00921"></a>00921 <span class="comment">// Old registry based WinPcap names</span>
<a name="l00922"></a>00922 <span class="comment">//</span>
<a name="l00924"></a>00924 <span class="comment"></span><span class="comment">// \brief Helper function to query a value from the global WinPcap registry key</span>
<a name="l00925"></a>00925 <span class="comment">//*/</span>
<a name="l00926"></a>00926 <span class="comment">//VOID NPF_QueryWinpcapRegistryString(PWSTR SubKeyName,</span>
<a name="l00927"></a>00927 <span class="comment">// WCHAR *Value,</span>
<a name="l00928"></a>00928 <span class="comment">// UINT ValueLen, </span>
<a name="l00929"></a>00929 <span class="comment">// WCHAR *DefaultValue);</span>
<a name="l00930"></a>00930 <span class="comment">//</span>
<a name="l00931"></a>00931
<a name="l00932"></a>00932
<a name="l00941"></a>00941 <span class="preprocessor">#endif </span><span class="comment">/*main ifndef/define*/</span>
</pre></div></div>
<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-2009
CACE Technologies. All rights reserved.</p>