home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / NOVELL / ROUTE.ZIP / ROUTE
Encoding:
Text File  |  1990-10-31  |  11.7 KB  |  298 lines

  1. Figure 1:  Possible routes from Station 2 to Station G.
  2.  
  3.  
  4. [See copy of figure]
  5.  
  6. Figure 2:  Location of Routing Information in Token-Ring frame.
  7.  
  8.                 Access Control
  9.                  Frame Control
  10.            Destination Address                802.5 Header
  11.                 Source Address
  12. Route Control Broadcast/Length
  13.        Route Control Direction
  14.             Route Designator 1
  15.             Route Designator 2
  16.                             .              Routing Information
  17.                             . 
  18.                             . 
  19.  
  20.  
  21.  
  22.                           DSAP
  23.                           SSAP             802.2 Header
  24.                        Control
  25.  
  26.                                           Protocol Header
  27.  
  28.                    Information
  29.  
  30.  
  31.                                            Data
  32.  
  33.  
  34.  
  35.  
  36. Figure 3:  Sample code for using ROUTE.COM in a send routine.
  37.  
  38.  
  39. ;ASSUMES:
  40. ;
  41. ;      - The adapter is ready to send
  42. ;      - The adapter uses some kind of shared RAM interface
  43. ;
  44. ;      CS:BP points to the driver's configuration table
  45. ;      DS:BX points to the send ECB
  46. ;      ES:DI points to shared RAM buffer
  47.  
  48.  
  49. mov    ax, 4000h                           ; AH  =  Frame Control  =  data frame
  50.                                            ; AL  =  Access Control  =  00
  51. stosw                                      ; move AX into buffer ES:DI points to
  52. lea    si, ECBImmediateAddress[bx]         ; point DS:SI at destination address
  53. movsw                                      ; move 6 bytes to buffer ES:DI points at
  54. movsw
  55. movsw
  56.  
  57. push   ds                                  ; DS = segment containing the ECB
  58. push   cs                                  ; CS = segment containing the
  59.                                                  configuration table
  60. pop    ds                                  ; load CS into DS
  61.  
  62. lea    si, CDriverNodeAddress[bp]          ; point DS:SI at Source Address
  63. movsw                                      ; move 6 bytes to buffer ES:DI points at
  64. movsw                                      ;    this assumes no source routing field
  65.  
  66. movsw
  67.  
  68. pop    ds                                  ; restore segment containing the ECB
  69.                                            ;     DS:BX = points to send ECB
  70. lea    ax, ECBImmediate Address[bx]        ; point DS:AX at Destination Address
  71. sub    cx, cx                              ; set driver send flag to 0
  72. call   cs:CDriverSourceRouting[bp]         ; call ROUTE.COM which returns:
  73.                                            ;    DS:AX  pointer to source routing information
  74.                                            ;    CX     length of source routing information
  75.  
  76. jcxz   NoSourceRouting                     ; if CX=0 jump down into send routine
  77. or     byte ptr es:(-6) [di], 80h          ; set RII bit in Source Address
  78.  
  79. push   ds                                  ; DS = segment containing the ECB
  80. mov    ds, dx                              ; DX = segment containing the source
  81.                                                   routing information
  82. mov    si, ax                              ; point DS:SI at source routing information
  83. rep    movsb                               ; move source routing information from
  84.                                            ; DS:SI (ROUTE.COM) to ES:DI (ECB)
  85. pop    ds                                  ; restore segment containing the ECB
  86.  
  87. ; continue sending packet
  88.  
  89. Figure 4:  Sample code for using ROUTE.COM in a receive routine.
  90.  
  91.  
  92. ;ASSUMES:
  93. ;      - Driver is ready to receive a valid NetWare frame
  94. ;      - The adapter uses some kind of shared RAM interface
  95. ;
  96. ;      CS:BP points to the driver's configuration table
  97. ;      DS:BX points to the address of the 802.5 header in shared RAM
  98.  
  99. lea    si, 08[bx]                          ; point DS:SI at the source address of
  100.                                            ;   the 802.5 header in shared RAM
  101. lea    cx, 06[si]                          ; point DS:CX at the beginning of the
  102.                                            ;   source routing information
  103. call   cs:Cdriversourcerouting[bp]         ; call ROUTE.COM: preserves DS:SI
  104.  
  105.  
  106. ;Since your driver cannot assume that ROUTE.COM is loaded,
  107. ;  determine where the protocol header starts in the shared RAM frame
  108.  
  109. sub    cx,cx                               ; set CX to 0
  110. test   byte ptr ds:00[si], 80h             ; see if the first byte of source
  111.                                            ;   address has a valid RII bit
  112. jz     NoRIIBit                            ; if no RII bit, then 0 length source
  113.                                            ;   routing information
  114.  
  115. mov    c1, 1Fh                             ; move source routing size mask into c1
  116. and    c1, 06[si]                          ; and mask with first byte of source
  117.                                            ;   routing information
  118.                                            ;     (the Broadcast/Length field)
  119.                                            ; This puts source routing information
  120.                                            ;   length into CX
  121.  
  122. NoRIIBit:
  123.  
  124. mov    si, cx                              ; move source routing size into SI
  125. lea    si, 17[bx][si]                      ; point DS:SI at the beginning of the
  126.                                            ;   protocol header:
  127.                                            ;  17  bytes = 802.5 header+802.2 header
  128.                                            ;  SI  bytes = length of source routing
  129.                                            ;             information
  130.                                            ;  BX  points to top of 802.5 header
  131.  
  132. ; Continue receiving packet
  133.  
  134. Figure 5: Programmatic Interface for ROUTE.COM send routine.
  135.  
  136.  
  137. On Entry                                  On Return
  138.  
  139. DS:AX Pointer to destination address      DX:AX   Pointer to source routing field
  140.  
  141. CX    0000                                CX      Source routing field size
  142.  
  143. Int   Interrupts are disabled, and remain disabledIntInterrupts disabled
  144.  
  145.                                           Flags   CLD is in effect
  146.  
  147.                                           Note    Preserves BP, BX, DI, SI, DS, and ES
  148.  
  149.  
  150. Figure 6: Programmatic Interface for ROUTE.NLM send routine.
  151.  
  152.  
  153. On Entry                                  On Return
  154.  
  155. EAX   Board number                        EAX     Destroyed
  156.  
  157. ECX   0000 0000                           ECX     Source routing field size
  158.  
  159. ESI   Pointer to Destination Address      EDX     Destroyed
  160.  
  161.                                           ESI     Pointer to source routing address
  162.  
  163.                                           Int     Interrupts are disabled
  164.  
  165.                                           Flags   CLD is in effect
  166.  
  167.                                           Note    Preserves EBP, EBX, and EDI
  168.  
  169. Figure 7: Programmatic Interface for ROUTE.COM receive routine.
  170.  
  171.  
  172. On Entry                                  On Return
  173.  
  174. DS:CX Pointer to source routing field     CX      Destroyed
  175.  
  176. DS:SI Pointer to source address (with valid RII bit)FlagsCLD is in effect
  177.  
  178. Int   Interrupts are disabled, and remain disabledIntInterrupts are disabled
  179.  
  180.                                           Note    Preserves AX, BP, BX, DX, DI, DS:SI, and ES
  181.  
  182. Figure 8: Programmatic Interface for ROUTE.NLM receive routine.
  183.  
  184.  
  185. On Entry                                  On Return
  186.  
  187. EAX   Board number                        EAX     Destroyed
  188.  
  189. ECX   Pointer to the address of source routing fieldECXSource routing field size
  190.  
  191. ESI   Pointer to the Source Address       EDX     Destroyed
  192.  
  193.                                           ESI     Source routing address
  194.  
  195.                                           Int     Interrupts are disabled
  196.  
  197.                                           Flags   CLD is in effect
  198.  
  199.                                           Note    Preserves EBP, EBX, and EDI
  200.  
  201. Figure 9:  Relationship between ROUTE.COM and send and receive routines.
  202.  
  203.  
  204. [See copy of figure]
  205.  
  206. Figure 10: Function codes for reconfiguring ROUTE.NLM using the programmatic interface.
  207.  
  208.  
  209. 0  Load Board Number
  210.  
  211.       This command loads the board number specified in BL. ROUTE.NLM can support source routing
  212.       for more than one board; it keeps individual address tables for each board.
  213.  
  214.  
  215. 1  Unload Board Number
  216.  
  217.       This command specifies that the board number specified in BL should be unloaded. "Unloading" a
  218.       board in this context means that Source Routing is no longer required, and all packets should now
  219.       be sent with no Source Routing information.
  220.  
  221.       Note that unloading and then reloading a particular board will clear the Source Routing table and
  222.       cause ROUTE.NLM to rediscover new routes as addresses are requested.
  223.  
  224.  
  225. 2  Clear Source Routing Table
  226.  
  227.  
  228. 3  Change Unknown Destination Address Route
  229.  
  230.  
  231. 4  Change General Broadcast Route
  232.  
  233.  
  234. 5  Change Multicast Broadcast Route
  235.  
  236.       In the world of Token-Ring, when a packet is sent with 0FFFF FFFF FFFFh or 0C000 FFFF
  237.       FFFFh in the destination address field (not the routing control field), the packet is considered a
  238.       "broadcast." Every station on the network will receive the frame.
  239.  
  240.       A multicast broadcast is a selective broadcast. A multicast address has a destination address of
  241.       0C000 xxxx xxxxh, where xxxx xxxxh is any hexadecimal number except 0FFFF FFFFh. When a
  242.       packet is sent with a multicast destination address, only those stations that have the address
  243.       enabled will receive the frame. Multicast addresses are typically used by protocol stacks to isolate
  244.       groups of stations without affecting the entire network.
  245.  
  246.       Some multicast addresses are reserved by IBM and should not be used. IBM publishes the
  247.       following list in the IBM Token-Ring Network Architecture Reference Manual:
  248.  
  249.          0C000 0000 0001hActive Monitor
  250.          0C000 0000 0002hRing Parameter Server
  251.          0C000 0000 0008hRing Error Monitor
  252.          0C000 0000 0010hConfiguration Report Server
  253.          0C000 0000 0020hRESERVED
  254.          0C000 0000 0040hRESERVED
  255.          0C000 0000 0080hIBM's NetBIOS
  256.          0C000 0000 0100hBridge
  257.  
  258.          0C000 0000 0200h
  259.              through    RESERVED
  260.          0C000 0004 0000h
  261.  
  262.          0C000 0008 0000h
  263.              through    User-Defined
  264.          0C000 4000 0000h
  265.  
  266.       This list allows for a maximum of 12 user-defined multicast addresses.
  267.  
  268.  
  269. 6  Change Broadcast Response Type
  270.  
  271.       This command tells the 386 server how it should respond to a request that has arrived as a
  272.       broadcast. The following options can be placed in AH:
  273.  
  274.          00h   This value means that the server should respond directly to all broadcast request. The
  275.                response, however, is not a broadcast response. This is the default response mode.
  276.  
  277.          82h   This value means that the server should respond to broadcast requests with an all
  278.                routes broadcast frame.
  279.  
  280.          0C2h  This value means that the server should respond to broadcast requests with a single
  281.                route broadcast frame.
  282.  
  283.  
  284. 7  Change Source Routing Update Table Timer
  285.  
  286.       If an entry in the source routing table has not been used for a certain amount of time, ROUTE
  287.       sets a flag indicating that the entry should be updated the next time any source routing
  288.       information is received for that entry. This allows ROUTE to perform dynamic route discovery
  289.       in the event a bridge goes down. (ROUTE will always use a shorter route if one becomes
  290.       available.)
  291.  
  292.       This call allows the driver to set the amount of time ROUTE will wait before flagging entries for
  293.       update. (This function can also be performed from the server console.)
  294.  
  295.  
  296. 8  Remove Node from Source Route Table
  297.  
  298.