home *** CD-ROM | disk | FTP | other *** search
- Figure 1: Possible routes from Station 2 to Station G.
-
-
- [See copy of figure]
-
- Figure 2: Location of Routing Information in Token-Ring frame.
-
- Access Control
- Frame Control
- Destination Address 802.5 Header
- Source Address
- Route Control Broadcast/Length
- Route Control Direction
- Route Designator 1
- Route Designator 2
- . Routing Information
- .
- .
-
-
-
- DSAP
- SSAP 802.2 Header
- Control
-
- Protocol Header
-
- Information
-
-
- Data
-
-
-
-
- Figure 3: Sample code for using ROUTE.COM in a send routine.
-
-
- ;ASSUMES:
- ;
- ; - The adapter is ready to send
- ; - The adapter uses some kind of shared RAM interface
- ;
- ; CS:BP points to the driver's configuration table
- ; DS:BX points to the send ECB
- ; ES:DI points to shared RAM buffer
-
-
- mov ax, 4000h ; AH = Frame Control = data frame
- ; AL = Access Control = 00
- stosw ; move AX into buffer ES:DI points to
- lea si, ECBImmediateAddress[bx] ; point DS:SI at destination address
- movsw ; move 6 bytes to buffer ES:DI points at
- movsw
- movsw
-
- push ds ; DS = segment containing the ECB
- push cs ; CS = segment containing the
- configuration table
- pop ds ; load CS into DS
-
- lea si, CDriverNodeAddress[bp] ; point DS:SI at Source Address
- movsw ; move 6 bytes to buffer ES:DI points at
- movsw ; this assumes no source routing field
-
- movsw
-
- pop ds ; restore segment containing the ECB
- ; DS:BX = points to send ECB
- lea ax, ECBImmediate Address[bx] ; point DS:AX at Destination Address
- sub cx, cx ; set driver send flag to 0
- call cs:CDriverSourceRouting[bp] ; call ROUTE.COM which returns:
- ; DS:AX pointer to source routing information
- ; CX length of source routing information
-
- jcxz NoSourceRouting ; if CX=0 jump down into send routine
- or byte ptr es:(-6) [di], 80h ; set RII bit in Source Address
-
- push ds ; DS = segment containing the ECB
- mov ds, dx ; DX = segment containing the source
- routing information
- mov si, ax ; point DS:SI at source routing information
- rep movsb ; move source routing information from
- ; DS:SI (ROUTE.COM) to ES:DI (ECB)
- pop ds ; restore segment containing the ECB
-
- ; continue sending packet
-
- Figure 4: Sample code for using ROUTE.COM in a receive routine.
-
-
- ;ASSUMES:
- ; - Driver is ready to receive a valid NetWare frame
- ; - The adapter uses some kind of shared RAM interface
- ;
- ; CS:BP points to the driver's configuration table
- ; DS:BX points to the address of the 802.5 header in shared RAM
-
- lea si, 08[bx] ; point DS:SI at the source address of
- ; the 802.5 header in shared RAM
- lea cx, 06[si] ; point DS:CX at the beginning of the
- ; source routing information
- call cs:Cdriversourcerouting[bp] ; call ROUTE.COM: preserves DS:SI
-
-
- ;Since your driver cannot assume that ROUTE.COM is loaded,
- ; determine where the protocol header starts in the shared RAM frame
-
- sub cx,cx ; set CX to 0
- test byte ptr ds:00[si], 80h ; see if the first byte of source
- ; address has a valid RII bit
- jz NoRIIBit ; if no RII bit, then 0 length source
- ; routing information
-
- mov c1, 1Fh ; move source routing size mask into c1
- and c1, 06[si] ; and mask with first byte of source
- ; routing information
- ; (the Broadcast/Length field)
- ; This puts source routing information
- ; length into CX
-
- NoRIIBit:
-
- mov si, cx ; move source routing size into SI
- lea si, 17[bx][si] ; point DS:SI at the beginning of the
- ; protocol header:
- ; 17 bytes = 802.5 header+802.2 header
- ; SI bytes = length of source routing
- ; information
- ; BX points to top of 802.5 header
-
- ; Continue receiving packet
-
- Figure 5: Programmatic Interface for ROUTE.COM send routine.
-
-
- On Entry On Return
-
- DS:AX Pointer to destination address DX:AX Pointer to source routing field
-
- CX 0000 CX Source routing field size
-
- Int Interrupts are disabled, and remain disabledIntInterrupts disabled
-
- Flags CLD is in effect
-
- Note Preserves BP, BX, DI, SI, DS, and ES
-
-
- Figure 6: Programmatic Interface for ROUTE.NLM send routine.
-
-
- On Entry On Return
-
- EAX Board number EAX Destroyed
-
- ECX 0000 0000 ECX Source routing field size
-
- ESI Pointer to Destination Address EDX Destroyed
-
- ESI Pointer to source routing address
-
- Int Interrupts are disabled
-
- Flags CLD is in effect
-
- Note Preserves EBP, EBX, and EDI
-
- Figure 7: Programmatic Interface for ROUTE.COM receive routine.
-
-
- On Entry On Return
-
- DS:CX Pointer to source routing field CX Destroyed
-
- DS:SI Pointer to source address (with valid RII bit)FlagsCLD is in effect
-
- Int Interrupts are disabled, and remain disabledIntInterrupts are disabled
-
- Note Preserves AX, BP, BX, DX, DI, DS:SI, and ES
-
- Figure 8: Programmatic Interface for ROUTE.NLM receive routine.
-
-
- On Entry On Return
-
- EAX Board number EAX Destroyed
-
- ECX Pointer to the address of source routing fieldECXSource routing field size
-
- ESI Pointer to the Source Address EDX Destroyed
-
- ESI Source routing address
-
- Int Interrupts are disabled
-
- Flags CLD is in effect
-
- Note Preserves EBP, EBX, and EDI
-
- Figure 9: Relationship between ROUTE.COM and send and receive routines.
-
-
- [See copy of figure]
-
- Figure 10: Function codes for reconfiguring ROUTE.NLM using the programmatic interface.
-
-
- 0 Load Board Number
-
- This command loads the board number specified in BL. ROUTE.NLM can support source routing
- for more than one board; it keeps individual address tables for each board.
-
-
- 1 Unload Board Number
-
- This command specifies that the board number specified in BL should be unloaded. "Unloading" a
- board in this context means that Source Routing is no longer required, and all packets should now
- be sent with no Source Routing information.
-
- Note that unloading and then reloading a particular board will clear the Source Routing table and
- cause ROUTE.NLM to rediscover new routes as addresses are requested.
-
-
- 2 Clear Source Routing Table
-
-
- 3 Change Unknown Destination Address Route
-
-
- 4 Change General Broadcast Route
-
-
- 5 Change Multicast Broadcast Route
-
- In the world of Token-Ring, when a packet is sent with 0FFFF FFFF FFFFh or 0C000 FFFF
- FFFFh in the destination address field (not the routing control field), the packet is considered a
- "broadcast." Every station on the network will receive the frame.
-
- A multicast broadcast is a selective broadcast. A multicast address has a destination address of
- 0C000 xxxx xxxxh, where xxxx xxxxh is any hexadecimal number except 0FFFF FFFFh. When a
- packet is sent with a multicast destination address, only those stations that have the address
- enabled will receive the frame. Multicast addresses are typically used by protocol stacks to isolate
- groups of stations without affecting the entire network.
-
- Some multicast addresses are reserved by IBM and should not be used. IBM publishes the
- following list in the IBM Token-Ring Network Architecture Reference Manual:
-
- 0C000 0000 0001hActive Monitor
- 0C000 0000 0002hRing Parameter Server
- 0C000 0000 0008hRing Error Monitor
- 0C000 0000 0010hConfiguration Report Server
- 0C000 0000 0020hRESERVED
- 0C000 0000 0040hRESERVED
- 0C000 0000 0080hIBM's NetBIOS
- 0C000 0000 0100hBridge
-
- 0C000 0000 0200h
- through RESERVED
- 0C000 0004 0000h
-
- 0C000 0008 0000h
- through User-Defined
- 0C000 4000 0000h
-
- This list allows for a maximum of 12 user-defined multicast addresses.
-
-
- 6 Change Broadcast Response Type
-
- This command tells the 386 server how it should respond to a request that has arrived as a
- broadcast. The following options can be placed in AH:
-
- 00h This value means that the server should respond directly to all broadcast request. The
- response, however, is not a broadcast response. This is the default response mode.
-
- 82h This value means that the server should respond to broadcast requests with an all
- routes broadcast frame.
-
- 0C2h This value means that the server should respond to broadcast requests with a single
- route broadcast frame.
-
-
- 7 Change Source Routing Update Table Timer
-
- If an entry in the source routing table has not been used for a certain amount of time, ROUTE
- sets a flag indicating that the entry should be updated the next time any source routing
- information is received for that entry. This allows ROUTE to perform dynamic route discovery
- in the event a bridge goes down. (ROUTE will always use a shorter route if one becomes
- available.)
-
- This call allows the driver to set the amount of time ROUTE will wait before flagging entries for
- update. (This function can also be performed from the server console.)
-
-
- 8 Remove Node from Source Route Table
-