<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>uty's blog</title>
	<atom:link href="http://blog.donews.com/uuty/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.donews.com/uuty</link>
	<description>uty@uaty</description>
	<lastBuildDate>Tue, 26 Jul 2011 03:22:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>转：nafxcw.lib与LIBCMT.lib在vs2008中链接冲突解决方案</title>
		<link>http://blog.donews.com/uuty/archive/2011/07/26/1473411.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/07/26/1473411.aspx#comments</comments>
		<pubDate>Tue, 26 Jul 2011 03:22:49 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/?p=1473411</guid>
		<description><![CDATA[error LNK2019: unresolved external symbol &#8220;unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)
]]></description>
			<content:encoded><![CDATA[<p>error LNK2019: unresolved external symbol &#8220;unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/07/26/1473411.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DS18B20 测温度的</title>
		<link>http://blog.donews.com/uuty/archive/2011/04/29/1473410.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/04/29/1473410.aspx#comments</comments>
		<pubDate>Fri, 29 Apr 2011 09:10:57 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/04/29/1473410.aspx</guid>
		<description><![CDATA[又郁闷了很久，后来按datasheet和示波器现实的调了下，总算是能显示了，先贴代码，以后再说从中学到的，要注意的吧。
main.c


   1: //  [4/8/2011 uty]

   2: #include &#60;reg51.h&#62; 

   3: #include &#60;intrins.h&#62;

   4: #include &#34;time.h&#34;

   5: #include &#34;18b20.h&#34;

   6: //-----------------------------------------------------------------------------//

   7: //此表为 LED 的字模, 共阴数码管 0-9  - 

   8: unsigned char code   Disp_Tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40}; [...]]]></description>
			<content:encoded><![CDATA[<p>又郁闷了很久，后来按datasheet和示波器现实的调了下，总算是能显示了，先贴代码，以后再说从中学到的，要注意的吧。</p>
<p>main.c</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet">
<pre><span style="color: #606060">   1:</span> <span style="color: #008000">//  [4/8/2011 uty]</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   2:</span> <span style="color: #cc6633">#include</span> &lt;reg51.h&gt; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   3:</span> <span style="color: #cc6633">#include</span> &lt;intrins.h&gt;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   4:</span> <span style="color: #cc6633">#include</span> <span style="color: #006080">&quot;time.h&quot;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   5:</span> <span style="color: #cc6633">#include</span> <span style="color: #006080">&quot;18b20.h&quot;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   6:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   7:</span> <span style="color: #008000">//此表为 LED 的字模, 共阴数码管 0-9  - </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   8:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> code   Disp_Tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};  <span style="color: #008000">//段码控制</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   9:</span> <span style="color: #008000">//此表为8个数码管位选控制, 共阴数码管 1-8个  - </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  10:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> code   dispbit[8]={0xfe,0xfd,0xfb,0xf7,0xef,0xdF,0xbF,0x7F};    <span style="color: #008000">//位选控制   查表的方法控制</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  11:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  12:</span> <span style="color: #0000ff">void</span> delay(<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> i)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  13:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  14:</span>     <span style="color: #0000ff">char</span> j;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  15:</span>     <span style="color: #0000ff">for</span>(i; i &gt; 0; i--)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  16:</span>         <span style="color: #0000ff">for</span>(j = 200; j &gt; 0; j--);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  17:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  18:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  19:</span> <span style="color: #0000ff">void</span> InterruptInit()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  20:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  21:</span>     TMOD|= 0x11;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  22:</span>     TH1 = 0xD8;    <span style="color: #008000">//10</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  23:</span>     TL1 = 0xF0;    </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  24:</span>     IE = 0x8A;    </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  25:</span>     TR1  = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  26:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  27:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  28:</span> <span style="color: #0000ff">void</span> DisplayTemperature (<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> Temperature)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  29:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  30:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> temp = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  31:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> NegativeTemperature = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  32:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  33:</span>     <span style="color: #008000">// 4位数最前面的0不显示，bFront控制是否是最前面的0</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  34:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> bFront = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  35:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  36:</span>     temp = Temperature % 10000 / 1000;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  37:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  38:</span>     <span style="color: #0000ff">if</span> (0 != temp)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  39:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  40:</span>         <span style="color: #008000">// negative number</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  41:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  42:</span>         NegativeTemperature = 0x1000 - Temperature;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  43:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  44:</span>         temp = NegativeTemperature % 10000 / 1000;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  45:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  46:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  47:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  48:</span>             P3 = ~dispbit[0];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  49:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  50:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  51:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  52:</span>         <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  53:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  54:</span>             <span style="color: #008000">// display '-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  55:</span>             <span style="color: #0000ff">if</span> (0 != (NegativeTemperature % 1000 / 100))</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  56:</span>             {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  57:</span>                 P3 = ~dispbit[0];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  58:</span>                 P2 = ~Disp_Tab[10]; <span style="color: #008000">//'-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  59:</span>                 STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  60:</span>             }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  61:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  62:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  63:</span>         temp = NegativeTemperature % 1000 / 100;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  64:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  65:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  66:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  67:</span>             P3 = ~dispbit[1];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  68:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  69:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  70:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  71:</span>         <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  72:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  73:</span>             <span style="color: #008000">// display '-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  74:</span>             <span style="color: #0000ff">if</span> (0 != (NegativeTemperature % 100 / 10))</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  75:</span>             {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  76:</span>                 P3 = ~dispbit[1];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  77:</span>                 P2 = ~Disp_Tab[10]; <span style="color: #008000">//'-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  78:</span>                 STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  79:</span>             }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  80:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  81:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  82:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  83:</span>         temp = NegativeTemperature % 100 / 10;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  84:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  85:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  86:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  87:</span>             P3 = ~dispbit[2];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  88:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  89:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  90:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  91:</span>         <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  92:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  93:</span>             <span style="color: #008000">// display '-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  94:</span>             <span style="color: #0000ff">if</span> (0 != (NegativeTemperature % 10))</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  95:</span>             {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  96:</span>                 P3 = ~dispbit[2];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  97:</span>                 P2 = ~Disp_Tab[10]; <span style="color: #008000">//'-'</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  98:</span>                 STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  99:</span>             }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 100:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 101:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 102:</span>         temp = NegativeTemperature % 10;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 103:</span>         P3 = ~dispbit[3];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 104:</span>         P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 105:</span>         STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 106:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 107:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 108:</span>     <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 109:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 110:</span>         temp = Temperature % 10000 / 1000;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 111:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 112:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 113:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 114:</span>             P3 = ~dispbit[0];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 115:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 116:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 117:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 118:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 119:</span>         temp = Temperature % 1000 / 100;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 120:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 121:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 122:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 123:</span>             P3 = ~dispbit[1];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 124:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 125:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 126:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 127:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 128:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 129:</span>         temp = Temperature % 100 / 10;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 130:</span>         <span style="color: #0000ff">if</span> (0 != temp || !bFront)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 131:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 132:</span>             bFront = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 133:</span>             P3 = ~dispbit[2];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 134:</span>             P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 135:</span>             STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 136:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 137:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 138:</span>         <span style="color: #008000">// 如果温度是0  最后一位还是要显示</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 139:</span>         temp = Temperature % 10;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 140:</span>         P3 = ~dispbit[3];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 141:</span>         P2 = ~Disp_Tab[temp];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 142:</span>         STC89_12M_DelayMs(5);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 143:</span>     }    </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 144:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 145:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 146:</span> <span style="color: #0000ff">void</span> main (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 147:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 148:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> idata nCounter = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 149:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> idata nTemperature = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 150:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 151:</span>     nCounter = 10000;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 152:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 153:</span>     <span style="color: #0000ff">while</span> (1)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 154:</span>     {      </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 155:</span>         <span style="color: #0000ff">if</span> (nCounter &gt;= 300)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 156:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 157:</span>             nTemperature = GetTemperature ();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 158:</span>             nCounter = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 159:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 160:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 161:</span>         DisplayTemperature(nTemperature);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 162:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 163:</span>         nCounter++;                                                                                                                                   ;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 164:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 165:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 166:</span> //-----------------------------------------------------------------------------//</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>ds18b20.c</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet">
<pre><span style="color: #606060">   1:</span> <span style="color: #008000">//  [4/29/2011 uty]</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   2:</span> <span style="color: #008000">// 18b20 driver</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   3:</span> <span style="color: #cc6633">#include</span> &lt;reg52.H&gt;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   4:</span> <span style="color: #cc6633">#include</span> &lt;intrins.h&gt;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   5:</span> <span style="color: #cc6633">#include</span> <span style="color: #006080">&quot;time.h&quot;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   6:</span> <span style="color: #cc6633">#include</span> <span style="color: #006080">&quot;18b20.h&quot;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   7:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   8:</span> sbit    D18B20=P1^7;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   9:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  10:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> code CrcTable [256]={</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  11:</span> 0,  94, 188,  226,  97,  63,  221,  131,  194,  156,  126,  32,  163,  253,  31,  65,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  12:</span> 157,  195,  33,  127,  252,  162,  64,  30,  95,  1,  227,  189,  62,  96,  130,  220,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  13:</span> 35,  125,  159,  193,  66,  28,  254,  160,  225,  191,  93,  3,  128,  222,  60,  98,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  14:</span> 190,  224,  2,  92,  223,  129,  99,  61,  124,  34,  192,  158,  29,  67,  161,  255,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  15:</span> 70,  24,  250,  164,  39,  121,  155,  197,  132,  218,  56,  102,  229,  187,  89,  7,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  16:</span> 219,  133, 103,  57,  186,  228,  6,  88,  25,  71,  165,  251,  120,  38,  196,  154,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  17:</span> 101,  59, 217,  135,  4,  90,  184,  230,  167,  249,  27,  69,  198,  152,  122,  36,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  18:</span> 248,  166, 68,  26,  153,  199,  37,  123,  58,  100,  134,  216,  91,  5,  231,  185,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  19:</span> 140,  210, 48,  110,  237,  179,  81,  15,  78,  16,  242,  172,  47,  113,  147,  205,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  20:</span> 17,  79,  173,  243,  112,  46,  204,  146,  211,  141,  111,  49,  178,  236,  14,  80,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  21:</span> 175,  241, 19,  77,  206,  144,  114,  44,  109,  51,  209,  143,  12,  82,  176,  238,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  22:</span> 50,  108,  142,  208,  83,  13,  239,  177,  240,  174,  76,  18,  145,  207,  45,  115,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  23:</span> 202,  148, 118,  40,  171,  245,  23,  73,  8,  86,  180,  234,  105,  55,  213, 139,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  24:</span> 87,  9,  235,  181,  54,  104,  138,  212,  149,  203,  41,  119,  244,  170,  72,  22,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  25:</span> 233,  183,  85,  11,  136,  214,  52,  106,  43,  117,  151,  201,  74,  20,  246,  168,</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  26:</span> 116,  42,  200,  150,  21,  75,  169,  247,  182,  232,  10,  84,  215,  137,  107,  53}; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  27:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  28:</span> <span style="color: #cc6633">#define</span> Delay1us _nop_</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  29:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  30:</span> <span style="color: #0000ff">void</span> Delay480us ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  31:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  32:</span>     <span style="color: #0000ff">char</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  33:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  34:</span>     <span style="color: #008000">// 504 us</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  35:</span>     <span style="color: #0000ff">for</span> (i = 0; i &lt; 12; i++)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  36:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  37:</span>         STC89_12M_Delay42us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  38:</span>     }    </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  39:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  40:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  41:</span> <span style="color: #0000ff">void</span> Delay240us ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  42:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  43:</span>     <span style="color: #0000ff">char</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  44:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  45:</span>     <span style="color: #008000">// 462 us</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  46:</span>     <span style="color: #0000ff">for</span> (i = 0; i &lt; 5; i++)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  47:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  48:</span>         STC89_12M_Delay42us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  49:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  50:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  51:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  52:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  53:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  54:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  55:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  56:</span> <span style="color: #0000ff">void</span> Delay60us ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  57:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  58:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  59:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  60:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  61:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  62:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  63:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  64:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  65:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  66:</span> <span style="color: #0000ff">void</span> Delay45us ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  67:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  68:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  69:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  70:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  71:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  72:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  73:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  74:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  75:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  76:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  77:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  78:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  79:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  80:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> reset(<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  81:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  82:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> ch = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  83:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  84:</span>     D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  85:</span>     Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  86:</span>     D18B20 = 0;  <span style="color: #008000">// 输入，外部上拉，等待18b20拉低</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  87:</span>     Delay480us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  88:</span>     D18B20 = 1;  <span style="color: #008000">// 输入，外部上拉，等待18b20拉低</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  89:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  90:</span>     Delay60us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  91:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  92:</span>     ch = D18B20;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  93:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  94:</span>     Delay480us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  95:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  96:</span>     D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  97:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  98:</span>     <span style="color: #0000ff">if</span> (1 == ch)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  99:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 100:</span>         <span style="color: #0000ff">return</span> 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 101:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 102:</span>     <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 103:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 104:</span>         <span style="color: #0000ff">return</span> 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 105:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 106:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 107:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 108:</span> <span style="color: #0000ff">void</span> write (<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> ch)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 109:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 110:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 111:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 112:</span>     <span style="color: #0000ff">for</span> (i = 0;i &lt; 8; i++)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 113:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 114:</span>         D18B20 = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 115:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 116:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 117:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 118:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 119:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 120:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 121:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 122:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 123:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 124:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 125:</span>         D18B20 = (ch &amp; 0x01);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 126:</span>         Delay45us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 127:</span>         Delay45us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 128:</span>         D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 129:</span>         ch &gt;&gt;= 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 130:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 131:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 132:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 133:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> read (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 134:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 135:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 136:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> u = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 137:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 138:</span>     <span style="color: #0000ff">for</span> (i = 0; i &lt; 8; i++)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 139:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 140:</span>         u &gt;&gt;= 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 141:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 142:</span>         D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 143:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 144:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 145:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 146:</span>         D18B20 = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 147:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 148:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 149:</span>         D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 150:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 151:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 152:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 153:</span>         Delay1us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 154:</span>         <span style="color: #0000ff">if</span> (1 == D18B20)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 155:</span>         {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 156:</span>             u |= 0x80;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 157:</span>         }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 158:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 159:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 160:</span>         D18B20 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 161:</span>         Delay60us();    </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 162:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 163:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 164:</span>     <span style="color: #0000ff">return</span> u;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 165:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 166:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 167:</span> <span style="color: #0000ff">void</span> read_bytes (<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span>* buffer, <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> len)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 168:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 169:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 170:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 171:</span>     <span style="color: #0000ff">for</span>(i = 0; i &lt; len; i++)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 172:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 173:</span>         buffer[i] = read();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 174:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 175:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 176:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 177:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> CRC (<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span>* buff, <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> j)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 178:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 179:</span>        <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> idata i,crc_data=0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 180:</span>       <span style="color: #0000ff">for</span>(i=0;i&lt;j;i++)  <span style="color: #008000">//查表校验</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 181:</span>         crc_data = CrcTable[crc_data^buff[i]];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 182:</span>     <span style="color: #0000ff">return</span> (crc_data);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 183:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 184:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 185:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 186:</span> ReadTemperature (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 187:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 188:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> ScratchpadBuffer[9] = {0};</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 189:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> nTemperature = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 190:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 191:</span>     read_bytes(ScratchpadBuffer, 9);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 192:</span>     <span style="color: #0000ff">if</span> (0 == CRC(ScratchpadBuffer, 9)) <span style="color: #008000">//校验正确</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 193:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 194:</span>         nTemperature = ScratchpadBuffer[1] * 0x100 + ScratchpadBuffer[0];</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 195:</span>         <span style="color: #008000">//nTemperature *= 0.625;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 196:</span>         nTemperature /= 16;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 197:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 198:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 199:</span>     <span style="color: #0000ff">return</span> nTemperature;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 200:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 201:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 202:</span> <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 203:</span> GetTemperature (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 204:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 205:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> nTemperature = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 206:</span>     <span style="color: #008000">// 先取温度，然后再去转换温度，新转换的数据下次再取</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 207:</span>     reset ();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 208:</span>     write(0xcc);   <span style="color: #008000">//skip rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 209:</span>     write(0xbe);   <span style="color: #008000">//read Temperature</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 210:</span>     nTemperature = ReadTemperature();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 211:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 212:</span>     reset ();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 213:</span>     write(0xcc);   <span style="color: #008000">//skip rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 214:</span>     write(0x44);   <span style="color: #008000">//Temperature convert</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 215:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 216:</span>     <span style="color: #0000ff">return</span> nTemperature;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 217:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 218:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 219:</span> <span style="color: #008000">/*************************************</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 220:</span> <span style="color: #008000"> [ t1 (10ms)中断] 中断</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 221:</span> <span style="color: #008000">*************************************/</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 222:</span> <span style="color: #008000">// void T1zd(void) interrupt 3 </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 223:</span> <span style="color: #008000">// {</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 224:</span> <span style="color: #008000">//    TH1 = 0xD8;    //10</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 225:</span> <span style="color: #008000">//    TL1 = 0xF0;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 226:</span> <span style="color: #008000">//    TIM++;</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 227:</span> <span style="color: #008000">// </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 228:</span> <span style="color: #008000">// }</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 229:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 230:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 231:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 232:</span> <span style="color: #008000">/************************************************************</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 233:</span> <span style="color: #008000">*Function:内部配置</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 234:</span> <span style="color: #008000">*parameter:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 235:</span> <span style="color: #008000">*Return:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 236:</span> <span style="color: #008000">*Modify:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 237:</span> <span style="color: #008000">*************************************************************/</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 238:</span> <span style="color: #008000">// void Config18b20 (void)  //重新配置报警限定值和分辨率</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 239:</span> <span style="color: #008000">// {</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 240:</span> <span style="color: #008000">//      reset();</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 241:</span> <span style="color: #008000">//      write(0xcc);  //skip rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 242:</span> <span style="color: #008000">//      write(0x4e);  //write scratchpad</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 243:</span> <span style="color: #008000">//      write(0x19);  //上限</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 244:</span> <span style="color: #008000">//      write(0x1a);  //下限</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 245:</span> <span style="color: #008000">//      write(0x7f);     //set 12 bit (0.125)</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 246:</span> <span style="color: #008000">// </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 247:</span> <span style="color: #008000">//      reset();</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 248:</span> <span style="color: #008000">//      write(0xcc);  //skip rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 249:</span> <span style="color: #008000">//      write(0x48);  //保存设定值</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 250:</span> <span style="color: #008000">//      Init18b20();</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 251:</span> <span style="color: #008000">//      write(0xcc);  //skip rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 252:</span> <span style="color: #008000">//      write(0xb8);  //回调设定值</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 253:</span> <span style="color: #008000">// }</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 254:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 255:</span> <span style="color: #008000">/************************************************************</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 256:</span> <span style="color: #008000">*Function:读18B20ID</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 257:</span> <span style="color: #008000">*parameter:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 258:</span> <span style="color: #008000">*Return:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 259:</span> <span style="color: #008000">*Modify:</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 260:</span> <span style="color: #008000">*************************************************************/</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 261:</span> <span style="color: #008000">// void ReadID (void)//读取器件 id</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 262:</span> <span style="color: #008000">// {</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 263:</span> <span style="color: #008000">//     reset();</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 264:</span> <span style="color: #008000">//     write(0x33);  //read rom</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 265:</span> <span style="color: #008000">//     read_bytes(8);</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060"> 266:</span> // }</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>time.c</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet">
<pre><span style="color: #606060">   1:</span> <span style="color: #008000">//  [4/19/2011 uty]</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   2:</span> <span style="color: #cc6633">#include</span> &lt;intrins.h&gt;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   3:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   4:</span> <span style="color: #0000ff">void</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   5:</span> STC89_12M_Delay1ms (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   6:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   7:</span>     <span style="color: #0000ff">char</span> i,j;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   8:</span>     <span style="color: #0000ff">for</span>(i = 110; i &gt; 0; i--)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   9:</span>         <span style="color: #0000ff">for</span>(j = 200; j &gt; 0; j--);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  10:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  11:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  12:</span> <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  13:</span> <span style="color: #008000">// max 255 ms</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  14:</span> <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  15:</span> <span style="color: #0000ff">void</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  16:</span> STC89_12M_DelayMs (</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  17:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> i</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  18:</span>     )</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  19:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  20:</span>     <span style="color: #0000ff">while</span> (i--)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  21:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  22:</span>         STC89_12M_Delay1ms();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  23:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  24:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  25:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  26:</span> <span style="color: #0000ff">void</span> STC89_12M_Delay10us () </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  27:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  28:</span>     <span style="color: #008000">// LCALL指令（2 μs）</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  29:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  30:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  31:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  32:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  33:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  34:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  35:</span>     _nop_( );</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  36:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  37:</span>     <span style="color: #008000">// RET指令（2 μs）</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  38:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  39:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  40:</span> <span style="color: #0000ff">void</span> STC89_12M_Delay42us ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  41:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  42:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  43:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  44:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  45:</span>     STC89_12M_Delay10us();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  46:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  47:</span> //-----------------------------------------------------------------------------//</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>再上张图</p>
<p><a href="http://blog.donews.com/uuty/files/2011/04/0027_1.jpg"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" title="照片-0027_1" border="0" alt="照片-0027_1" src="http://blog.donews.com/uuty/files/2011/04/0027_1_thumb.jpg" width="442" height="332" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/04/29/1473410.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>proteus元件名称中英文对照表</title>
		<link>http://blog.donews.com/uuty/archive/2011/04/14/1473407.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/04/14/1473407.aspx#comments</comments>
		<pubDate>Thu, 14 Apr 2011 01:25:20 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/04/14/1473407.aspx</guid>
		<description><![CDATA[AND 与门    ANTENNA 天线     BATTERY 直流电源     BELL 铃,钟     BVC 同轴电缆接插件     BRIDEG 1 整流桥(二极管)     BRIDEG 2 整流桥(集成块)     BUFFER 缓冲器     BUZZER 蜂鸣器     [...]]]></description>
			<content:encoded><![CDATA[<p>AND 与门    <br />ANTENNA 天线     <br />BATTERY 直流电源     <br />BELL 铃,钟     <br />BVC 同轴电缆接插件     <br />BRIDEG 1 整流桥(二极管)     <br />BRIDEG 2 整流桥(集成块)     <br />BUFFER 缓冲器     <br />BUZZER 蜂鸣器     <br />CAP 电容     <br />CAPACITOR 电容     <br />CAPACITOR POL 有极性电容     <br />CAPVAR 可调电容     <br />CIRCUIT BREAKER 熔断丝     <br />COAX 同轴电缆     <br />CON 插口     <br />CRYSTAL 晶体整荡器     <br />DB 并行插口     <br />DIODE 二极管     <br />DIODE SCHOTTKY 稳压二极管     <br />DIODE VARACTOR 变容二极管     <br />DPY_3-SEG 3段LED     <br />DPY_7-SEG 7段LED     <br />DPY_7-SEG_DP 7段LED(带小数点)     <br />ELECTRO 电解电容     <br />FUSE 熔断器     <br />INDUCTOR 电感     <br />INDUCTOR IRON 带铁芯电感     <br />INDUCTOR3 可调电感     <br />JFET N N沟道场效应管     <br />JFET P P沟道场效应管     <br />LAMP 灯泡     <br />LAMP NEDN 起辉器     <br />LED 发光二极管     <br />METER 仪表     <br />MICROPHONE 麦克风     <br />MOSFET MOS管     <br />MOTOR AC 交流电机     <br />MOTOR SERVO 伺服电机     <br />NAND 与非门     <br />NOR 或非门     <br />NOT 非门     <br />NPN NPN三极管     <br />NPN-PHOTO 感光三极管     <br />OPAMP 运放     <br />OR 或门     <br />PHOTO 感光二极管     <br />PNP 三极管     <br />NPN DAR NPN三极管     <br />PNP DAR PNP三极管     <br />POT 滑线变阻器     <br />PELAY-DPDT 双刀双掷继电器     <br />RES1.2 电阻     <br />RES3.4 可变电阻     <br />RESISTOR BRIDGE ? 桥式电阻     <br />RESPACK ? 电阻     <br />SCR 晶闸管     <br />PLUG ? 插头     <br />PLUG AC FEMALE 三相交流插头     <br />SOCKET ? 插座     <br />SOURCE CURRENT 电流源     <br />SOURCE VOLTAGE 电压源     <br />SPEAKER 扬声器     <br />SW ? 开关     <br />SW-DPDY ? 双刀双掷开关     <br />SW-SPST ? 单刀单掷开关     <br />SW-PB 按钮     <br />THERMISTOR 电热调节器     <br />TRANS1 变压器     <br />TRANS2 可调变压器     <br />TRIAC ? 三端双向可控硅     <br />TRIODE ? 三极真空管     <br />VARISTOR 变阻器     <br />ZENER ? 齐纳二极管     <br />DPY_7-SEG_DP 数码管     <br />SW-PB 开关 </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/04/14/1473407.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>向串口发数据</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/25/1473399.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/25/1473399.aspx#comments</comments>
		<pubDate>Fri, 25 Mar 2011 03:42:13 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/25/1473399.aspx</guid>
		<description><![CDATA[

   1: #include &#60;REG52.H&#62;

   2: //-----------------------------------------------------------------------------//

   3: void delay(unsigned int i)

   4: {

   5:     unsigned char j;

   6:     for(i; i &#62; 0; i--)

   7:         for(j [...]]]></description>
			<content:encoded><![CDATA[<div id="codeSnippetWrapper">
<div id="codeSnippet">
<pre><span style="color: #606060">   1:</span> <span style="color: #cc6633">#include</span> &lt;REG52.H&gt;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   2:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   3:</span> <span style="color: #0000ff">void</span> delay(<span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">int</span> i)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   4:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   5:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> j;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   6:</span>     <span style="color: #0000ff">for</span>(i; i &gt; 0; i--)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   7:</span>         <span style="color: #0000ff">for</span>(j = 200; j &gt; 0; j--) ;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   8:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">   9:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  10:</span> <span style="color: #0000ff">void</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  11:</span> InitSerial ()</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  12:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  13:</span>     SCON = 0x50;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  14:</span>     TMOD |= 0x20;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  15:</span>     PCON |= 0x80;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  16:</span>     TH1 = 0xF3;            <span style="color: #008000">// 晶振12.0 4800 baudrate</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  17:</span>     TL1 = 0xF3;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  18:</span>     TR1 = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  19:</span>     ES = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  20:</span>     EA = 1;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  21:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  22:</span>     RI = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  23:</span>     TI = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  24:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  25:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  26:</span> <span style="color: #0000ff">void</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  27:</span> SendByte (</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  28:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span> ch</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  29:</span>     )</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  30:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  31:</span>     TI = 0;                <span style="color: #008000">// Be sure the bit is initially clear</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  32:</span>     SBUF = ch;            <span style="color: #008000">// Send the letter A to the serial port</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  33:</span>     <span style="color: #0000ff">while</span> (0 == TI);    <span style="color: #008000">// Pause until the TI bit is set.    </span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  34:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  35:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  36:</span> <span style="color: #0000ff">void</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  37:</span> SendString (</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  38:</span>     <span style="color: #0000ff">unsigned</span> <span style="color: #0000ff">char</span>* String</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  39:</span>     )</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  40:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  41:</span>     <span style="color: #0000ff">int</span> i = 0;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  42:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  43:</span>     <span style="color: #0000ff">while</span> (<span style="color: #006080">''</span> != String[i])</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  44:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  45:</span>         SendByte(String[i]);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  46:</span>         i++;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  47:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  48:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  49:</span> <span style="color: #008000">//-----------------------------------------------------------------------------//</span></pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  50:</span> <span style="color: #0000ff">void</span> main (<span style="color: #0000ff">void</span>)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  51:</span> {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  52:</span>     <span style="color: #0000ff">int</span> a;</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  53:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  54:</span>     InitSerial();</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  55:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  56:</span>     <span style="color: #0000ff">while</span> (1)</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  57:</span>     {</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  58:</span>         SendString(<span style="color: #006080">&quot;Hello world! &quot;</span>);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  59:</span>         delay(100);</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  60:</span>     }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  61:</span> }</pre>
<p><!--CRLF--></p>
<pre><span style="color: #606060">  62:</span> //-----------------------------------------------------------------------------//</pre>
<p><!--CRLF--></div>
</div>
<p>本来很简单的一个小程序，但开始在用windows 超级终端接收的时候总是不成功，有时候能收到，但是断断续续的，每次连接只能收到几个字符，并且还总有一声咔的声音。后来发现是usb转串口的原因，可能是有bug吧，直接连外面的串口就一切正常了。</p>
<p>串口可以了，ISD51也就能用了，原来总不行的原因更郁闷，虽然#include &lt;ISD51.h&gt;，也把ISD51.A51和ISD51.h放到了工程目录下，但是忘了把ISD51.A51<br />
  <br />加到工程里。。。结果编译器也没报错，我就当编进去了呢。用惯了vs哪怕vc6，用keil都不行了。。。。。 之后设置好baudrate就一切正常了。</p>
<p>超级终端接收的时候这样设置</p>
<p><a href="http://blog.donews.com/uuty/files/2011/03/serial.jpg"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" title="serial" border="0" alt="serial" src="http://blog.donews.com/uuty/files/2011/03/serial_thumb.jpg" width="306" height="332" /></a></p>
<p>数据流不需要硬件控制，停止位貌似1 1.5 2 都可以，因为baudrate比较低，所以数据之间空的非常多。</p>
<p>结果就是这样了</p>
<p><a href="http://blog.donews.com/uuty/files/2011/03/hypertrm.jpg"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" title="hypertrm" border="0" alt="hypertrm" src="http://blog.donews.com/uuty/files/2011/03/hypertrm_thumb.jpg" width="653" height="440" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>串口各寄存器的作用，有篇非常详细的介绍</p>
<p><strong><font size="5">8051 Tutorial: Serial Communication</font></strong></p>
<hr />
<p>One of the 8051s many powerful features is its integrated <i>UART</i>, otherwise known as a serial port. The fact that the 8051 has an integrated serial port means that you may very easily read and write values to the serial port. If it were not for the integrated serial port, writing a byte to a serial line would be a rather tedious process requring turning on and off one of the I/O lines in rapid succession to properly &quot;clock out&quot; each individual bit, including start bits, stop bits, and parity bits. </p>
<p>However, we do not have to do this. Instead, we simply need to configure the serial ports operation mode and baud rate. Once configured, all we have to do is write to an SFR to write a value to the serial port or read the same SFR to read a value from the serial port. The 8051 will automatically let us know when it has finished sending the character we wrote and will also let us know whenever it has received a byte so that we can process it. We do not have to worry about transmission at the bit level&#8211;which saves us quite a bit of coding and processing time. </p>
<p><a name="Serial Mode"></a>Setting the Serial Port Mode</p>
<p>The first thing we must do when using the 8051s integrated serial port is, obviously, configure it. This lets us tell the 8051 how many data bits we want, the baud rate we will be using, and how the baud rate will be determined. </p>
<p>First, lets present the &quot;Serial Control&quot; (SCON) SFR and define what each bit of the SFR represents: </p>
<ul>
<p><a href="http://blog.donews.com/uuty/files/2011/03/serial_2.jpg"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" title="serial_2" border="0" alt="serial_2" src="http://blog.donews.com/uuty/files/2011/03/serial_2_thumb.jpg" width="533" height="233" /></a></p>
</ul>
<p>Additionally, it is necessary to define the function of SM0 and SM1 by an additional table: </p>
<ul>
<p><a href="http://blog.donews.com/uuty/files/2011/03/serial_31.jpg"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" title="serial_3" border="0" alt="serial_3" src="http://blog.donews.com/uuty/files/2011/03/serial_3_thumb1.jpg" width="352" height="117" /></a></p>
</ul>
<p>(*) Note: The baud rate indicated in this table is doubled if PCON.7 (SMOD) is set. </p>
<p>The SCON SFR allows us to configure the Serial Port. Thus, well go through each bit and review its function. </p>
<p>The first four bits (bits 4 through 7) are configuration bits. </p>
<p>Bits <b>SM0</b> and <b>SM1</b> let us set the <i>serial mode</i> to a value between 0 and 3, inclusive. The four modes are defined in the chart immediately above. As you can see, selecting the Serial Mode selects the mode of operation (8-bit/9-bit, UART or Shift Register) and also determines how the baud rate will be calculated. In modes 0 and 2 the baud rate is fixed based on the oscillators frequency. In modes 1 and 3 the baud rate is variable based on how often Timer 1 overflows. Well talk more about the various Serial Modes in a moment. </p>
<p>The next bit, <b>SM2</b>, is a flag for &quot;Multiprocessor communication.&quot; Generally, whenever a byte has been received the 8051 will set the &quot;RI&quot; (Receive Interrupt) flag. This lets the program know that a byte has been received and that it needs to be processed. However, when SM2 is set the &quot;RI&quot; flag will only be triggered if the 9th bit received was a &quot;1&quot;. That is to say, if SM2 is set and a byte is received whose 9th bit is clear, the RI flag will never be set. This can be useful in certain advanced serial applications. For now it is safe to say that you will almost always want to clear this bit so that the flag is set upon reception of <i>any</i> character. </p>
<p>The next bit, <b>REN</b>, is &quot;Receiver Enable.&quot; This bit is very straightforward: If you want to receive data via the serial port, set this bit. You will almost always want to set this bit. </p>
<p>The last four bits (bits 0 through 3) are operational bits. They are used when actually sending and receiving data&#8211;they are not used to configure the serial port. </p>
<p>The <b>TB8</b> bit is used in modes 2 and 3. In modes 2 and 3, a total of nine data bits are transmitted. The first 8 data bits are the 8 bits of the main value, and the ninth bit is taken from TB8. If TB8 is set and a value is written to the serial port, the datas bits will be written to the serial line followed by a &quot;set&quot; ninth bit. If TB8 is clear the ninth bit will be &quot;clear.&quot; </p>
<p>The <b>RB8</b> also operates in modes 2 and 3 and functions essentially the same way as TB8, but on the reception side. When a byte is received in modes 2 or 3, a total of nine bits are received. In this case, the first eight bits received are the data of the serial byte received and the value of the ninth bit received will be placed in RB8. </p>
<p><b>TI</b> means &quot;Transmit Interrupt.&quot; When a program writes a value to the serial port, a certain amount of time will pass before the individual bits of the byte are &quot;clocked out&quot; the serial port. If the program were to write another byte to the serial port before the first byte was completely output, the data being sent would be garbled. Thus, the 8051 lets the program know that it has &quot;clocked out&quot; the last byte by setting the TI bit. When the TI bit is set, the program may assume that the serial port is &quot;free&quot; and ready to send the next byte. </p>
<p>Finally, the <b>RI</b> bit means &quot;Receive Interrupt.&quot; It funcions similarly to the &quot;TI&quot; bit, but it indicates that a byte has been received. That is to say, whenever the 8051 has received a complete byte it will trigger the RI bit to let the program know that it needs to read the value quickly, before another byte is read. </p>
<p><a name="Baud Rate"></a>Setting the Serial Port Baud Rate</p>
<p>Once the Serial Port Mode has been configured, as explained above, the program must configure the serial ports baud rate. This only applies to Serial Port modes 1 and 3. The Baud Rate is determined based on the oscillators frequency when in mode 0 and 2. In mode 0, the baud rate is always the oscillator frequency divided by 12. This means if youre crystal is 11.059Mhz, mode 0 baud rate will always be 921,583 baud. In mode 2 the baud rate is always the oscillator frequency divided by 64, so a 11.059Mhz crystal speed will yield a baud rate of 172,797. </p>
<p>In modes 1 and 3, the baud rate is determined by how frequently timer 1 overflows. The more frequently timer 1 overflows, the higher the baud rate. There are many ways one can cause timer 1 to overflow at a rate that determines a baud rate, but the most common method is to put timer 1 in 8-bit auto-reload mode (timer mode 2) and set a reload value (TH1) that causes Timer 1 to overflow at a frequency appropriate to generate a baud rate. </p>
<p>To determine the value that must be placed in TH1 to generate a given baud rate, we may use the following equation (assuming PCON.7 is clear). </p>
<ul>TH1 = 256 &#8211; ((Crystal / 384) / Baud) </ul>
<p>If PCON.7 is set then the baud rate is effectively doubled, thus the equation becomes: </p>
<ul>TH1 = 256 &#8211; ((Crystal / 192) / Baud)</ul>
<p>For example, if we have an 11.059Mhz crystal and we want to configure the serial port to 19,200 baud we try plugging it in the first equation: </p>
<ul>TH1 = 256 &#8211; ((Crystal / 384) / Baud)<br />
  <br />TH1 = 256 &#8211; ((11059000 / 384) / 19200 ) </p>
<p>TH1 = 256 &#8211; ((28,799) / 19200) </p>
<p>TH1 = 256 &#8211; 1.5 = 254.5</ul>
<p>As you can see, to obtain 19,200 baud on a 11.059Mhz crystal wed have to set TH1 to 254.5. If we set it to 254 we will have achieved 14,400 baud and if we set it to 255 we will have achieved 28,800 baud. Thus were stuck&#8230; </p>
<p>But not quite&#8230; to achieve 19,200 baud we simply need to set PCON.7 (SMOD). When we do this we double the baud rate and utilize the second equation mentioned above. Thus we have: </p>
<ul>TH1 = 256 &#8211; ((Crystal / 192) / Baud)<br />
  <br />TH1 = 256 &#8211; ((11059000 / 192) / 19200) </p>
<p>TH1 = 256 &#8211; ((57699) / 19200) </p>
<p>TH1 = 256 &#8211; 3 = 253</ul>
<p>Here we are able to calculate a nice, even TH1 value. Therefore, to obtain 19,200 baud with an 11.059MHz crystal we must: </p>
<ul>1. Configure Serial Port mode 1 or 3.<br />
  <br />2. Configure Timer 1 to timer mode 2 (8-bit auto-reload). </p>
<p>3. Set TH1 to 253 to reflect the correct frequency for 19,200 baud. </p>
<p>4. Set PCON.7 (SMOD) to double the baud rate.</ul>
<p><a name="Writing"></a>Writing to the Serial Port </p>
<p>Once the Serial Port has been propertly configured as explained above, the serial port is ready to be used to send data and receive data. If you thought that configuring the serial port was simple, using the serial port will be a breeze. </p>
<p>To write a byte to the serial port one must simply write the value to the <b>SBUF</b> (99h) SFR. For example, if you wanted to send the letter &quot;A&quot; to the serial port, it could be accomplished as easily as: </p>
<ul><b>MOV SBUF,#A</b></ul>
<p>Upon execution of the above instruction the 8051 will begin transmitting the character via the serial port. Obviously transmission is not instantaneous&#8211;it takes a measureable amount of time to transmit. And since the 8051 does not have a serial output buffer we need to be sure that a character is completely transmitted before we try to transmit the next character. </p>
<p>The 8051 lets us know when it is done transmitting a character by setting the <b>TI</b> bit in SCON. When this bit is set we know that the last character has been transmitted and that we may send the next character, if any. Consider the following code segment: </p>
<ul><b>CLR TI</b> ;Be sure the bit is initially clear </p>
<p><b>MOV SBUF,#A</b> ;Send the letter A to the serial port </p>
<p><b>JNB TI,$</b> ;Pause until the TI bit is set. </ul>
<p>The above three instructions will successfully transmit a character and wait for the TI bit to be set before continuing. The last instruction says &quot;Jump if the TI bit is not set to $&quot;&#8211;$, in most assemblers, means &quot;the same address of the current instruction.&quot; Thus the 8051 will pause on the JNB instruction until the TI bit is set by the 8051 upon successful transmission of the character. </p>
<p><a name="Reading"></a>Reading the Serial Port</p>
<p>Reading data received by the serial port is equally easy. To read a byte from the serial port one just needs to read the value stored in the <b>SBUF</b> (99h) SFR after the 8051 has automatically set the <b>RI</b> flag in SCON. </p>
<p>For example, if your program wants to wait for a character to be received and subsequently read it into the Accumulator, the following code segment may be used: </p>
<ul><b>JNB RI,$</b> ;Wait for the 8051 to set the RI flag </p>
<p><b>MOV A,SBUF</b> ;Read the character from the serial port</ul>
<p>The first line of the above code segment waits for the 8051 to set the RI flag; again, the 8051 sets the RI flag automatically when it receives a character via the serial port. So as long as the bit is not set the program repeats the &quot;JNB&quot; instruction continuously. </p>
<p>Once the RI bit is set upon character reception the above condition automatically fails and program flow falls through to the &quot;MOV&quot; instruction which reads the value. </p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/25/1473399.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NDIS6.0 ndislwf修改包内容</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/24/1473377.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/24/1473377.aspx#comments</comments>
		<pubDate>Thu, 24 Mar 2011 09:44:31 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/24/1473377.aspx</guid>
		<description><![CDATA[动NET_BUFFER还算行，动NET_BUFFER_LIST估计也可以，消耗就更大了。还有种方法就是换MDL，或者链在MdlChain后面， 然后改CurrentMdl，不过这种方法估计要自己维护个结构，看哪个Mdl是自己分配的，或者把相关的数据放到NET_BUFFER的MiniportReserved里，但原来的包在complete的时候要恢复的完全一样，想想还是替换NET_BUFFER最简单。
ndislwf可能还算较新的东西，网上相关的东西不多，希望这个例子能有帮助
晕 代码高亮的快疯了，就这样算了
&#160;


   1: VOID

   2: FilterSendNetBufferListsComplete(

   3:         IN  NDIS_HANDLE         FilterModuleContext,

   4:         IN  PNET_BUFFER_LIST    NetBufferLists,

   5: [...]]]></description>
			<content:encoded><![CDATA[<pre>动NET_BUFFER还算行，动NET_BUFFER_LIST估计也可以，消耗就更大了。还有种方法就是换MDL，或者链在MdlChain后面， 然后改CurrentMdl，不过这种方法估计要自己维护个结构，看哪个Mdl是自己分配的，或者把相关的数据放到NET_BUFFER的MiniportReserved里，但原来的包在complete的时候要恢复的完全一样，想想还是替换NET_BUFFER最简单。</pre>
<pre>ndislwf可能还算较新的东西，网上相关的东西不多，希望这个例子能有帮助</pre>
<pre>晕 代码高亮的快疯了，就这样算了</pre>
<pre>&nbsp;</pre>
<div style="border-bottom: silver 1px solid;text-align: left;border-left: silver 1px solid;padding-bottom: 4px;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;padding-left: 4px;width: 97.5%;padding-right: 4px;font-family: 'Courier New', courier, monospace;direction: ltr;font-size: 8pt;overflow: auto;border-top: silver 1px solid;cursor: text;border-right: silver 1px solid;padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   1:</span> VOID</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   2:</span> FilterSendNetBufferListsComplete(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   3:</span>         IN  NDIS_HANDLE         FilterModuleContext,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   4:</span>         IN  PNET_BUFFER_LIST    NetBufferLists,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   5:</span>         IN  ULONG               SendCompleteFlags</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   6:</span>         )</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   7:</span> <span style="color: #008000">/*++</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   8:</span> <span style="color: #008000"> </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   9:</span> <span style="color: #008000">Routine Description:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  10:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  11:</span> <span style="color: #008000">    SendNetBufferListComplete </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  12:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  13:</span> <span style="color: #008000">Arguments:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  14:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  15:</span> <span style="color: #008000">      </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  16:</span> <span style="color: #008000">     </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  17:</span> <span style="color: #008000">Return Value:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  18:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  19:</span> <span style="color: #008000">     NONE</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  20:</span> <span style="color: #008000"> </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  21:</span> <span style="color: #008000">--*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  22:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  23:</span>     PMS_FILTER          pFilter = (PMS_FILTER)FilterModuleContext;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  24:</span>     <span style="color: #008000">//ULONG              NumOfSendCompletes = 0;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  25:</span>     <span style="color: #008000">//BOOLEAN            DispatchLevel;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  26:</span>     <span style="color: #008000">//PNET_BUFFER_LIST   CurrNbl;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  27:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  28:</span>     PNET_BUFFER_LIST    pNetBufList = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  29:</span>     PNET_BUFFER_LIST    pNextNetBufList = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  30:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  31:</span>     PMDL                pMdl = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  32:</span>     PNDISPROT_ETH_HEADER pEthHeader = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  33:</span>     ULONG               ulOffset = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  34:</span>     ULONG               ulBufferLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  35:</span>     PNET_BUFFER         pCurrentNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  36:</span>     PNET_BUFFER         pPreviousNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  37:</span>     PNET_BUFFER         pOriginalNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  38:</span>     ULONG               ulTotalLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  39:</span>    </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  40:</span>     DEBUGP(DL_TRACE, (<span style="color: #006080">"===&gt;SendNBLComplete, NetBufferList: %p.\n"</span>, NetBufferLists));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  41:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  42:</span>     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  43:</span>     <span style="color: #008000">// if necessary, undo any modifications to the NetBufferList thate were performed "on the way down"</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  44:</span>     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  45:</span>     <span style="color: #008000">//if (pFilter-&gt;TrackSends)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  46:</span>     <span style="color: #008000">//{</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  47:</span>     <span style="color: #008000">//    CurrNbl = NetBufferLists;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  48:</span>     <span style="color: #008000">//    while (CurrNbl)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  49:</span>     <span style="color: #008000">//    {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  50:</span>     <span style="color: #008000">//        NumOfSendCompletes++;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  51:</span>     <span style="color: #008000">//        CurrNbl = NET_BUFFER_LIST_NEXT_NBL(CurrNbl);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  52:</span>     <span style="color: #008000">//        </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  53:</span>     <span style="color: #008000">//    }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  54:</span>     <span style="color: #008000">//    DispatchLevel = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendCompleteFlags);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  55:</span>     <span style="color: #008000">//    FILTER_ACQUIRE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  56:</span>     <span style="color: #008000">//    pFilter-&gt;OutstandingSends -= NumOfSendCompletes;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  57:</span>     <span style="color: #008000">//    FILTER_LOG_SEND_REF(2, pFilter, PrevNbl, pFilter-&gt;OutstandingSends);        </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  58:</span>     <span style="color: #008000">//    FILTER_RELEASE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  59:</span>     <span style="color: #008000">//}</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  60:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  61:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  62:</span>     pNetBufList = NetBufferLists;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  63:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  64:</span>     <span style="color: #0000ff">while</span> (pNetBufList != NULL)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  65:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  66:</span>         pNextNetBufList = NET_BUFFER_LIST_NEXT_NBL(pNetBufList);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  67:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  68:</span>         <span style="color: #0000ff">for</span> (pCurrentNetBuffer = NET_BUFFER_LIST_FIRST_NB(pNetBufList);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  69:</span>             pCurrentNetBuffer != NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  70:</span>             pCurrentNetBuffer = NET_BUFFER_NEXT_NB(pCurrentNetBuffer)) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  71:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  72:</span>             pMdl = NET_BUFFER_CURRENT_MDL(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  73:</span>             ulTotalLength = NET_BUFFER_DATA_LENGTH(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  74:</span>             ulOffset = NET_BUFFER_CURRENT_MDL_OFFSET(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  75:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  76:</span>             <span style="color: #0000ff">do</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  77:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  78:</span>                 ASSERT(pMdl != NULL);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  79:</span>                 <span style="color: #0000ff">if</span> (pMdl)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  80:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  81:</span>                     NdisQueryMdl(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  82:</span>                         pMdl,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  83:</span>                         &amp;pEthHeader,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  84:</span>                         &amp;ulBufferLength,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  85:</span>                         NormalPagePriority);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  86:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  87:</span>                 <span style="color: #0000ff">if</span> (NULL == pEthHeader)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  88:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  89:</span>                     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  90:</span>                     <span style="color: #008000">//  The system is low on resources. Set up to handle failure</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  91:</span>                     <span style="color: #008000">//  below.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  92:</span>                     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  93:</span>                     ulBufferLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  94:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  95:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  96:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  97:</span>                 <span style="color: #0000ff">if</span> (0 == ulBufferLength)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  98:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  99:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 100:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 101:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 102:</span>                 ASSERT(ulBufferLength &gt; ulOffset);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 103:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 104:</span>                 ulBufferLength -= ulOffset;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 105:</span>                 pEthHeader = (PNDISPROT_ETH_HEADER)((PUCHAR)pEthHeader + ulOffset);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 106:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 107:</span>                 <span style="color: #0000ff">if</span> (ulBufferLength &lt; <span style="color: #0000ff">sizeof</span>(NDISPROT_ETH_HEADER))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 108:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 109:</span>                     DEBUGP(DL_WARN,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 110:</span>                         (<span style="color: #006080">"ReceiveNetBufferList: runt nbl %p, first buffer length %d\n"</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 111:</span>                         pNetBufList, ulBufferLength));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 112:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 113:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 114:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 115:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 116:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 117:</span>                 <span style="color: #008000">//  Check the EtherType. If the Ether type indicates presence of</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 118:</span>                 <span style="color: #008000">//  a tag, then the "real" Ether type is 4 bytes further down.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 119:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 120:</span>                 <span style="color: #0000ff">if</span> (pEthHeader-&gt;EthType == NPROT_8021P_TAG_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 121:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 122:</span>                     USHORT UNALIGNED *pEthType;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 123:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 124:</span>                     <span style="color: #0000ff">if</span> (ulBufferLength &lt; (<span style="color: #0000ff">sizeof</span>(NDISPROT_ETH_HEADER) + 4))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 125:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 126:</span>                         <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 127:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 128:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 129:</span>                     pEthType = (USHORT UNALIGNED *)((PUCHAR)&amp;pEthHeader-&gt;EthType + 4);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 130:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 131:</span>                     <span style="color: #0000ff">if</span> (*pEthType != NPROT_ETH_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 132:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 133:</span>                         <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 134:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 135:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 136:</span>                 <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span> (pEthHeader-&gt;EthType != NPROT_ETH_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 137:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 138:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 139:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 140:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 141:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 142:</span>                 <span style="color: #008000">//  to do</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 143:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 144:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 145:</span>                 <span style="color: #0000ff">if</span> (NdisGetPoolFromNetBuffer(pCurrentNetBuffer) == pFilter-&gt;NetBufferPool)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 146:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 147:</span>                     KdBreakPoint();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 148:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 149:</span>                     pOriginalNetBuffer = NET_BUFFER_LIST_MINIPORT_RESERVED(pCurrentNetBuffer)[0];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 150:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 151:</span>                     <span style="color: #0000ff">if</span> (pCurrentNetBuffer == NET_BUFFER_LIST_FIRST_NB(pNetBufList))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 152:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 153:</span>                         NET_BUFFER_LIST_FIRST_NB(pNetBufList) = pOriginalNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 154:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 155:</span>                     <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 156:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 157:</span>                         pPreviousNetBuffer-&gt;Next = pOriginalNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 158:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 159:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 160:</span>                     pOriginalNetBuffer-&gt;Next = pCurrentNetBuffer-&gt;Next;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 161:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 162:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 163:</span>                     NdisFreeNetBuffer(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 164:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 165:</span>                     pCurrentNetBuffer = pOriginalNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 166:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 167:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 168:</span>             } <span style="color: #0000ff">while</span> (<span style="color: #0000ff">FALSE</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 169:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 170:</span>             pPreviousNetBuffer = pCurrentNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 171:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 172:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 173:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 174:</span>         pNetBufList = pNextNetBufList;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 175:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 176:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 177:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 178:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 179:</span>     NdisFSendNetBufferListsComplete(pFilter-&gt;FilterHandle, NetBufferLists, SendCompleteFlags);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 180:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 181:</span>     DEBUGP(DL_TRACE, (<span style="color: #006080">"&lt;===SendNBLComplete.\n"</span>));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 182:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>&nbsp;</p>
<div style="border-bottom: silver 1px solid;text-align: left;border-left: silver 1px solid;padding-bottom: 4px;line-height: 12pt;background-color: #f4f4f4;margin: 20px 0px 10px;padding-left: 4px;width: 97.5%;padding-right: 4px;font-family: 'Courier New', courier, monospace;direction: ltr;font-size: 8pt;overflow: auto;border-top: silver 1px solid;cursor: text;border-right: silver 1px solid;padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   1:</span> VOID</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   2:</span> FilterSendNetBufferLists(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   3:</span>         IN  NDIS_HANDLE         FilterModuleContext,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   4:</span>         IN  PNET_BUFFER_LIST    NetBufferLists,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   5:</span>         IN  NDIS_PORT_NUMBER    PortNumber,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   6:</span>         IN  ULONG               SendFlags</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   7:</span>         )</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   8:</span> <span style="color: #008000">/*++</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">   9:</span> <span style="color: #008000"> </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  10:</span> <span style="color: #008000">Routine Description:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  11:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  12:</span> <span style="color: #008000">    Send Net Buffer List handler</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  13:</span> <span style="color: #008000">    This function is an optional function for filter drivers. If provided, NDIS</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  14:</span> <span style="color: #008000">    will call this function to transmit a linked list of NetBuffers, described by a </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  15:</span> <span style="color: #008000">    NetBuferList, over the network. If this handler is NULL, NDIS will skip calling</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  16:</span> <span style="color: #008000">    this fitler when sending a NetBufferList and will call the next lower fitler </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  17:</span> <span style="color: #008000">    in the stack with a non_NULL FilterSendNetBufferList handleror the miniport driver.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  18:</span> <span style="color: #008000">    A filter that doesn't provide a FilerSendNetBufferList handler can not initiate a </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  19:</span> <span style="color: #008000">    send o its own.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  20:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  21:</span> <span style="color: #008000">Arguments:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  22:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  23:</span> <span style="color: #008000">    FilterModuleContext: Pointer to our filter context area.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  24:</span> <span style="color: #008000">    NetBufferLists: Pointer to a List of NetBufferLists.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  25:</span> <span style="color: #008000">    PortNumber - Port Number to which this send is targetted</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  26:</span> <span style="color: #008000">    SendFlags-  Specifies if the call is at DISPATCH_LEVEL                     </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  27:</span> <span style="color: #008000">  </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  28:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  29:</span> <span style="color: #008000">Return Value:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  30:</span> <span style="color: #008000"> </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  31:</span> <span style="color: #008000">    NDIS_STATUS_SUCCESS: </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  32:</span> <span style="color: #008000">    NDIS_STATUS_PENDING:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  33:</span> <span style="color: #008000">    NDIS_STATUS_INVALID_PACKET:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  34:</span> <span style="color: #008000">    NDIS_STATUS_RESOURCES:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  35:</span> <span style="color: #008000">    NDIS_STATUS_FAILURE:</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  36:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  37:</span> <span style="color: #008000"></span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  38:</span> <span style="color: #008000">NOTE: The filter will act like a passthru filter.       </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  39:</span> <span style="color: #008000"> </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  40:</span> <span style="color: #008000">--*/</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  41:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  42:</span>     NDIS_STATUS         Status = NDIS_STATUS_FAILURE;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  43:</span>     PMS_FILTER          pFilter = (PMS_FILTER)FilterModuleContext;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  44:</span>     <span style="color: #008000">//PNET_BUFFER_LIST    CurrNbl;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  45:</span>     <span style="color: #008000">//BOOLEAN             DispatchLevel;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  46:</span>     <span style="color: #008000">//BOOLEAN             bFalse = FALSE;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  47:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  48:</span>     PNET_BUFFER_LIST    pNetBufList = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  49:</span>     PNET_BUFFER_LIST    pNextNetBufList = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  50:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  51:</span>     PMDL                pMdl = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  52:</span>     PNDISPROT_ETH_HEADER pEthHeader = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  53:</span>     ULONG               ulOffset = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  54:</span>     ULONG               ulBufferLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  55:</span>     PNET_BUFFER         pCurrentNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  56:</span>     PNET_BUFFER         pPreviousNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  57:</span>     PNET_BUFFER         pNewNetBuffer = NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  58:</span>     ULONG               ulTotalLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  59:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  60:</span>     DEBUGP(DL_TRACE, (<span style="color: #006080">"===&gt;SendNetBufferList: NBL = %p.\n"</span>, NetBufferLists));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  61:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  62:</span> <span style="color: #008000">//    do</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  63:</span> <span style="color: #008000">//    {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  64:</span> <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  65:</span> <span style="color: #008000">//       DispatchLevel = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  66:</span> <span style="color: #008000">//#if DBG</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  67:</span> <span style="color: #008000">//        //</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  68:</span> <span style="color: #008000">//        // we should never get packets to send if we are not in running state</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  69:</span> <span style="color: #008000">//        //</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  70:</span> <span style="color: #008000">//        </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  71:</span> <span style="color: #008000">//        FILTER_ACQUIRE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  72:</span> <span style="color: #008000">//        //</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  73:</span> <span style="color: #008000">//        // If the filter is not in running state, fail the send</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  74:</span> <span style="color: #008000">//        // </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  75:</span> <span style="color: #008000">//        if (pFilter-&gt;State != FilterRunning)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  76:</span> <span style="color: #008000">//        {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  77:</span> <span style="color: #008000">//            FILTER_RELEASE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  78:</span> <span style="color: #008000">//            </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  79:</span> <span style="color: #008000">//            CurrNbl = NetBufferLists;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  80:</span> <span style="color: #008000">//            while (CurrNbl)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  81:</span> <span style="color: #008000">//            {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  82:</span> <span style="color: #008000">//                NET_BUFFER_LIST_STATUS(CurrNbl) = NDIS_STATUS_PAUSED;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  83:</span> <span style="color: #008000">//                CurrNbl = NET_BUFFER_LIST_NEXT_NBL(CurrNbl);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  84:</span> <span style="color: #008000">//            }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  85:</span> <span style="color: #008000">//            NdisFSendNetBufferListsComplete(pFilter-&gt;FilterHandle, </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  86:</span> <span style="color: #008000">//                        NetBufferLists, </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  87:</span> <span style="color: #008000">//                        DispatchLevel ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  88:</span> <span style="color: #008000">//            break;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  89:</span> <span style="color: #008000">//            </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  90:</span> <span style="color: #008000">//        }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  91:</span> <span style="color: #008000">//        FILTER_RELEASE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  92:</span> <span style="color: #008000">//#endif</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  93:</span> <span style="color: #008000">//        if (pFilter-&gt;TrackSends)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  94:</span> <span style="color: #008000">//        {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  95:</span> <span style="color: #008000">//            FILTER_ACQUIRE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  96:</span> <span style="color: #008000">//            CurrNbl = NetBufferLists;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  97:</span> <span style="color: #008000">//            while (CurrNbl)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  98:</span> <span style="color: #008000">//            {</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060">  99:</span> <span style="color: #008000">//                pFilter-&gt;OutstandingSends++;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 100:</span> <span style="color: #008000">//                FILTER_LOG_SEND_REF(1, pFilter, CurrNbl, pFilter-&gt;OutstandingSends);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 101:</span> <span style="color: #008000">//                </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 102:</span> <span style="color: #008000">//                CurrNbl = NET_BUFFER_LIST_NEXT_NBL(CurrNbl);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 103:</span> <span style="color: #008000">//            }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 104:</span> <span style="color: #008000">//            FILTER_RELEASE_LOCK(&amp;pFilter-&gt;Lock, DispatchLevel);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 105:</span> <span style="color: #008000">//        }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 106:</span> <span style="color: #008000">//        //</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 107:</span> <span style="color: #008000">//        // If necessary, queue the NetBufferList in a local structure for later processing</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 108:</span> <span style="color: #008000">//        //</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 109:</span> <span style="color: #008000">//        NdisFSendNetBufferLists(pFilter-&gt;FilterHandle, NetBufferLists, PortNumber, SendFlags);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 110:</span> <span style="color: #008000">//        </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 111:</span> <span style="color: #008000">//        </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 112:</span> <span style="color: #008000">//    }</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 113:</span> <span style="color: #008000">//    while (bFalse);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 114:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 115:</span>     KdBreakPoint();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 116:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 117:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 118:</span>     pNetBufList = NetBufferLists;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 119:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 120:</span>     <span style="color: #0000ff">while</span> (pNetBufList != NULL)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 121:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 122:</span>         pNextNetBufList = NET_BUFFER_LIST_NEXT_NBL(pNetBufList);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 123:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 124:</span>         <span style="color: #0000ff">for</span> (pCurrentNetBuffer = NET_BUFFER_LIST_FIRST_NB(pNetBufList);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 125:</span>             pCurrentNetBuffer != NULL;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 126:</span>             pCurrentNetBuffer = NET_BUFFER_NEXT_NB(pCurrentNetBuffer)) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 127:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 128:</span>             pMdl = NET_BUFFER_CURRENT_MDL(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 129:</span>             ulTotalLength = NET_BUFFER_DATA_LENGTH(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 130:</span>             ulOffset = NET_BUFFER_CURRENT_MDL_OFFSET(pCurrentNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 131:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 132:</span>             <span style="color: #0000ff">do</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 133:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 134:</span>                 ASSERT(pMdl != NULL);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 135:</span>                 <span style="color: #0000ff">if</span> (pMdl)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 136:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 137:</span>                     NdisQueryMdl(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 138:</span>                         pMdl,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 139:</span>                         &amp;pEthHeader,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 140:</span>                         &amp;ulBufferLength,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 141:</span>                         NormalPagePriority);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 142:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 143:</span>                 <span style="color: #0000ff">if</span> (NULL == pEthHeader)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 144:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 145:</span>                     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 146:</span>                     <span style="color: #008000">//  The system is low on resources. Set up to handle failure</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 147:</span>                     <span style="color: #008000">//  below.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 148:</span>                     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 149:</span>                     ulBufferLength = 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 150:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 151:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 152:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 153:</span>                 <span style="color: #0000ff">if</span> (0 == ulBufferLength)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 154:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 155:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 156:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 157:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 158:</span>                 ASSERT(ulBufferLength &gt; ulOffset);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 159:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 160:</span>                 ulBufferLength -= ulOffset;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 161:</span>                 pEthHeader = (PNDISPROT_ETH_HEADER)((PUCHAR)pEthHeader + ulOffset);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 162:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 163:</span>                 <span style="color: #0000ff">if</span> (ulBufferLength &lt; <span style="color: #0000ff">sizeof</span>(NDISPROT_ETH_HEADER))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 164:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 165:</span>                     DEBUGP(DL_WARN,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 166:</span>                         (<span style="color: #006080">"ReceiveNetBufferList: runt nbl %p, first buffer length %d\n"</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 167:</span>                             pNetBufList, ulBufferLength));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 168:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 169:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 170:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 171:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 172:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 173:</span>                 <span style="color: #008000">//  Check the EtherType. If the Ether type indicates presence of</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 174:</span>                 <span style="color: #008000">//  a tag, then the "real" Ether type is 4 bytes further down.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 175:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 176:</span>                 <span style="color: #0000ff">if</span> (pEthHeader-&gt;EthType == NPROT_8021P_TAG_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 177:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 178:</span>                     USHORT UNALIGNED *pEthType;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 179:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 180:</span>                     <span style="color: #0000ff">if</span> (ulBufferLength &lt; (<span style="color: #0000ff">sizeof</span>(NDISPROT_ETH_HEADER) + 4))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 181:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 182:</span>                         <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 183:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 184:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 185:</span>                     pEthType = (USHORT UNALIGNED *)((PUCHAR)&amp;pEthHeader-&gt;EthType + 4);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 186:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 187:</span>                     <span style="color: #0000ff">if</span> (*pEthType != NPROT_ETH_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 188:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 189:</span>                         <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 190:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 191:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 192:</span>                 <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span> (pEthHeader-&gt;EthType != NPROT_ETH_TYPE)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 193:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 194:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 195:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 196:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 197:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 198:</span>                 <span style="color: #008000">//  to do</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 199:</span>                 <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 200:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 201:</span>                 <span style="color: #008000">//PrintDataBuffer((PUCHAR)pEthHeader, ulBufferLength);</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 202:</span>                 DbgPrint(<span style="color: #006080">"Packet Length 0x%d,  pMdl-&gt;ByteCount 0x%x,  pMdl-&gt;Next 0x%x\n"</span>, ulBufferLength, pMdl-&gt;ByteCount, pMdl-&gt;Next);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 203:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 204:</span>                 Status = CopyNetBuffer(pFilter,pCurrentNetBuffer, &amp;pNewNetBuffer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 205:</span>                 <span style="color: #0000ff">if</span> (NDIS_STATUS_SUCCESS != Status)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 206:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 207:</span>                     <span style="color: #0000ff">break</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 208:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 209:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 210:</span>                 <span style="color: #0000ff">if</span> (pCurrentNetBuffer == NET_BUFFER_LIST_FIRST_NB(pNetBufList))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 211:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 212:</span>                     NET_BUFFER_LIST_FIRST_NB(pNetBufList) = pNewNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 213:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 214:</span>                 <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 215:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 216:</span>                     pPreviousNetBuffer-&gt;Next = pNewNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 217:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 218:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 219:</span>                 pNewNetBuffer-&gt;Next = pCurrentNetBuffer-&gt;Next;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 220:</span>                 NET_BUFFER_LIST_MINIPORT_RESERVED(pNewNetBuffer)[0] = pCurrentNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 221:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 222:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 223:</span>                 pCurrentNetBuffer = pNewNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 224:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 225:</span>             } <span style="color: #0000ff">while</span> (<span style="color: #0000ff">FALSE</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 226:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 227:</span>             pPreviousNetBuffer = pCurrentNetBuffer;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 228:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 229:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 230:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 231:</span>         pNetBufList = pNextNetBufList;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 232:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 233:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 234:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 235:</span>&nbsp; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 236:</span>     NdisFSendNetBufferLists(pFilter-&gt;FilterHandle, NetBufferLists, PortNumber, SendFlags);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 237:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: #f4f4f4;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 238:</span>     DEBUGP(DL_TRACE, (<span style="color: #006080">"&lt;===SendNetBufferList. \n"</span>));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none;text-align: left;padding-bottom: 0px;line-height: 12pt;background-color: white;margin: 0em;border-left-style: none;padding-left: 0px;width: 100%;padding-right: 0px;font-family: 'Courier New', courier, monospace;direction: ltr;border-top-style: none;color: black;border-right-style: none;font-size: 8pt;overflow: visible;padding-top: 0px"><span style="color: #606060"> 239:</span> }</pre>
<p><!--CRLF--></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/24/1473377.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NDIS6.0以后可以得到raw wifi的数据包了，也许有人需要inf</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/24/1473364.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/24/1473364.aspx#comments</comments>
		<pubDate>Thu, 24 Mar 2011 07:02:16 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/24/1473364.aspx</guid>
		<description><![CDATA[[MSFT.NTamd64]    %NdisLwf_Desc%=Install, MS_NdisLwf
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-   ; Installation Section    ;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    [Install]    AddReg=Inst_Ndi    Characteristics=0&#215;40000    NetCfgInstanceId=&#34;{5cbf81bd-5055-47cd-9055-a76b2b4e3697}&#34;    Copyfiles = ndislwf.copyfiles.sys
[SourceDisksNames]   1=%NdisLwf_Desc%,&#34;&#34;,,
[SourceDisksFiles]   ndislwf.sys=1
[DestinationDirs]   DefaultDestDir=12    ndislwf.copyfiles.sys=12
[ndislwf.copyfiles.sys]   ndislwf.sys,,,2
;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-   [...]]]></description>
			<content:encoded><![CDATA[<p>[MSFT.NTamd64]    <br />%NdisLwf_Desc%=Install, MS_NdisLwf</p>
<p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-   <br />; Installation Section    <br />;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />[Install]    <br />AddReg=Inst_Ndi    <br />Characteristics=0&#215;40000    <br />NetCfgInstanceId=&quot;{5cbf81bd-5055-47cd-9055-a76b2b4e3697}&quot;    <br />Copyfiles = ndislwf.copyfiles.sys</p>
<p>[SourceDisksNames]   <br />1=%NdisLwf_Desc%,&quot;&quot;,,</p>
<p>[SourceDisksFiles]   <br />ndislwf.sys=1</p>
<p>[DestinationDirs]   <br />DefaultDestDir=12    <br />ndislwf.copyfiles.sys=12</p>
<p>[ndislwf.copyfiles.sys]   <br />ndislwf.sys,,,2</p>
<p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />; Ndi installation support    <br />;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />[Inst_Ndi]    <br />HKR, Ndi,Service,,&quot;NdisLwf&quot;    <br />HKR, Ndi,CoServices,0&#215;00010000,&quot;NdisLwf&quot;    <br />HKR, Ndi,HelpText,,%NdisLwf_HelpText%    <br />HKR, Ndi,FilterClass,, Custom    <br />HKR, Ndi,FilterType,0&#215;00010001,<font color="#ff0000">0&#215;00000001&#160;&#160; ; 0&#215;00000002 for a modifying filter     <br /></font>HKR, Ndi\Interfaces,UpperRange,,&quot;noupper&quot;    <br />HKR, Ndi\Interfaces,LowerRange,,&quot;noupper&quot;    <br /><font color="#ff0000">HKR, Ndi\Interfaces, FilterMediaTypes,,&quot;wlan&quot;&#160; ; 只收raw wifi，也可以加上&quot;ethernet&quot;</font>    <br />HKR, Ndi,FilterRunType, 0&#215;00010001, 2 ;this filter must run before any protocol can bind to the below miniport </p>
<p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-   <br />; Service installation support    <br />;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-    <br />[Install.Services]    <br />AddService=NdisLwf,,NdisLwf_Service_Inst</p>
<p>[NdisLwf_Service_Inst]   <br />DisplayName&#160;&#160;&#160;&#160; = %NdisLwf_Desc%    <br />ServiceType&#160;&#160;&#160;&#160; = 1 ;SERVICE_KERNEL_DRIVER    <br />StartType&#160;&#160;&#160;&#160;&#160;&#160; = 1 ;SERVICE_SYSTEM_START    <br />ErrorControl&#160;&#160;&#160; = 1 ;SERVICE_ERROR_NORMAL    <br />ServiceBinary&#160;&#160; = %12%\ndislwf.sys    <br />LoadOrderGroup&#160; = NDIS    <br />Description&#160;&#160;&#160;&#160; = %NdisLwf_Desc%    <br />AddReg&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = Common.Params.reg</p>
<p>[Install.Remove.Services]   <br />DelService=NdisLwf,0&#215;200</p>
<p>[Common.Params.reg]</p>
<p>HKR, FilterDriverParams\DriverParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ParamDesc,&#160;&#160;&#160;&#160; , &quot;Driverparam for lwf&quot;   <br />HKR, FilterDriverParams\DriverParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; default,&#160;&#160;&#160;&#160; , &quot;5&quot;    <br />HKR, FilterDriverParams\DriverParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , &quot;int&quot;</p>
<p>HKR, FilterAdapterParams\AdapterParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ParamDesc,&#160;&#160;&#160;&#160; , &quot;Adapterparam for lwf&quot;   <br />HKR, FilterAdapterParams\AdapterParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; default,&#160;&#160;&#160;&#160; , &quot;10&quot;    <br />HKR, FilterAdapterParams\AdapterParam,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; , &quot;int&quot;</p>
<p>[Strings]   <br />Msft = &quot;Microsoft&quot;    <br />NdisLwf_Desc = &quot;NDIS Sample LightWeight Filter&quot;    <br />NdisLwf_HelpText = &quot;Sample to demonstrate NDIS LightWeight Filters&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/24/1473364.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]Configuring an INF File for a Modifying Filter Driver</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/24/1473363.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/24/1473363.aspx#comments</comments>
		<pubDate>Thu, 24 Mar 2011 06:57:14 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/24/1473363.aspx</guid>
		<description><![CDATA[The following NDIS filter driver installation issues are associated with modifying filter drivers. To create your own modifying filter driver INF file, you can also adapt the sample NDIS 6.0 filter driver.

Set the Class INF file entry to NetService in the INF file. The following example shows a sample Class entry for the INF file.

Copy
Class [...]]]></description>
			<content:encoded><![CDATA[<p>The following NDIS filter driver installation issues are associated with modifying filter drivers. To create your own modifying filter driver INF file, you can also adapt the <a href="http://msdn.microsoft.com/en-us/library/ff570732(v=vs.85).aspx">sample NDIS 6.0 filter driver</a>.</p>
<ul>
<li>Set the <strong>Class</strong> INF file entry to <strong>NetService</strong> in the INF file. The following example shows a sample <strong>Class</strong> entry for the INF file.
<p><a name="CodeSpippet0"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>Class = NetService</pre>
</li>
<li>The <em>DDInstall</em> section in a filter driver INF file must have a <strong>Characteristics</strong> entry. The following example shows how you should define the <strong>Characteristics</strong> entry in your filter INF file.
<p><a name="CodeSpippet1"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>Characteristics=0x40000</pre>
<p>The 0&#215;40000 value indicates that NCF_LW_FILTER (0&#215;40000) is set. Filter drivers must not set the NCF_FILTER (0&#215;400) flag. The values of the NCF_ <em>Xxx</em> flags are defined in <em>Netcfgx.h</em>. For more information about NCF_ <em>Xxx</em> flags, see <a href="http://msdn.microsoft.com/en-us/library/ff546329(v=vs.85).aspx">DDInstall Section in a Network INF File</a>.</p>
</li>
<li>Set the <strong>NetCfgInstanceId</strong> INF file entry in the INF file, as the following example shows.
<p><a name="CodeSpippet2"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>NetCfgInstanceId=&quot;{5cbf81bd-5055-47cd-9055-a76b2b4e3697}&quot;</pre>
<p>You can use the <em>Uuidgen.exe</em> tool to create the GUID for the <strong>NetCfgInstanceId</strong> entry.</p>
</li>
<li>
<p>The <em>DDInstall</em> section of the INF file for a filter driver must include an <strong>Addreg</strong> directive for an <strong>Ndi</strong> key. The INF file must specify the <strong>Service</strong> entry under the <strong>Ndi</strong> key. The <strong>ServiceBinary</strong> entry in the <em>service-install</em> section of the INF file specifies the path to the binary for the filter driver. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ff543732(v=vs.85).aspx">Adding Service-Related Values to the Ndi Key</a> and <a href="http://msdn.microsoft.com/en-us/library/ff546332(v=vs.85).aspx">DDInstall.Services Section in a Network INF File</a>.</p>
</li>
<li>The <em>DDInstall</em> section in a filter driver INF file must have <strong>FilterType</strong> and <strong>FilterRunType</strong> entries. To specify a modifying filter, define the <strong>FilterType</strong> entry in your INF file, as the following example shows.
<p><a name="CodeSpippet3"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi,FilterType,0x00010001 ,0x00000002</pre>
<p><font color="#ff0000">The <strong>FilterType</strong> value 0&#215;00000002 indicates that the filter is a modifying filter.</font></p>
</li>
<li>Define the <strong>FilterRunType</strong> entry in your INF file, as the following example shows.
<p><a name="CodeSpippet4"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi,FilterRunType,0x00010001 ,0x00000001</pre>
<p><font color="#ff0000">The 0&#215;00000001 value in the preceding example indicates that the filter module is mandatory. To install an optional filer module, set the <strong>FilterRunType</strong> entry to 0&#215;00000002.</font></p>
</li>
<li>The following example shows how a modifying filter driver INF file specifies the name of the service:
<p><a name="CodeSpippet5"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi,Service,,&quot;NdisLwf&quot;</pre>
<p>In this example, NdisLwf is the name of the driver&#8217;s service as it is reported to NDIS. Note that the name of a filter driver&#8217;s service can be different from the name of the binary for the driver&#8211;but typically they are the same.</p>
</li>
<li>The following example shows how the filter INF file references the name of the filter driver&#8217;s service when it adds that service.
<p><a name="CodeSpippet6"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>[Install.Services]
AddService=NdisLwf,,NdisLwf_Service_Inst;, common.EventLog 

[NdisLwf_Service_Inst]
DisplayName     = %NdisLwf_Desc%
ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
StartType       = 1 ;SERVICE_SYSTEM_START
ErrorControl    = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary   = %12%\ndislwf.sys
LoadOrderGroup  = NDIS
Description     = %NdisLwf_Desc%
AddReg          = Common.Params.reg</pre>
</li>
<li>A filter INF file must specify at least the primary service name of the filter for the <strong>CoServices</strong> attribute, as the following example shows.
<p><a name="CodeSpippet7"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi,CoServices,0x00010000,&quot;NdisLwf&quot;</pre>
<p>For more information about the <strong>CoServices</strong> attribute, see <a href="http://msdn.microsoft.com/en-us/library/ff543732(v=vs.85).aspx">Adding Service-Related Values to the Ndi Key</a>.</p>
</li>
<li>The <strong>FilterClass</strong> value in the INF file for a filter driver determines its order in a stack of filters. Filter drivers must define the <strong>FilterClass</strong> key. The class of the driver can be one of the values in the following table.
<p>Value<br />
      <br />Description</p>
<p>scheduler</p>
<p>Packet-scheduling filter service. This class of filter driver is the highest-level driver that can exist above encryption class filters in a driver stack. A packet scheduler detects the 802.1p priority classification that is given to packets by quality of service (QoS)-signaling components and the scheduler sends those packets levels to underlying drivers according to their priority.</p>
<p>Encryption</p>
<p>Encryption class filter drivers exist between scheduler and compression class filters.</p>
<p>Compression</p>
<p>Compression class filter drivers exist between encryption and vpn class filters.</p>
<p>Vpn</p>
<p>vpn class filter drivers exist between compression and load balance filter drivers.</p>
<p>Loadbalance</p>
<p>Load-balancing filter service. This class of filter driver exists between packet-scheduling and fail-over drivers. A load balancing filter service balances its workload of packet transfers by distributing the workload over its set of underlying miniport adapters.</p>
<p>failover</p>
<p>Fail-over filter service. This class of filter driver exists between load balance and diagnostics drivers.</p>
<p>Diagnostic</p>
<p>Diagnostic filter drivers exists below failover drivers in the stack.</p>
<p>Custom</p>
<p>Filter drivers in custom class exist below diagnostic drivers.</p>
<p><strong>Note</strong> More than one filter driver of a specific class can exist in a layered stack of modifying filter drivers. For example, two modifying filter drivers of <strong>FilterClass</strong> &quot;scheduler&quot; can exist in a stack simultaneously. The filter driver that has a later installation timestamp is installed below (that is, closer to the miniport adapter) the filter driver with the earlier timestamp. However, the order of multiple filter drivers with the same class is exactly the same over different miniport adapters on the same computer.</p>
<p>The following example shows a sample <strong>FilterClass</strong> .</p>
<p><a name="CodeSpippet8"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi,FilterClass,, compression</pre>
</li>
<li>You must define the following entries in the modifying filter driver INF file to control the driver bindings:
<p><a name="CodeSpippet9"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>HKR, Ndi\Interfaces,UpperRange,,&quot;noupper&quot;
HKR, Ndi\Interfaces,LowerRange,,&quot;nolower&quot;
HKR, Ndi\Interfaces, FilterMediaTypes,,&quot;ethernet&quot;</pre>
<p>For more information about controlling the driver bindings, see <a href="http://msdn.microsoft.com/en-us/library/ff570844(v=vs.85).aspx">Specifying Filter Driver Binding Relationships</a>.</p>
</li>
<li>A modifying filter INF file should specify common parameter definitions for the driver and parameters that are associated with a specific adapter. The following example shows some common parameter definitions.
<p><a name="CodeSpippet10"></a></p>
<p><a href="http://msdn.microsoft.com/en-us/library/" name="CodeSnippetname">Copy</a></p>
<pre>[Common.Params.reg]

HKR, FilterDriverParams\DriverParam,  ParamDesc, , &quot;Driverparam for lwf&quot;
HKR, FilterDriverParams\DriverParam,  default, , &quot;5&quot;
HKR, FilterDriverParams\DriverParam,  type,  , &quot;int&quot;

HKR, FilterAdapterParams\AdapterParam,  ParamDesc, , &quot;Adapterparam for lwf&quot;
HKR, FilterAdapterParams\AdapterParam,  default, , &quot;10&quot;
HKR, FilterAdapterParams\AdapterParam,  type,  , &quot;int&quot;</pre>
</li>
</ul>
<p><a href="mailto:wsddocfb@microsoft.com?subject=Documentation%20feedback [netvista\netvista]:%20Configuring an INF File for a Modifying Filter Driver%20 RELEASE:%20(2/9/2011)&amp;body=%0A%0APRIVACY STATEMENT%0A%0AThe SDK team uses the feedback submitted to improve the SDK documentation. We do not use your email address for any other purpose. We will remove your email address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an email message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.%0A%0AFor more information about Microsoft's privacy policy, see http://privacy.microsoft.com/en-us/default.aspx.">Send comments about this topic to Microsoft</a></p>
<p>Build date: 2/9/2011</p>
<p>© 2011 Microsoft. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/24/1473363.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NET_BUFFER 2</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/24/1473361.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/24/1473361.aspx#comments</comments>
		<pubDate>Thu, 24 Mar 2011 06:32:48 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/24/1473361.aspx</guid>
		<description><![CDATA[NdisAllocateNetBufferMdlAndData分配出来的NET_BUFFER，初始值CurrentMdl指向MdlChain。
CurrentMdlOffset和DataOffset都是Buffer的长度，所以在用之前一定要先初始化。
]]></description>
			<content:encoded><![CDATA[<p>NdisAllocateNetBufferMdlAndData分配出来的NET_BUFFER，初始值CurrentMdl指向MdlChain。</p>
<p>CurrentMdlOffset和DataOffset都是Buffer的长度，所以在用之前一定要先初始化。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/24/1473361.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NET_BUFFER</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/24/1473359.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/24/1473359.aspx#comments</comments>
		<pubDate>Thu, 24 Mar 2011 02:44:49 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/?p=1473359</guid>
		<description><![CDATA[NDIS 6.0开始用这个结构，就相当于以前的NDIS_PACKET。NET_BUFFER_LIST里面连接的多个NET_BUFFER就是同一TCP连接或UDP里的一系列的包。而NET_BUFFER_LIST之间也就谁也不鸟谁了，可能是完全不搭界的包，向上下层提交的时候也可以以NET_BUFFER_LIST为单位分着来。
一般NDIS接收的包都是一整块内存，发的时候内存是分块的。现在没有了NDIS_BUFFER，直接用MDL了。

NET_BUFFER结构里CurrentMdl和MdlChain比较有意思。按我的理解是，比如MdlChain里可以串几个MDL，比如说3个，但我可以让CurrentMdl指向第2个，当发出去或者收进来的时候，都以第2个为开始，相当于MdlChain[0]只是挂在那，它的内容完全完全被忽略。
这张图里的是我随便断下来的一个包，NET_BUFFER-&#62;Next是空。也就是只是单独的一个数据包或者说Eth Frame。CurrentMdl和MdlChain指向的是同一个MDL。
CurrentMdlOffset表示包内容在MDL（指示的内存）里的偏移，也就是 包内容起始位置 = MDL’s MappedSystemVa + CurrentMdlOffset。
DataOffset按上面说的那种情况貌似就应该是 包内容起始位置 = MdlChain[0]’s length + CurrentMdl’s MappedSystemVa +CurrentMdlOffset。 

CurrentMdl里面连着另一个MDL，这个是从发包的时候断下来的，发出去的包基本上都是分层的。
NET_BUFFER-&#62;DataLength是数据的长度，在图片里的这种情况里:    DataLength = CurrentMdl-&#62;ByteCount – CurrentMdlOffset + NextMdl’s ByteCount
如果CurrentMdl-&#62;ByteCount – CurrentMdlOffset 小于DataLength，说明数据不只在一个MDL里，后面还有。
stDataLength不知道干嘛的。
很奇怪， Win7 pdb里的NET_BUFFER结构和WDK文档里的不一样
kd&#62; dt ndis!_NET_BUFFER    &#160;&#160; +0&#215;000 Next&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Ptr32 _NET_BUFFER     &#160;&#160; +0&#215;004 CurrentMdl&#160;&#160;&#160;&#160;&#160;&#160; : Ptr32 _MDL [...]]]></description>
			<content:encoded><![CDATA[<p>NDIS 6.0开始用这个结构，就相当于以前的NDIS_PACKET。NET_BUFFER_LIST里面连接的多个NET_BUFFER就是同一TCP连接或UDP里的一系列的包。而NET_BUFFER_LIST之间也就谁也不鸟谁了，可能是完全不搭界的包，向上下层提交的时候也可以以NET_BUFFER_LIST为单位分着来。</p>
<p>一般NDIS接收的包都是一整块内存，发的时候内存是分块的。现在没有了NDIS_BUFFER，直接用MDL了。</p>
<p><a href="http://blog.donews.com/uuty/files/2011/03/NET_BUFFER_1.jpg"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" title="NET_BUFFER_1" border="0" alt="NET_BUFFER_1" src="http://blog.donews.com/uuty/files/2011/03/NET_BUFFER_1_thumb.jpg" width="487" height="209" /></a></p>
<p>NET_BUFFER结构里CurrentMdl和MdlChain比较有意思。按我的理解是，比如MdlChain里可以串几个MDL，比如说3个，但我可以让CurrentMdl指向第2个，当发出去或者收进来的时候，都以第2个为开始，相当于MdlChain[0]只是挂在那，它的内容完全完全被忽略。</p>
<p>这张图里的是我随便断下来的一个包，NET_BUFFER-&gt;Next是空。也就是只是单独的一个数据包或者说Eth Frame。CurrentMdl和MdlChain指向的是同一个MDL。</p>
<p>CurrentMdlOffset表示包内容在MDL（指示的内存）里的偏移，也就是 包内容起始位置 = MDL’s MappedSystemVa + CurrentMdlOffset。</p>
<p>DataOffset按上面说的那种情况貌似就应该是 包内容起始位置 = MdlChain[0]’s length + CurrentMdl’s MappedSystemVa +CurrentMdlOffset。 </p>
<p><a href="http://blog.donews.com/uuty/files/2011/03/NET_BUFFER_2.jpg"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" title="NET_BUFFER_2" border="0" alt="NET_BUFFER_2" src="http://blog.donews.com/uuty/files/2011/03/NET_BUFFER_2_thumb.jpg" width="479" height="374" /></a></p>
<p>CurrentMdl里面连着另一个MDL，这个是从发包的时候断下来的，发出去的包基本上都是分层的。</p>
<p>NET_BUFFER-&gt;DataLength是数据的长度，在图片里的这种情况里:    <br />DataLength = CurrentMdl-&gt;ByteCount – CurrentMdlOffset + NextMdl’s ByteCount</p>
<p>如果CurrentMdl-&gt;ByteCount – CurrentMdlOffset 小于DataLength，说明数据不只在一个MDL里，后面还有。</p>
<p>stDataLength不知道干嘛的。</p>
<p>很奇怪， Win7 pdb里的NET_BUFFER结构和WDK文档里的不一样</p>
<p>kd&gt; dt ndis!_NET_BUFFER    <br />&#160;&#160; +0&#215;000 Next&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Ptr32 _NET_BUFFER     <br />&#160;&#160; +0&#215;004 CurrentMdl&#160;&#160;&#160;&#160;&#160;&#160; : Ptr32 _MDL     <br />&#160;&#160; +0&#215;008 CurrentMdlOffset : Uint4B     <br />&#160;&#160; +0&#215;00c DataLength&#160;&#160;&#160;&#160;&#160;&#160; : Uint4B     <br />&#160;&#160; +0&#215;00c stDataLength&#160;&#160;&#160;&#160; : Uint4B     <br />&#160;&#160; +0&#215;010 MdlChain&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Ptr32 _MDL     <br />&#160;&#160; +0&#215;014 DataOffset&#160;&#160;&#160;&#160;&#160;&#160; : Uint4B     <br />&#160;&#160; +0&#215;000 Link&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : _SLIST_HEADER     <br />&#160;&#160; +0&#215;018 ChecksumBias&#160;&#160;&#160;&#160; : Uint2B     <br />&#160;&#160; +0&#215;01a Reserved&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Uint2B     <br />&#160;&#160; +0&#215;01c NdisPoolHandle&#160;&#160; : Ptr32 Void     <br />&#160;&#160; +0&#215;020 NdisReserved&#160;&#160;&#160;&#160; : [2] Ptr32 Void     <br />&#160;&#160; +0&#215;028 ProtocolReserved : [6] Ptr32 Void     <br />&#160;&#160; +0&#215;040 MiniportReserved : [4] Ptr32 Void     <br />&#160;&#160; +0&#215;050 DataPhysicalAddress : _LARGE_INTEGER     <br />&#160;&#160; +0&#215;058 SharedMemoryInfo : Ptr32 _NET_BUFFER_SHARED_MEMORY     <br />&#160;&#160; +0&#215;058 ScatterGatherList : Ptr32 _SCATTER_GATHER_LIST     </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/24/1473359.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>error LNK2019: unresolved external symbol _memcmp</title>
		<link>http://blog.donews.com/uuty/archive/2011/03/23/1473354.aspx</link>
		<comments>http://blog.donews.com/uuty/archive/2011/03/23/1473354.aspx#comments</comments>
		<pubDate>Wed, 23 Mar 2011 07:51:27 +0000</pubDate>
		<dc:creator>uty</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://blog.donews.com/uuty/archive/2011/03/23/1473354.aspx</guid>
		<description><![CDATA[1&#62;device.obj : error LNK2019: unresolved external symbol _memcmp referenced in function _filterFindFilterModule@8   1&#62;Release\filter.sys : fatal error LNK1120: 1 unresolved externals
再次遇到，又忘了该怎么设置了，多亏小树。。。
用/Oi
&#160;
/Oi（生成内部函数）
&#160;
用有助于应用程序更快运行的内部函数或其他特殊形式的函数替换某些函数调用。 

复制
/Oi[-]
备注


使用内部函数的程序比较快，因为它们没有函数调用系统开销。但是，由于创建了附加代码，它们可能比较大。
有关有内部形式的函数的更多信息，请参见 intrinsic。
/Oi 仅作为对编译器的请求，用于将某些函数调用替换为内部函数；为产生更好的性能，编译器可能会调用函数（而不会将该函数调用替换为内部函数）。
x86 特定
注意 
_alloca 和 setjmp 函数始终内联生成；此行为不受 /Oi 影响。
内部浮点函数不对输入值执行任何特殊检查，因此只在有限的输入范围内有效，且与同名库例程具有不同的异常处理和边界条件。使用真正的内部形式意味着失去 IEEE 异常处理以及失去 _matherr 和 errno 功能；后者意味着失去 ANSI 一致性。然而，内部形式可以显著提高浮点密集型程序的速度，而且对于很多程序来说，一致性问题几乎没有任何价值。 
可以使用 /Za、/Ze（禁用语言扩展）重写真正的内部浮点选项的生成。在这种情况下，函数生成为库例程，后者将参数直接传递到浮点芯片，而不是将参数推送到程序堆栈上。 
END x86 Specific
还可以使用 intrinsic 创建内部函数，或者使用 function (C/C++) 显式强制函数调用。 
在 Visual Studio 开发环境中设置此编译器选项


打开该项目的“属性页”对话框。有关详细信息，请参见如何：打开项目属性页。 


单击“C/C++”文件夹。


单击“优化”属性页。


修改“启用内部函数”属性。


以编程方式设置此编译器选项


请参见 [...]]]></description>
			<content:encoded><![CDATA[<p>1&gt;device.obj : error LNK2019: unresolved external symbol _memcmp referenced in function _filterFindFilterModule@8   <br />1&gt;Release\filter.sys : fatal error LNK1120: 1 unresolved externals</p>
<p>再次遇到，又忘了该怎么设置了，多亏小树。。。</p>
<p>用/Oi</p>
<p>&#160;</p>
<h3>/Oi（生成内部函数）</h3>
<p>&#160;</p>
<p>用有助于应用程序更快运行的内部函数或其他特殊形式的函数替换某些函数调用。 </p>
<p><a name="CodeSpippet0"></a></p>
<p><a href="http://msdn.microsoft.com/zh-cn/library/" name="CodeSnippetname">复制</a></p>
<pre>/Oi[-]</pre>
<p><a href="http://msdn.microsoft.com/zh-cn/library/"><img src="http://i.msdn.microsoft.com/Hash/030c41d9079671d09a62d8e2c1db6973.gif" />备注</a></p>
<hr />
<p><a name="remarksToggle"></a></p>
<p>使用内部函数的程序比较快，因为它们没有函数调用系统开销。但是，由于创建了附加代码，它们可能比较大。</p>
<p>有关有内部形式的函数的更多信息，请参见 <a href="http://msdn.microsoft.com/zh-cn/library/tzkfha43(v=vs.80).aspx">intrinsic</a>。</p>
<p><b>/Oi</b> 仅作为对编译器的请求，用于将某些函数调用替换为内部函数；为产生更好的性能，编译器可能会调用函数（而不会将该函数调用替换为内部函数）。</p>
<p><b>x86 特定</b></p>
<p><img alt="Note" src="http://i.msdn.microsoft.com/Hash/030c41d9079671d09a62d8e2c1db6973.gif" />注意 </p>
<p>_alloca 和 setjmp 函数始终内联生成；此行为不受 <b>/Oi</b> 影响。</p>
<p>内部浮点函数不对输入值执行任何特殊检查，因此只在有限的输入范围内有效，且与同名库例程具有不同的异常处理和边界条件。使用真正的内部形式意味着失去 IEEE 异常处理以及失去 <b>_matherr</b> 和 <b>errno</b> 功能；后者意味着失去 ANSI 一致性。然而，内部形式可以显著提高浮点密集型程序的速度，而且对于很多程序来说，一致性问题几乎没有任何价值。 </p>
<p>可以使用 <a href="http://msdn.microsoft.com/zh-cn/library/0k0w269d(v=vs.80).aspx">/Za、/Ze（禁用语言扩展）</a>重写真正的内部浮点选项的生成。在这种情况下，函数生成为库例程，后者将参数直接传递到浮点芯片，而不是将参数推送到程序堆栈上。 </p>
<p><b>END x86 Specific</b></p>
<p>还可以使用 <a href="http://msdn.microsoft.com/zh-cn/library/tzkfha43(v=vs.80).aspx">intrinsic</a> 创建内部函数，或者使用 <a href="http://msdn.microsoft.com/zh-cn/library/sctyh01s(v=vs.80).aspx">function (C/C++)</a> 显式强制函数调用。 </p>
<h5>在 Visual Studio 开发环境中设置此编译器选项</h5>
<ol>
<li>
<p>打开该项目的“属性页”对话框。有关详细信息，请参见<a href="http://msdn.microsoft.com/zh-cn/library/e79xc5h1(v=vs.80).aspx">如何：打开项目属性页</a>。 </p>
</li>
<li>
<p>单击“C/C++”文件夹。</p>
</li>
<li>
<p>单击“优化”属性页。</p>
</li>
<li>
<p>修改“启用内部函数”属性。</p>
</li>
</ol>
<h5>以编程方式设置此编译器选项</h5>
<ul>
<li>
<p>请参见 <a href="http://msdn.microsoft.com/zh-cn/library/microsoft.visualstudio.vcprojectengine.vcclcompilertool.enableintrinsicfunctions(v=vs.80).aspx">EnableIntrinsicFunctions</a>。</p>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/uuty/archive/2011/03/23/1473354.aspx/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

