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.
 
 
 
 
 
 

399 lines
19 KiB

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
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 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./CoIsdn_files/filelist.xml">
<title>ATM</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Courier New";
mso-font-charset:0;
mso-generic-font-family:modern;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:3 0 0 0 1 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;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 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;}
/* 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";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;
text-underline:single;}
p
{margin-right:0in;
mso-margin-top-alt:auto;
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";}
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";}
@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:65881998;
mso-list-type:hybrid;
mso-list-template-ids:-1085510618 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1
{mso-list-id:583034453;
mso-list-type:hybrid;
mso-list-template-ids:250782256 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l2
{mso-list-id:891771222;
mso-list-type:hybrid;
mso-list-template-ids:-438123452 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l3
{mso-list-id:1381594568;
mso-list-type:hybrid;
mso-list-template-ids:-1566251202 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l3:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l4
{mso-list-id:1604151169;
mso-list-type:hybrid;
mso-list-template-ids:771667776 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l4:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l5
{mso-list-id:1679502962;
mso-list-type:hybrid;
mso-list-template-ids:-211252370 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l5:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'>
<div class=Section1>
<h2><span style='font-family:Verdana'>Connection Oriented NDIS Miniport ISDN
Sample<o:p></o:p></span></h2>
<p><span style='font-size:10.0pt;font-family:Arial;color:red'>[This is
preliminary documentation and subject to change.]</span><span style='font-size:
10.0pt;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 demonstrates
a connection-oriented NDIS 5.0 client.<span style="mso-spacerun: yes"> 
</span>It shows how to establish and tear down a PPP or multi-link PPP
connection over an ISDN type device. This sample emulates an ISDN device with 2
or more channels as defined in the INF file at install time.<span
style="mso-spacerun: yes">  </span>Connections are emulated by placing outgoing
calls on one channel of an adapter to another channel on the same or different
adapter.<span style="mso-spacerun: yes">   </span><o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Windows Remote Access
interfaces allow you to do the following with the driver:<o:p></o:p></span></p>
<ul type=disc>
<li class=MsoNormal style='margin-right:.5in;mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo9;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Establish a loop-back PPP
connection to the local machine.<o:p></o:p></span></li>
<li class=MsoNormal style='margin-right:.5in;mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo9;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Send directed TCP/IP data
over the established connection.<o:p></o:p></span></li>
<li class=MsoNormal style='margin-right:.5in;mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;mso-list:l2 level1 lfo9;tab-stops:list .5in'><span
style='font-size:10.0pt;font-family:Verdana'>Tear down a connection that
was previously established. <o:p></o:p></span></li>
</ul>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample works on both
X86 and IA64. Both checked and free builds are available. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>From the
Free or Checked Build environment, execute <b>build</b> in the CoIsdn
directory. <o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>INSTALLATION<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>Since the
sample driver requires no PNP hardware, it must be installed manually.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Start
the Add Hardware Wizard.<span style="mso-spacerun: yes">  </span>After it scans
for new PNP hardware, select to <b>add a new device</b>, then select to add a <b>Network
Adapter</b>.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>When
asked to select the adapter, select <b>Have Disk</b>.<span style="mso-spacerun:
yes">  </span>Then point to the location of the CoIsdn.inf and CoIsdn.sys
files.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo2;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Select
<b>TriplePoint COISDN Adapter</b> and click <b>OK</b>.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Once the network adapter
is installed, you need to setup to allow an incoming connection from the
device.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Start
the <b>New Connection</b> Wizard from the Network Connections setup page.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Setup
an advanced connection to accept <b>incoming connections</b>.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Check
the box selecting the <b>TriplePoint COISDN Adapter</b> as the connection
device.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Do
not setup for incoming VPN connections.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Select
the users you want to allow dial-in access.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l1 level1 lfo4;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Configure
TCP/IP to use fixed IP addresses from the range (192.168.111.1 –
192.168.111.99)<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Once you have setup to
allow incoming connections, you need to setup an outgoing dialup connection.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l3 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Start
the <b>New Connection</b> Wizard from the Network Connections setup page.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l3 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Setup
a connection to use a <b>dial-up modem</b>.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l3 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Check
one of the boxes selecting either of the <b>TriplePoint COISDN Adapter</b> channels.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l3 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>When
asked for the number to dial, enter “0” which tells the driver to connect to
any unused channel.<o:p></o:p></span></p>
<p style='margin-left:.5in;text-indent:-.25in;mso-list:l3 level1 lfo6;
tab-stops:list .5in'><![if !supportLists]><span style='font-size:10.0pt;
font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span style='font-size:10.0pt;font-family:Verdana'>Configure
the settings to use only TCP/IP (other connections will fail to negotiate PPP
since the call is answered by the same PC).<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>USAGE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>You can place a call by
double clicking the outgoing dial-up connection you created above.<span
style="mso-spacerun: yes">  </span>Because the call originates and terminates
within the same PC, most applications will not make use of the connection for
data traffic.<span style="mso-spacerun: yes">   </span>The sample can be used
with the NDIS Tester to verify basic NDIS and RAS functionality.<span
style="mso-spacerun: yes">  </span><o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>TIPS<o:p></o:p></span></h3>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>With a
checked binary, you can control the volume of debug information generated by
changing the registry variable DebugFlags.<span style="mso-spacerun: yes"> 
</span>Refer to TpiDebug.h for more information.<span style="mso-spacerun:
yes">   </span>Set the debug flags to 0x86FF to capture a full trace with the
debugger.<span style="mso-spacerun: yes">  </span>This will help you understand
the call sequence that occurs on both the incoming and outgoing sides of the
connection, and it will be useful to refer to when you start making changes for
your hardware.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Verdana'>Search
the source code for SAMPLE_DRIVER and TODO to begin modifying the code for use
with your custom hardware.<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><span style='font-size:7.5pt;font-family:Courier'>File</span></u><span
style='font-size:7.5pt;font-family:Courier'><span style='mso-tab-count:1'>      </span><u>Description</u><span
style='mso-tab-count:1'>        </span><o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Adapter.c<span style='mso-tab-count:
1'> </span>Miniport adapter structure related routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>BChannel.c<span style='mso-tab-count:
1'>         </span>B-channel structure related routines (N B-channels per port).<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>CallMgr.c<span style='mso-tab-count:
1'> </span>Interface to the call manager.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Card.c<span style='mso-tab-count:
1'>    </span>Card structure related routines (1 card per adapter).<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>DChannel.c<span style='mso-tab-count:
1'>         </span>Logical D-channel structure related routines (1 D-channel per card).<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Interupt.c<span style='mso-tab-count:
1'>         </span>Interrupt related routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Miniport.c<span style='mso-tab-count:
1'>         </span>Driver entry and initialization routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Port.c<span style='mso-tab-count:
1'>    </span>Port structure related routines (N ports per card).<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Receive.c<span style='mso-tab-count:
1'> </span>Packet receive related routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Request.c<span style='mso-tab-count:
1'> </span>NDIS request routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>TpiDebug.c<span style='mso-tab-count:
1'>         </span>Debug output routines used in debug build.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>TpiMem.c<span style='mso-tab-count:
1'>  </span>Memory management routines used for debug build.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>TpiParam.c<span style='mso-tab-count:
1'>         </span>Table driven registry parsing routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>Transmit.c<span style='mso-tab-count:
1'>         </span>Packet send related routines.<o:p></o:p></span></pre><pre><span
style='font-size:7.5pt;font-family:Courier'>CoIsdn.inf<span style='mso-tab-count:
1'>         </span>Installation file.<o:p></o:p></span></pre>
<p align=center style='text-align:center;tab-stops: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 border=0 cellspacing=0 cellpadding=0 width=624 style='width:5.2in;
mso-cellspacing:0in;mso-padding-alt:0in 0in 0in 0in'>
<tr style='height:1.2pt'>
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.2pt'>
<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
</td>
</tr>
</table>
<p style='tab-stops: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"'>© Microsoft Corporation
2001</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>