home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / msk314.pkz / NETWORKS / DIS_PKT9.DOC next >
Text File  |  1993-06-29  |  14KB  |  331 lines

  1. File DIS_PKT.DOC                             3 Nov 1991
  2.  
  3. Joe R. Doupnik
  4. Utah State University
  5. Logan Utah 84322
  6. jrd@cc.usu.edu
  7. (801) 750-2982 voice
  8. (801) 750-2992 fax
  9.  
  10. DIS_PKT.DOS is a "shim" to convert between an NDIS network board driver and an
  11. application that wants to talk to a packet driver.  It shares the board with
  12. other NDIS users.
  13.  
  14.     Packet-Driver-flavored applications        NDIS-flavored applications
  15.         ||                    ||
  16.         -------------                ||
  17.         |  DIS_PKT  |                ||
  18.         -------------                ||
  19.         ||                    ||
  20.         ------------------------------------------
  21.         |           main module              |
  22.         |   NDIS    ........................      |
  23.         |        board specific driver(s)      |
  24.         -------------------------------------------
  25.                   ||
  26.             --------------------------------
  27.             | Ethernet/Token Ring board(s)    |
  28.             --------------------------------
  29.                   ||
  30.         =================================== Ethernet/Token Ring wire
  31.         
  32.  
  33. Material added to version 1.09 (since v1.07) -
  34.  
  35.  o Support for using old Novell 802.3 packets on the wire while using Type
  36.    8137 packets to the application. The BYU Packet Driver Novell shell
  37.    kit requires Type 8137 packets be used by the shell. The keyword "NOVELL="
  38.    in the section [pktdrv] determines whether or not conversion occurs. If a 
  39.    y is placed after the NOVELL= phrase then conversion occurs:
  40.     novell = y        (case independent)
  41.    This option provides the same feature as the "-n" option of a regular
  42.    Packet Driver from the Clarkson collection.
  43.    Conversion does not occur if the right hand side is not a y, nor if the 
  44.    entire line is omitted.
  45.    Conversion occurs only if the NDIS driver uses Ethernet 802.3 packets; this
  46.    also means dis_pkt provides a Packet Driver Class 1 interface to apps.
  47.  
  48.  o Support for Ethernet 802.3 with 802.2 headers and Token Ring 802.5 NDIS 
  49.    drivers, as Packet Driver Class 11 and 3, respectively. The NOVELL= option
  50.    does not apply to these boards. Dan Lanciani of Harvard added this part.
  51.  
  52. First sample PROTOCOL.INI file:
  53.  
  54. [protocol manager]
  55.     drivername = PROTMAN$
  56.  
  57. [pktdrv]            <-- name of this driver entry
  58.   drivername = pktdrv$        <-- formal driver name
  59.   bindings = wd8003xmac        <-- use your board's NDIS driver here
  60.   intvec = 0x60            <-- Packet Driver Int, 60h..7fh
  61.   chainvec = 0x66        <-- daisy chained Pkt Drvr Int, unused
  62.   novell = y            <-- Optional, if present and y(es) then
  63.                     convert between old Novell 802.3 pkts
  64.                     on the wire and Type 8137 for the app.
  65.                     Omitting this line or using any other
  66.                     response turns off the conversion; 
  67.                     default is no conversion.
  68.  
  69. [attiso]
  70.   drivername = ATTISO$        <-- Another NDIS client
  71.   bindings = wd8003xmac        <-- bound to the same harware driver
  72.   nsess = 5
  73.   ncmds = 14
  74.   use_emm = n
  75.  
  76. Western Digital EtherCard PLUS Family Adapter    <-- Ethernet board
  77. [wd8003xmac]                    <-- its ndis driver
  78.     drivername = MACWD$
  79.     irq = 7
  80.     ramaddress = 0xCA00
  81.     iobase = 0x280
  82.     receivebufsize = 1536    <-- make this a full Ethernet pkt
  83.  
  84. Sample section of CONFIG.SYS (StarGROUP material is not required):
  85.  
  86. device=c:\lanman\protman.sys /i:c:\lanman    <-- must be first
  87. device=c:\lanman\macwd.dos            <-- WD8003E driver
  88. device=c:\lanman\dis_pkt.dos            <-- Pkt Driver (this program)
  89. device=c:\lanman.dos\drivers\attload.dos /Y    <-- StarGROUP NDIS 
  90. device=c:\lanman.dos\drivers\attiso\attiso.dos    <-- StarGROUP NDIS
  91. device=c:\qemm\loadhi.sys /r:1 e:\pctcp\ifcust.sys  <-- PC/TCP stuff
  92. device=c:\qemm\loadhi.sys /r:4 e:\pctcp\ipcust.sys  <-- etc
  93.  
  94. A second, more elaborate example, with names easier to type.  We start with
  95. file PROTOCOL.INI.  Note that semicolons start comment lines.
  96.  
  97. ; This is a sample protocol.ini file listing three Ethernet boards:
  98. ;    attcsma.dos is an AT&T StarLAN 10 EN100
  99. ;    elnkii.dos  is a 3Com 3C503
  100. ;    wd8003.dos  is a Western Digital WD8003E
  101. ; Only one board will be selected but the other two are present.
  102.  
  103. [protocol manager]
  104.     drivername = PROTMAN$
  105.  
  106. ; Packet Driver protocol users tie in here
  107. [pktdrv]
  108.     drivername = pktdrv$
  109.     bindings = attcsma
  110. ;    bindings= elnkii
  111. ;    bindings = wd8003
  112.     intvec = 0x60
  113. ;    chainvec = 0x66        ; chaining to another Packet Driver is unused
  114.     novell = no        ; do not convert packet types this time
  115.  
  116. ; AT&T StarGROUP protocol stack ties in here via name ATTISO$
  117. [attiso]
  118.     drivername = ATTISO$
  119.     bindings = attcsma
  120. ;    bindings = elnkii
  121. ;    bindings = wd8003
  122.     nsess = 5
  123.     ncmds = 14
  124.     use_emm = n
  125.  
  126. ;Western Digital EtherCard PLUS Family Adapter, WD8003E in this case
  127. [wd8003]
  128.     drivername = MACWD$
  129.     irq = 7
  130.     ramaddress = 0xCA00
  131.     iobase = 0x280
  132.     receivebufsize = 1536
  133. ;    maxtransmits = 6
  134. ;    receivebuffers = 6
  135. ;    receivechains = 6
  136.  
  137. ; 3Com Etherlink II, 3C503
  138. [elnkii]
  139.     drivername = ELNKII$
  140.     ioaddress = 0x350
  141.     interrupt = 5
  142.     transceiver = onboard
  143.     maxtransmits = 12
  144.     xmitbufs = 1
  145.  
  146. ; AT&T StarLAN 10 EN100
  147. [attcsma]
  148.     drivername = ATTCSMA$
  149.     board_type = 2
  150.     irq = 2
  151.     ioaddr = 0x360
  152.     daram = 0xD000
  153.  
  154. ; End of file protocol.ini
  155.  
  156. Fragment of config.sys for the second example. Note three .dos board drivers.
  157.  
  158. device=c:\system\ramdrive.sys 1024 512 128 /E
  159. device=c:\lanman\protman.sys /i:c:\lanman.dos\drivers\star10en
  160. device=c:\lanman\attcsma.dos
  161. device=c:\lanman\elnkii.dos
  162. device=c:\lanman\macwd.dos
  163. device=c:\lanman\dis_pkt.dos
  164. device=c:\lanman.dos\drivers\attload.dos /Y
  165. device=c:\lanman.dos\drivers\attiso\attiso.dos
  166. device=c:\qemm\loadhi.sys /r:1 e:\pctcp\ifcust.sys
  167. device=c:\qemm\loadhi.sys /r:4 e:\pctcp\ipcust.sys
  168. device=c:\qemm\loadhi.sys /r:4 c:\netdev.sys
  169. shell=c:\command.com  /p /e:800
  170.  
  171. It seems to be necessary to run NETBIND.EXE to get all this to be active.
  172. Some Lan Manger network startup routines run Netbind implicitly.
  173.  
  174. Copyright notice and disclaimer from the beginning of the source code
  175. file dis_pkt.asm:
  176.  
  177. ; DIS_PKT.ASM - Adapter provides Packet Driver v1.09 interface over NDIS.
  178. ; Version 1.07  18 May 1991  by Joe R. Doupnik, Utah State Univ.
  179. ; Version 1.08  9 Aug 1991 by Dan Lanciani, ddl@harvard.harvard.edu
  180. ; Version 1.09  3 Nov 1991 by Joe R. Doupnik, Utah State Univ.
  181. ; Copyright (C) 1988 - 1991 FTP Software, Inc.
  182.  
  183. This unmodified source file and its executable form may be used and
  184. redistributed freely.  The source may be modified, and the source or
  185. executable versions built from the modified source may be used and
  186. redistributed, provided that this notice and the copyright displayed by the
  187. exectuable remain intact, and provided that the executable displays an
  188. additional message indicating that it has been modified, and by whom.
  189.  
  190. FTP Software Inc. releases this software "as is", with no express or implied
  191. warranty, including, but not limited to, the implied warranties of
  192. merchantability and fitness for a particular purpose.
  193.  
  194. USE AT YOUR OWN RISK.
  195.  
  196. To build, using Microsoft MASM 5 or later, LINK 3.64 or later, and EXE2BIN:
  197.  
  198. masm dis_pkt;
  199. link dis_pkt;
  200. exe2bin dis_pkt.exe dis_pkt.dos
  201. del dis_pkt.exe
  202. del dis_pkt.obj
  203.  
  204. Here is an excerpt from the formal NDIS v2 specification document by 3Com
  205. and Microsoft concerning what goes into the PROTOCOL.INI file.
  206.  
  207. PROTOCOL.INI
  208.  
  209. The PROTOCOL.INI file stores configuration and binding information for all the
  210. protocol and MAC modules in the system.  The file uses the same general format
  211. as the LANMAN.INI file.  It consists of a series of named sections, where the
  212. section name is in fact the module name from a module characteristics table.
  213. Below the bracketed module name is a set of configuration settings for the
  214. module in name=value format.  For example:
  215.  
  216. [MYNetBIOS]
  217. Drivername = NetBIOS$
  218. Bindings = ETHERCARD
  219. MaxNCBs = 16
  220. MaxSessions = 32
  221. MaxNames = 16
  222.  
  223. The rules for PROTOCOL.INI contents are:
  224.  
  225.  o Bracketed module name.  Must be the name of a protocol or MAC module, e.g.
  226.    [MYNetBIOS].  This is the name of the module as defined in that module's
  227.    characteristics table.  The name must be 15 characters or less (not
  228.    counting the brackets).  Mixed case may be used but the Protocol Manager
  229.    will convert it to uppercase when it reads the file into memory.
  230.  
  231.  o Drivername = <device driver name>.  This parameter is required for all
  232.    device driver modules.  It defines the name of the OS/2 or DOS device
  233.    driver that the module is contained in.  Note that a single device driver
  234.    name may be mentioned by several sections of the PROTOCOL.INI file, if the
  235.    driver contains multiple logical modules.  The Drivername parameter is the
  236.    recommended method by which a module searches for its module section in the
  237.    PROTOCOL.INI file to get its configuration parameters.  This allows the
  238.    module to find all relevant module sections based on a single name
  239.    intrinisic to the module independent of the particular bracketed module
  240.    name used in the PROTOCOL.INI file.  This keyword is also required for DOS
  241.    dynamic modules like TSRs or transient application modules.  Although there
  242.    is no driver name instrinsically assigned to such modules it is required
  243.    that a unique name be assigned to this keyword for such modules anyway.  In
  244.    this way the same search mechanism used by device drivers can be used by
  245.    dynamic DOS modules to find their relevant module sections in PROTOCOL.INI.
  246.  
  247.  o Bindings = <module name> | <module name>,<module name>, . . .
  248.    This parameter is optional for protocol modules.  It is not valid for MAC
  249.    modules.  If present, it is used by the protocol module to determine what
  250.    MAC modules it will ask to bind to.  (In other words, changing this
  251.    parameter in the PROTOCOL.INI file can reconfigure a protocol to bind to a
  252.    different MAC.).  The Bindings parameter may be omitted if the protocol
  253.    driver software is preconfigured to bind to a particular MAC, or if the
  254.    system will only contain one MAC and one static protocol module.  In the
  255.    latter case (only in static mode), the Protocol Manager by default will ask
  256.    the one static protocol to bind to the one MAC.
  257.  
  258.  o Other keywords and parameters.  Any other keyword=value statements are
  259.    module specific.  Keyword names must be 15 characters or less.  They may be
  260.    mixed case but are converted to uppercase when read by the Protocol
  261.    Manager.  Note that keyword names are unique within the scope of each
  262.    <module name> section and can appear within the section in any order.
  263.  
  264.  o Whitespace around the equals sign is not significant, nor is trailing white
  265.    space on the line.  Except for this leading and trailing white space, all
  266.    other characters of the value string are taken verbatim.
  267.  
  268.  o A list of 0 or more parameters can appear to the right of the equals sign.
  269.    If there are no parameters the equals sign can be optionally omitted.  A
  270.    parameter is terminated by a space, tab, comma, or semicolon.  No
  271.    parameters are interpreted by the Protocol Manager.
  272.  
  273.  o A parameter can either be up to a 31-bit signed numeric value or a string
  274.    of any length.
  275.  
  276.  o A numeric parameter can be expressed either in decimal or hexadecimal
  277.    format.  All numeric parameters must start with the characters '0' through
  278.    '9' or by a + or - followed by the '0' to'9' character.  A hexadecimal
  279.    parameter must start with '0x' or '0X' and use valid hexadecimal digits.  A
  280.    non-hexadecimal numeric parameter is treated as decimal integer.  A
  281.    parameter not surrounded by quotes and starting with 0 to 9 or + and -
  282.    followed by 0 to 9 will be assumed to be a numeric parameter.
  283.  
  284.  o A string is a parameter which either starts with a non-numeric character or
  285.    is surrounded with quotes ("....").  The string is preserved in the memory
  286.    image as it appears in PROTOCOL.INI.
  287.  
  288.  o A line starting with a semicolon in column 1 is a comment and is ignored.
  289.    Blank lines are ignored too.
  290.  
  291.  o Lines may be as long as required.  Continuation lines are not supported.
  292.    Lines end with CR LF.
  293.  
  294.  o Tabs, formfeeds, and spaces are considered to be white space.
  295.  
  296. The Protocol Manager supports an optional section with optional keywords
  297. defined below:
  298.  
  299. [PROTMAN]
  300. Drivername = PROTMAN$
  301. Dynamic = YES or NO
  302. PRIORITY = prot1, prot2, ...
  303. Bindstatus = YES or NO
  304.   
  305. The bracketed module name can be any valid name as long as it is unique within
  306. this PROTOCOL.INI.  Drivername is required and must be assigned PROTMAN$,
  307. identifying the section as belonging to the Protocol Manager.  None of the
  308. entries are case-sensitive.
  309.  
  310. The DYNAMIC keyword is optional.  It defaults to NO if not present.  If set to
  311. NO, the Protocol Manager operates only in the static mode and does not support
  312. dynamic protocol drivers.  If set to YES, the Protocol Manager operates in the
  313. dynamic mode and supports both static and dynamic binding.
  314.  
  315. The PRIORITY keyword is optional.  If absent, then the VECTOR uses default
  316. demultiplexing priority if multiple protocol drivers are bound to the same MAC
  317. (see Vector Demultiplexing in Chapter 7).  If present, the parameters on the
  318. right-hand side are presumed to be a list of protocol module names, highest
  319. priority first.  The VECTOR prioritizes protocol drivers for demultiplexing
  320. (if necessary) according to their order in the list, and packets are offered
  321. to the first protocol driver listed first.  Protocol drivers not listed are
  322. assigned default priority AFTER those listed.  It is not necessary that a
  323. protocol driver ever bind for it to be listed here.
  324.  
  325. The BINDSTATUS keyword is optional.  If absent, then the BindStatus command is
  326. not supported by the Protocol Manager.  If set to YES, then BindStatus is
  327. supported by the Protocol Manager.  The default disable condition is a memory
  328. optimization feature primarily for DOS environments.
  329.  
  330. End of file DIS_PKT.DOC
  331.