Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

543 lines
30 KiB

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="e100bex_files/filelist.xml">
<title>E100BEX</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:Compatibility>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]><object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:\5B8B\4F53;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
@font-face
{font-family:"MS Sans Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:3 0 0 0 1 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
h2
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:2;
font-size:18.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
color:black;
font-weight:bold;}
h3
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:3;
font-size:13.5pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
color:black;
font-weight:bold;}
h4
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:SimSun;
color:black;
font-weight:bold;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
color:black;}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Courier New";
color:black;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:381560120;
mso-list-type:hybrid;
mso-list-template-ids:-351239334 -695840708 -1982296020 1854160056 -372070536 1348993084 1615251444 1623514094 -1314389320 -1345299260;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:493496583;
mso-list-template-ids:866036378;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="15362"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple style='tab-interval:.5in'
leftmargin=8>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>E100BEX</span></a><span
style='font-family:Verdana'> <o:p></o:p></span></h2>
<p class=MsoNormal><span style='font-family:Verdana;color:red'>[This is
preliminary documentation and subject to change.]</span><span style='font-family:
Verdana'> <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is an NDIS 5
deserialized miniport driver for the Intel EtherExpress<sup>TM</sup> PRO/100+
Ethernet PCI adapter and the Intel EtherExpress<sup>TM</sup> PRO/100B PCI
adapter. It illustrates NDIS 4 and NDIS 5 features such as multiple packet
sends/receives, scatter gather DMA, LBFO, media sense, WMI, and Po</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>er Management. It also has NDIS
5.1 miniport features such as cancellation of send packets and PNP event
handler. This driver comes </span><st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>ith a KD extension DLL.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>This
driver supports Plug and Play. The code is 64-bit compliant, and builds
properly </span><st1:PersonName><span style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>ith Microsoft® Visual C® 6.0. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>Run the <b>build</b>
command from this directory to build the sample. That creates the binary
E100bex.sys. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>TOOLS<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>The NDISTEST tool can be
used to test some of the features of this driver. Note that this is not a
production driver, and is not intended to replace the driver in the Windo</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>s® 2000 build. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>Files<span style='mso-spacerun:yes'>         </span><span
style='mso-tab-count:1'> </span>Description<o:p></o:p></u></pre><pre>E100BEX.htm<span style='mso-spacerun:yes'>   </span><span
style='mso-tab-count:1'> </span>The documentation for this sample (this file)</pre><pre>Net557ex.inf<span style='mso-spacerun:yes'>  </span><span
style='mso-tab-count:1'> </span>The .inf file for installing the code sample</pre><pre>e100.rc<span style='mso-spacerun:yes'>       </span><span
style='mso-tab-count:1'> </span>The resource file for the code sample</pre><pre>e100.mof<span
style='mso-tab-count:1'>       </span>The WMI mof file for the code sample</pre><pre>precomp.h<span style='mso-spacerun:yes'>     </span><span
style='mso-tab-count:1'> </span>Precompile header</pre><pre><o:p>&nbsp;</o:p></pre><pre>mp.h<span
style='mso-tab-count:2'>           </span>Miniport generic portion header file</pre><pre>mp_cmn.h<span
style='mso-tab-count:1'>       </span>Common definitions for the miniport and kd extension dll</pre><pre>mp_dbg.h<span
style='mso-tab-count:1'>       </span>Debug code definitions and structures</pre><pre>mp_def.h<span
style='mso-tab-count:1'>       </span>NIC specific definitions<span
style='mso-tab-count:1'>       </span></pre><pre>mp_nic.h<span
style='mso-tab-count:1'>       </span>Function prototypes for mp_nic.c, mp_init.c and mp_req.c</pre><pre>mp_dbg.c<span
style='mso-tab-count:1'>       </span>Debug-related code</pre><pre>mp_init.c<span
style='mso-tab-count:1'>      </span>Miniport initialization related routines</pre><pre>mp_main.c<span
style='mso-tab-count:1'>      </span>DriverEntry and NDIS miniport handlers</pre><pre>mp_nic.c<span
style='mso-tab-count:1'>       </span>Miniport send/receive routines</pre><pre>mp_req.c<span
style='mso-tab-count:1'>       </span>Miniport OID related handlers</pre><pre>offload.h<span style='mso-spacerun:yes'>      </span>Task offloading related data structures and function prototypes</pre><pre>offload.c<span style='mso-spacerun:yes'>      </span>Task offloading related functions</pre><pre><o:p>&nbsp;</o:p></pre><pre>e100_557.h<span
style='mso-tab-count:1'>     </span>Hard<st1:PersonName>w</st1:PersonName>are definitions and structures for Intel 82557 controllers</pre><pre>e100_def.h<span
style='mso-tab-count:1'>     </span>Other hard<st1:PersonName>w</st1:PersonName>are specific definitions, e100_<st1:PersonName>w</st1:PersonName>mi.h included in this file</pre><pre>e100_equ.h<span
style='mso-tab-count:1'>     </span>Hard<st1:PersonName>w</st1:PersonName>are specific constant definitions</pre><pre>e100_sup.h<span
style='mso-tab-count:1'>     </span>Hard<st1:PersonName>w</st1:PersonName>are specific function prototypes and inline functions</pre><pre>eeprom.c<span style='mso-spacerun:yes'>      </span><span
style='mso-tab-count:1'> </span>Routines to access EEPROM information</pre><pre>physet.c<span style='mso-spacerun:yes'>      </span><span
style='mso-tab-count:1'> </span>Routines to detect and set up the physical layer</pre><pre>routines.c<span style='mso-spacerun:yes'>    </span><span
style='mso-tab-count:1'> </span>Miscellaneous utility functions</pre><pre><o:p>&nbsp;</o:p></pre><pre>sources.inc<span style='mso-spacerun:yes'>   </span><span
style='mso-tab-count:1'> </span>The sources include file</pre><pre>makefile.inc<span
style='mso-tab-count:1'>   </span>Used to generate e100_<st1:PersonName>w</st1:PersonName>mi.h from e100.bmf <st1:PersonName>w</st1:PersonName>hich is compiled from e100.mof</pre><pre>50\sources<span
style='mso-tab-count:1'>     </span>Sources file to build NDIS 5.0 compliant driver</pre><pre>51\sources<span
style='mso-tab-count:1'>     </span>Sources file to build NDIS 5.1 compliant driver</pre><pre><o:p>&nbsp;</o:p></pre><pre>kd\e100kd.c<span
style='mso-tab-count:1'>    </span>The C file for the KD extension DLL (e100kd.dll)</pre><pre>kd\e100kd.def<span
style='mso-tab-count:1'>  </span>The definition file for the KD extension DLL</pre><pre>kd\e100kd.h<span
style='mso-tab-count:1'>    </span><span class=GramE>The</span> header file for the KD extension DLL</pre><pre>kd\e100kd.rc<span
style='mso-tab-count:1'>   </span>The resource file for the KD extension DLL</pre><pre><o:p>&nbsp;</o:p></pre>
<h4 style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-family:Verdana'>Programming Tour<o:p></o:p></span></h4>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'>Some of the features illustrated
in this driver are listed belo</span><st1:PersonName><span style='font-size:
10.0pt;font-family:Verdana'>w</span></st1:PersonName><span style='font-size:
10.0pt;font-family:Verdana'>, along </span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>ith the files that contain the
feature.<o:p></o:p></span></p>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 4: <b>SendPacketsHandler</b><span
style='mso-bidi-font-weight:bold'>;</span> multiple packets per send
request are handled (<span class=GramE>MpSendPackets(</span>) in mp_main.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 4: <b>NdisMIndicateReceivePacket()</b><span
style='mso-bidi-font-weight:bold'>;</span> multiple packets per receive
indication (MpHandleRecvInterrupt() in mp_nic.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 4: Receive buffer gro</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'> and shrink; When the adapter
driver begins to run out of receive memory, <b>NdisMAllocateSharedMemoryAsyn()</b>
is called to allocate more shared memory for receive buffers
(MpHandleRecvInterrupt() in mp_nic.c). When the traffic slo</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>s do</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>n, the driver frees the
memory (MPReturnPacket() in mp_main.c)<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 4: NdisMRegisterAdapterShutdo</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>nHandler() is called at initialization
time to make sure the adapter has a function that stops generating
interrupts and receiving packets into main memory (MpInitiliaze() and
MpShutdo</span><st1:PersonName><span style='font-size:10.0pt;font-family:
Verdana'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>n() in mp_main.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 4: Media disconnect/connect indications are
supported. This allo</span><st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>w</span></st1:PersonName><span style='font-size:
10.0pt;font-family:Verdana'>s the driver to tell NDIS </span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>hen the adapter has lost or
regained link (MpCheckForHang() in mp_main.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in;
mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
10.0pt;font-family:Verdana'>NDIS 5: </span><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:SimSun;mso-bidi-font-family:
Verdana;color:windowtext'>This driver is a de-serialized miniport,
therefore it protects its resources using its o</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>n spin lock</span><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>s</span><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:SimSun;mso-bidi-font-family:
Verdana;color:red'> </span><span style='font-size:10.0pt;font-family:Verdana;
mso-fareast-font-family:SimSun;mso-bidi-font-family:Verdana'>rather than
relying on <span class=SpellE>Ndis</span> to serialize the calls to the
driver.</span><span style='font-size:10.0pt;font-family:Verdana'> This
driver only implements a simple method of using spin lock: it has a <span
class=GramE><b>NdisAcquireSpinlock(</b></span><b>)</b> at every entry
point and a <b>NdisReleaseSpinlock()</b> at the return from those entry
points. The locks could be done more efficiently in a production driver by
moving the locking closer to the resources in the driver that need to be
accessed </span><st1:PersonName><span style='font-size:10.0pt;font-family:
Verdana'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>ith atomic operations.<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5: WMI: There are several examples of using
GUIDs to advertise custom driver SETs and QUERIES. The E100.mof and
mp_req.c files implement the functionality, the Makefile.inc is used to
generate e100_wmi.h file and the e100.rc file includes the .bmf data into
the driver resource area. By default the private WMI GUIDs provided by the
driver are only accessible to users with administrator privilege. If the
driver wants to give SETs(WRITE) or QUERIES(READ) access to users without
administrator privilege, it must set the corresponding flags to the GUIDs
which it wants to give access to. <o:p></o:p></span></li>
<li class=MsoNormal style='color:windowtext;mso-list:l0 level1 lfo3;
tab-stops:list .5in;mso-layout-grid-align:none;text-autospace:none'><span
style='font-size:10.0pt;font-family:Verdana;color:black'>NDIS 5: </span><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>Power Management:<span style='color:navy'> </span>This
<span style='color:navy'>driver</span> demonstrates how to respond to
Power Management OIDs. It sho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>s ho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'> the miniport driver should suspend and
resume the netcard. The <span style='color:navy'>driver</span> also sets
WakeUp Patterns on the netcard and enables the <span class=SpellE>netcard</span>
to </span><st1:PersonName><span style='font-size:10.0pt;font-family:Verdana;
mso-fareast-font-family:SimSun;mso-bidi-font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana'>ake up the machine on <span class=SpellE>PatternMatch</span>
(this is only implemented on the 82559 version of the Intel <span
class=SpellE>NetCard</span>).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5: <b>LBFO</b>: This driver sho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>s ho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'> to use LBFO APIs to
implement LBFO functionality. This driver implements a simple LBFO
scenario. This driver uses the primary adapter to receive packets. On the
send side, the driver sends packets on the first available secondary
adapter. If no secondary adapter is available, the driver sends packets on
the primary adapter (see mp_main.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5: <b>NdisMInitializeScatterGatherDma</b><span
style='mso-bidi-font-weight:bold'>;<b> </b></span>this driver al</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>ays attempts to use scatter
gather </span><st1:PersonName><span style='font-size:10.0pt;font-family:
Verdana'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>hich is available in NDIS 5 and later. If this call
fails (on Win98 and later), it falls back to use map registers.<o:p></o:p></span></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo3;tab-stops:list .5in;
mso-layout-grid-align:none;text-autospace:none'><b style='mso-bidi-font-weight:
normal'><span style='font-size:10.0pt;font-family:Verdana;color:black'>OFFLOAD</span></b><span
style='font-size:10.0pt;font-family:Verdana;color:black'>:<b
style='mso-bidi-font-weight:normal'> </b></span><span style='font-size:
10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;mso-bidi-font-family:
Verdana;color:windowtext'>This driver sho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>s ho</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'> to handle
OID_TCP_TASK_OFFLOAD to enable/disable task offload capabilities of a NIC,
and ho</span><st1:PersonName><span style='font-size:10.0pt;font-family:
Verdana;mso-fareast-font-family:SimSun;mso-bidi-font-family:Verdana;
color:windowtext'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana;mso-fareast-font-family:SimSun;mso-bidi-font-family:
Verdana;color:windowtext'> to handle per-packet information related to
these capabilities. In particular, the driver implements algorithms for
TCP/IP checksum offloading and segmentation of large TCP packets on the
send side. Note that these algorithms are implemented in soft</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>are purely for illustrative
purposes. It is expected that these algorithms </span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>ould be implemented in hard</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>are. Shipping drivers
should not perform task offload in soft</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana;mso-fareast-font-family:SimSun;
mso-bidi-font-family:Verdana;color:windowtext'>are.</span><span
style='font-size:10.0pt;font-family:Arial;mso-fareast-font-family:SimSun'><o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5.1: Send packet cancellation. The <b>CancelSendPacketsHandler
</b>allo</span><st1:PersonName><span style='font-size:10.0pt;font-family:
Verdana'>w</span></st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>s protocols to cancel pending send packets </span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>hich are queued in the
miniport send queue (MPCancelSendPackets() in mp_main.c).<o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5.1: PNP event notification handler. The
miniport drivers can have a <b>PnPEventNotifyHandler </b>to process
anything necessary </span><st1:PersonName><span style='font-size:10.0pt;
font-family:Verdana'>w</span></st1:PersonName><span style='font-size:
10.0pt;font-family:Verdana'>hen a PNP event happens (MPPnPEventNotify() in
mp_main.c). <o:p></o:p></span></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo3;tab-stops:list .5in'><span style='font-size:10.0pt;
font-family:Verdana'>NDIS 5.1: AdapterShutdo</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>nHandler is no</span><st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'>w</span></st1:PersonName><span
style='font-size:10.0pt;font-family:Verdana'> a standard miniport handler
starting NDIS 5.1. It eliminates the need to call <span class=SpellE>NdisMRegisterAdapterShutdo</span></span><st1:PersonName><span
class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>w</span></span></st1:PersonName><span
class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>nhandler</span></span><span
style='font-size:10.0pt;font-family:Verdana'>.<o:p></o:p></span></li>
</ol>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:.25in;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><o:p>&nbsp;</o:p></span></p>
<p align=center style='text-align:center;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:10.0pt;font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:6.5in;mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:1.5pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
</td>
</tr>
</table>
<p style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><span
style='font-size:7.5pt;font-family:"MS Sans Serif"'>© 1999 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>