Leaked source code of windows server 2003
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.
 
 
 
 
 
 

485 lines
26 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="passthru_files/filelist.xml">
<title>passthru</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<!--[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:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 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 Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 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:"MS Mincho";
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:"MS Mincho";
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:"MS Mincho";
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;}
-->
</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="3074"/>
</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'>
<div class=Section1>
<h2><a name=MYSAMPLE></a><a name=top></a><span style='mso-bookmark:MYSAMPLE'>
<!doctype HTML>
<span style='font-family:Verdana'><! ---------------- Snip Snip ---------------- >PASSTHRU.SYS
- Sample NDIS Intermediate Driver</span></span><span style='font-family:Verdana'><o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><st1:place><st1:PlaceName><span class=SpellE><b><span style='font-family:
Verdana'>Passthru</span></b></span></st1:PlaceName><b><span style='font-family:
Verdana'> </span></b><st1:PlaceName><b><span style='font-family:Verdana'>Intermediate</span></b></st1:PlaceName><b><span
style='font-family:Verdana'> </span></b><st1:PlaceType><b><span
style='font-family:Verdana'>Miniport</span></b></st1:PlaceType></st1:place><b><span
style='font-family:Verdana'> Driver<o:p></o:p></span></b></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>Passthru</span>
sample is a do-nothing pass-through NDIS 5 driver that demonstrates the basic
principles underlying an NDIS Intermediate Miniport (IM) driver. This driver
exposes a virtual adapter for each binding to a real or virtual NDIS adapter.
Protocols bind to these virtual adapters as if they are real adapters. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>Passthru</span>
driver re-packages and sends down all requests and sends submitted to this
virtual adapter. The <span class=SpellE>Passthru</span> driver can be modified
to change the data before passing it along. For example, it could
encrypt/compress outgoing and decrypt/decompress incoming data.<o:p></o:p></span></p>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>Passthru</span></span><span
style='font-size:10.0pt;font-family:Verdana'> also re-packages and indicates up
all received data and status indications that it receives at its lower
(protocol) edge.<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—it creates the binary <span
class=SpellE>Passthru.sys</span>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>To install this driver on
Windows® 2000, use the PASSTHRU sample notification object and <span
class=SpellE>INFs</span>, also found in this DDK.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLING THE SAMPLE<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>Passthru</span></span><span
style='font-size:10.0pt;font-family:Verdana'> is installed as a service (called
<span class=SpellE>Passthru</span> Driver” in the supplied <span class=SpellE>INFs</span>/notification
object). To install, follow the steps below.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Prepare a floppy disk (or
installation directory) that contains these files: <span class=SpellE>netsf.inf</span>,
<span class=SpellE>netsf_m.inf</span> and <span class=SpellE>passthru.sys</span>.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>On the desktop,
right-click the <b>My Network Places</b> icon and choose <b>Properties</b>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Right-click on the
relevant Local Area Connection icon and choose <b>Properties</b>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>Install</b>,
then <b>Service</b>, then <b>Add</b>, <span class=GramE>then</span> <b>Have Disk</b>.
<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Browse to the
drive/directory containing the files listed above. Click <b>OK</b>. This should
show “<span class=SpellE>Passthru</span> Driver” in a list of Network Services.
Highlight this and click <b>OK</b>. This should install the <span class=SpellE>Passthru</span>
driver. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Click <b>OK</b> or <span
class=GramE><b>Yes</b></span> each time the system prompts with a warning
regarding installation of unsigned files. This is necessary because binaries
generated via the DDK build environment are not signed.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Two .INF files are needed
rather than one because <span class=SpellE>Passthru</span> is installed both as
a protocol and a miniport.<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>File<span style='mso-tab-count:2'>           </span>Description<o:p></o:p></u></pre><pre><o:p>&nbsp;</o:p></pre><pre><span
class=SpellE>Makefile</span><span style='mso-tab-count:1'>       </span>Used during compilation to create the object and sys files</pre><pre><span
class=SpellE>Miniport.c</span><span style='mso-tab-count:1'>     </span>Miniport related functions of the <span
class=SpellE>passthru</span> driver</pre><pre><span class=SpellE>Netsf.inf</span><span
style='mso-tab-count:1'>      </span>Installation INF for the service (protocol side installation)</pre><pre><span
class=SpellE>Netsf_m.inf</span><span style='mso-tab-count:1'>    </span>Installation INF for the miniport (virtual device installation)</pre><pre><span
class=SpellE>Passthru.c</span><span style='mso-tab-count:1'>     </span><span
class=SpellE>DriverEntry</span> routine and any routines common to the <span
class=SpellE>passthru</span> miniport and protocol </pre><pre><span
class=SpellE>Passthru.h</span><span style='mso-tab-count:1'>     </span>Prototypes of all functions and data structures used by the <span
class=SpellE>Passthru</span> driver</pre><pre>Passthru.htm<span
style='mso-tab-count:1'>   </span>Documentation for the <span class=SpellE>Passthru</span> driver (this file)</pre><pre><span
class=SpellE>Passthru.rc</span><span style='mso-tab-count:1'>    </span>Resource <span
class=GramE>file</span> for the <span class=SpellE>Passthru</span> driver</pre><pre><span
class=SpellE>Precomp.h</span><span style='mso-tab-count:1'>      </span><span
class=SpellE>Precompile</span> header file</pre><pre><span class=SpellE>Protocol.c</span><span
style='mso-tab-count:1'>     </span>Protocol related functions of the <span
class=SpellE>Passthru</span> driver</pre><pre>Sources<span style='mso-tab-count:
2'>        </span>List of source files that are compiled and linked to create the <span
class=SpellE>passthru</span> driver. This can be modified to create binaries that operate on previous Windows versions (e.g. Windows 2000).</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'>Basic steps in initializing and
halting of <span class=SpellE>Passthru</span> driver:<o:p></o:p></span></p>
<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'>1) During <span class=SpellE>DriverEntry</span>,
the <span class=SpellE>Passthru</span> driver registers as a protocol and an
Intermediate miniport driver.<o:p></o:p></span></p>
<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'>2) Later on, NDIS calls <span
class=SpellE>Passthru’s</span> <span class=SpellE>BindAdapterHandler</span>, <span
class=SpellE>PtBindAdapter</span>, for each underlying NDIS adapter to which it
is configured to bind.<o:p></o:p></span></p>
<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'>3) In the context of <span
class=SpellE>BindAdapterHandler</span> and after successfully opening a binding
to the underlying adapter, the <span class=SpellE>Passthru</span> driver
queries the reserved keyword &quot;<span class=SpellE>UpperBindings</span>&quot;
to get a list of device names for the virtual adapters that this particular
binding is to expose. Since this driver implements a 1:1 relationship between
lower bindings and virtual adapters, this list contains a single name. “<span
class=SpellE>Mux</span>” IM drivers that expose multiple virtual adapters over
a single underlying adapter will process multiple entries in <span
class=SpellE>UpperBindings</span>.<o:p></o:p></span></p>
<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'>4) For each device name, the <span
class=SpellE>Passthru</span> driver calls <span class=SpellE>NdisIMInitializeDeviceInstanceEx</span>.<o:p></o:p></span></p>
<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'>5) In response, NDIS will
eventually call back <span class=SpellE>Passthru</span> miniport’s <span
class=SpellE>MiniportInitialize</span> entry point, <span class=SpellE>MPInitialize</span>.<o:p></o:p></span></p>
<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'>6) After <span class=SpellE>MPInitialize</span>
successfully returns, NDIS takes care of getting upper-layer protocols to bind
to the newly created virtual adapter(s).<o:p></o:p></span></p>
<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'>7) All requests and sends coming
from upper-layer protocols for the <span class=SpellE>Passthru</span> miniport
driver are repackaged and sent down to NDIS, to be passed to the underlying
NDIS adapter.<o:p></o:p></span></p>
<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'>8) All indications arriving from
bindings to an underlying NDIS adapter are forwarded up as if they generated
from <span class=SpellE>Passthru’s</span> virtual adapters.<o:p></o:p></span></p>
<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'>9) NDIS calls the <span
class=SpellE>Passthru</span> driver’s <span class=SpellE>ProtocolUnbind</span>
entry point to request it to close the binding between an underlying adapter
and <span class=SpellE>Passthru</span> protocol. In processing this, the <span
class=SpellE>Passthru</span> driver first calls <span class=SpellE>NdisIMDeInitializeDeviceInstance</span>
for the virtual adapter(s) representing that particular binding.<o:p></o:p></span></p>
<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'>10) NDIS in turn will close all
the bindings between upper-layer protocols and virtual <span class=SpellE>Passthru</span>
adapter.<o:p></o:p></span></p>
<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'>11) After all the bindings are
closed, NDIS calls the <span class=SpellE>Passthru</span> driver’s <span
class=SpellE>MiniportHalt</span> entry point (<span class=SpellE>MPHalt</span>)
for the virtual adapter.<o:p></o:p></span></p>
<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'>12) The <span class=SpellE>Passthru</span>
protocol then closes the binding to the underlying adapter by calling <span
class=SpellE>NdisCloseAdapter</span>, and completes the unbind request issued
in step 9.<o:p></o:p></span></p>
<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'>13) <b>Handling Power Management</b><o:p></o:p></span></p>
<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'>13.1 During initialization, the <span
class=SpellE>Passthru</span> miniport should set the Attribute '<i>NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND</i>'
in its call to <span class=SpellE>NdisMSetAttributesEx</span>. <o:p></o:p></span></p>
<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'>13.2 When the <span class=SpellE>Passthru</span>
miniport is requested to report its Plug and Play capabilities
(OID_PNP_CAPABILITIES), the <span class=SpellE>Passthru</span> miniport must
pass the request to the underlying miniport. If this request succeeds, then the
<span class=SpellE>Passthru</span> miniport should overwrite the following
fields before successfully completing the original request: <o:p></o:p></span></p>
<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'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span><span class=SpellE>MinMagicPacketWakeUp</span>
= <span class=SpellE>NdisDeviceStateUnspecified</span>;<o:p></o:p></span></p>
<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'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span><span class=SpellE>MinPatternWakeUp</span>=
<span class=SpellE>NdisDeviceStateUnspecified</span>;<o:p></o:p></span></p>
<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'>NDIS_DEVICE_POWER_STATE<span
style='mso-tab-count:1'>          </span><span class=SpellE>MinLinkChangeWakeUp</span>=<span
class=SpellE>NdisDeviceStateUnspecified</span><o:p></o:p></span></p>
<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'>If the miniport below the <span
class=SpellE>Passthru</span> protocol fails this request, then the status that
was returned should be used to respond to the original request that was made to
the <span class=SpellE>Passthru</span> miniport. <o:p></o:p></span></p>
<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'>13.3 OID_PNP_SET_POWER and OID_PNP_QUERY_POWER
should not be passed to the miniport below the <span class=SpellE>Passthru</span>
protocol, as those <span class=SpellE>miniports</span> will receive independent
requests from NDIS.<o:p></o:p></span></p>
<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'>13.4 NDIS calls the <span
class=SpellE>Passthru</span> driver’s <span class=SpellE>ProtocolPnPEvent</span>
entry point (<span class=SpellE>PtPnPHandler</span>) whenever the underlying adapter
is transitioned to a different power state. If the underlying adapter is
transitioning to a low power state, the IM driver should wait for all
outstanding sends and requests to complete.<o:p></o:p></span></p>
<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'>14) <b>NDIS 5.1 Features</b><o:p></o:p></span></p>
<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'>14.1 All NDIS 5.1 features in <span
class=SpellE>Passthru</span> are identified by #<span class=SpellE>ifdef</span>
NDIS51 compiler directives. The following major features are illustrated (refer
to the DDK documentation for more information on these):<o:p></o:p></span></p>
<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'><b><span
style='font-size:10.0pt;font-family:Verdana'>Packet stacking</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: this allows an IM driver to
reuse a packet submitted to its protocol or miniport edge to forward data down
(or up) to the adjacent layer.<o:p></o:p></span></p>
<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'><b><span
style='font-size:10.0pt;font-family:Verdana'>Canceling Sends</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: <span class=SpellE>Passthru</span>
propagates send cancellations from protocols above it to lower <span
class=SpellE>miniports</span>.<o:p></o:p></span></p>
<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'><b><span
style='font-size:10.0pt;font-family:Verdana'>PnP Event Propagation</span></b><span
style='font-size:10.0pt;font-family:Verdana'>: <span class=SpellE>Passthru</span>
propagates PnP events arriving at its protocol (lower) edge to higher layer
protocols that are bound to its virtual adapter.<o:p></o:p></span></p>
<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
class=SpellE><b><span style='font-size:10.0pt;font-family:Verdana'>NdisQueryPendingIOCount</span></b></span><span
style='font-size:10.0pt;font-family:Verdana'>: <span class=SpellE>Passthru</span>
uses this new API to determine if any I/O operations are in progress on its
lower binding.<o:p></o:p></span></p>
<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'>15) For Win2K SP2 and <span
class=SpellE>WinXP</span>, the <span class=SpellE>Passthru</span> sample no
longer requires a Notify Object. The Notify Object has been removed. <o:p></o:p></span></p>
<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'><span
style='mso-spacerun:yes'> </span><o:p></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'><a
href="#top"><span style='font-size:10.0pt;font-family:Verdana'>Top of page</span></a><span
style='font-size:10.0pt;font-family:Verdana'> <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>