<<

Europaisches Patentamt European Patent Office 0 Publication number: 0 588 046 A1 Office europeen des brevets

EUROPEAN PATENT APPLICATION

0 Application number: 93112622.1 int. Ci.5; G06F 13/38, G06F 9/44

0 Date of filing: 06.08.93

0 Priority: 14.08.92 US 930584 0 Applicant: International Business Machines Corporation 0 Date of publication of application: Old Orchard Road 23.03.94 Bulletin 94/12 Armonk, N.Y. 10504(US)

0 Designated Contracting States: 0 Inventor: Bartek, Brice Alan DE FR GB 2505 Water Well Lane Austin, Texas 78728(US) Inventor: Mclntyre, Michael Sean 14702 Great Willow Drive Austin, Texas 78728(US) Inventor: Musta, Charles Anthony 6629 Whitemarsh Valley Walk Austin, Texas 78746(US)

0 Representative: Burt, Roger James, Dr. IBM United Kingdom Limited Intellectual Property Department Hursley Park Winchester Hampshire S021 2JN (GB)

(§v IEEE standard 802.2 virtual device driver.

0 In a network having a plurality of sages between the CCB3 32-bit format and a CCB3 nodes with one or more computer systems asso- 16-bit format. The physical device driver transmits ciated with a node a method for transmitting mes- and receives 16-bit CCB3 messages to and from a sages to and from a DOS application resident in a logical link control protocol driver resident in the memory to and from the network. The messages to memory. The logical link control protocol driver is and from the DOS application are handled a virtual preferably written to the ISO 8802-2 standards and device driver resident in the memory which is moni- passes and receives messages to and from the MAC toring the 5C . The virtual device driver layer and the LAN adapter. With an incoming mes- converts an outgoing CCB1 message from the DOS sage the virtual device driver arms a context hook application to a in a CCB3 32-bit format which fires when the has allocated CO message and an incoming 32-bit CCB3 message to a CCB1 sufficient memory to the DOS application resident format. The virtual device driver transmits the CCB3 Virtual 86 mode before transmitting the CCB1 mes- to device driver resident in to the DOS 00 message a physical sage application. 00 system memory. The physical device converts mes-

Rank Xerox (UK) Business Services (3. 10/3.09/3.3.4) EP 0 588 046 A1

MVDM 2 3 TCP/IP V86 NOMAD L&S-TO MODE 016 -7 WIN WIN APPLS APPLS APPLS 802.2 DOS 802.2 WIN WIN 3.3 LAN OS/2 3.X 4.0 APPLS 5.0 VDM VMBOOT VDM VMBOOT VMBOOT VDM 16-Brr, 32-1■B,rr 118 1201 122 124 126 APIS U2 RINGO 802.2 PDD 802.2 VDD 132 8022 134

NDIS TP. , ENET PCNET ... OTHER

138 • VDD/PDD INSTALL - DEV = IN CONFIG. SYS • VDD/PDD CONFIG - DOS PROGRAM VIA BASE OPERATING SYSTEM AUTOEXEC.BAT m FILE MVDM DIS- MAN MAN PATCH FIG. 3 104 102 106

2 1 EP 0 588 046 A1 2

This invention relates generally to data pro- ity of concurrently running applications. OS/2 2.0 cessing systems in an interconnected environment. has introduced the concept of an OS/2 virtual de- It is becoming increasingly prevalent to couple vice driver (VDD) to intercept DOS I/O calls which a plurality of data processing systems in an inter- emulates the functions of a particular hardware connected environment such as a Local 5 device. The VDD passes the I/O calls to an OS/2 Area Network (LAN) or Wide Area Network (WAN). physical device driver (PDD) which has actual ac- The networks are becoming increasingly compli- cess to the device. The PDD interacts with the cated, with several different LAN networks of dif- device adapter and passes the results to the VDD ferent protocols coupled together with the data which in turn passes the results to the DOS ap- processing systems from multiple vendors in the io plication. network. In the LAN environment, there is a problem To assure that different network technologies with the VDD/PDD arrangement. An OS/2 VDD is a can communicate with each other, most vendors 32-bit ring zero application that can only interact provide capability to according to the with an OS/2 PDD which is also a 32-bit applica- IEEE and International Standard Organization's 75 tion. Currently, the protocol drivers and device dri- standards for Local Area Networks. ISO 8802-2 vers which control the LAN adapters are written to (IEEE Standard 802.2-1989) Logical Link Control the ISO and IEEE standards which call for a 16-bit Protocol describes the data link layer in a Local protocol. Area Network. ISO 8802-3 (IEEE Standard 802.3- It is desirable to be able to transmit a message 1988) describes a utilizing CSMA/CD as the 20 from a DOS application running in the Virtual 8086 access method. ISO 8802-4 (IEEE Standard 802.4- mode of OS/2 to the local area network without 1985) describes a bus utilizing token passing as change to the DOS application code. the access method. ISO 8802-05 (IEEE Standard This can be accomplished by using an OS/2 802.5-1989) describes a ring utilizing token passing physical device driver as an intermediary between as the access method. ISO 8802-07 describes the 25 the OS/2 virtual device driver and the IEEE 802.2 ring utilizing a slotted ring as the access method. protocol driver, rather than the OS/2 physical de- This family of standards deals with the physical vice driver's normal use as an interface to an actual and data link layers as defined by the ISO open hardware device. In a having a systems interconnection reference model. plurality of nodes with one or more computer sys- The operating system of a computer system is 30 terns associated with a node, a CCB1 message responsible for controlling the from a DOS application running in a computer components such as a graphic display, a disk system memory is transmitted to the 5C interrupt. storage device and a according to sets of The CCB1 message is captured by a virtual device instructions in the system memory and through the driver running in the computer system memory agency of a plurality of code modules called device 35 which is monitoring the 5C interrupt. The virtual drivers. If a personal computer is coupled to a local device driver converts the CCB1 message to a area network, it will typically include a LAN adapt- message in a CCB3 32-bit format. The virtual de- er, a piece of hardware, and a LAN device driver vice driver transmits the CCB3 message to a phys- written compatibly to the ISO and IEEE standards. ical device driver running in system memory which One of the first widely successful operating sys- 40 converts the message in the CCB3 32-bit format to tems for a personal computer system was the a CCB3 16-bit format. The physical device driver Personal Computer , com- transmits the 16-bit CCB3 message logical link monly called DOS, which is used for personal control protocol driver running in the computer having a CPU in the Intel 286, 386, 486 system memory. The logical link control protocol lines of microprocessors. 45 driver is preferably written to the ISO 8802-2 stan- OS/2 2.0 is a vastly superior operating system dards and passes the message down to the MAC to DOS, but because of the large base of installed layer and the LAN adapter. DOS applications which users are unwilling to give The method for transmitting a message from up, OS/2 2.0, to be commercially viable, must the network to a DOS application running in the reliably run the DOS applications. OS/2 2.0 runs 50 Virtual 8086 mode in a system memory is similar. DOS programs in a special Virtual 8086 mode of First, after a message is received from the network the Intel 386 and 486 processors. The Virtual 8086 the logical link protocol driver delivers a 16-bit mode allows each DOS application to run in its own CCB3 message the physical device driver running protected one megabyte of memory space called a in the computer system memory. The physical Virtual DOS Machine (VDM). While it appears to 55 device driver converts the 16-bit CCB3 message to the DOS application that it is running in DOS, it a 32-bit CCB3 message and sends it to the virtual must use OS/2 resources for any I/O calls to sys- device driver running in the computer system tem devices which must be shared among a plural- memory. The virtual device driver converts the

3 3 EP 0 588 046 A1 4

CCB3 message to a CCB1 message and arms a work and a display adapter 36 for connecting the context hook. The context hook is fired when the bus to display device 38. operating system has loaded the memory belong- The preferred embodiment of the subject in- ing to the DOS application running in Virtual 8086 vention is an IBM Personal System/2 with the IBM mode. When the context hook is fired, the virtual 5 OS/2 operating system installed. Detailed descrip- device driver transmits the CCB1 message to the tions of the hardware and environment are DOS application. provided in PS/2 Hardware Interface Technical Ref- Thus an improved method is provided for erence, S10G-6457, IBM Corporation (1991), and transmitting of data in a data processing system OS/2 Presentation Manager Programming, SC28- from a local area network application written to w 2700, IBM Corporation (1992). While the invention operate in the real address mode of a processor to will be described in terms of this hardware and a local area network through a virtual device driver software, one skilled in the art will recognize that and physical device stack written for an operating other operating systems and hardware can be sup- system which uses both the real address mode ported without undue experimentation. Also resi- and protected address mode of the processor. 15 dent on the computer system is the OS/2 LAN A preferred embodiment of the invention will support including the software now be described by way of example with refer- making up the subject invention. The system soft- ence to the following drawings in which:- ware used in the previous release is described in FIG. 1 depicts a typical workstation which would the following publications available from IBM and be coupled to a network environment in accor- 20 incorporated herein by reference. IBM Operating dance with the present invention. System/2 Local Area Network Server Version 2.0 FIG. 2 depicts a plurality of workstations in a Information and Planning Guide (G236-0162); IBM network environment according to the present Local Area Network Server Programs (Specification invention. Sheet) (G360-2753); and IBM Local Area Network FIG. 3 depicts the code module in the memory 25 Technical Reference (SC30-3383). of a workstation operating according to the Interconnected computing environments are present invention. becoming much more prevalent. Network environ- FIGs. 4A-4C are flow diagrams of the configura- ments are becoming more varied, consisting of tion to prepare DOS applications to run different LAN technologies, multiple vendors and within the OS/2 2.0 Virtual DOS machines in 30 multiple adapters. There is also a higher perfor- accordance with the present invention. mance requirement and a greater need for network FIG. 5 depicts the data structure for the DOS management. FIG. 2 is an illustration of a typical configuration process depicted in FIGs. 4A-4C. computer network environment comprising a plural- FIG. 6 is a flow diagram for the process of ity of interconnected workstations similar to that converting an IEEE 802.2 CCB1 control block to 35 shown in FIG. 1 . an IEEE 802.2 CCB3 control block. FIG. 2 illustrates a local area network 40 which FIGs. 7A-7F are flow diagrams for the process is preferably an IBM token ring, however, it could of handling a hardware interrupt at the LAN also be an Ethernet or PC net or other LAN type adapter to a DOS application in accordance to system. OS/2 requester 42 communicates via LAN the present invention. 40 40 to LAN Server server 44 for file sharing applica- FIGs. 8A-8B depict the fields in the CCB1 and tion server, database server, communications serv- CCB3 control blocks. er and other services. The OS/2 Requester 42, as A representative hardware environment is de- might be suspected, runs on the OS/2 2.0 operat- picted in FIG. 1, which illustrates a typical hardware ing system. The DOS Requester 46 communicates configuration of a workstation in accordance with 45 by means of Bridge 48 to LAN 40 to request the subject invention having a central processing similar services from the LAN Server server 44. unit 10, such as a conventional microprocessor, Similarly, the DOS Requester 46 runs on the DOS and a number of other units interconnected via a Operating System 5.0. The Bridge 48 is used to system bus 12. The workstation shown in FIG. 1 couple the DOS Requester 46 and Network Server includes a Random Access Memory (RAM) 14, 50 50 via Ethernet 51 to the LAN 40. The Netware Read Only Memory (ROM) 16, an I/O adapter 18 Server 50 runs on the Novell NetwareTM local area for connecting devices such as disk network software and provides an example of the units 20 to the bus, a interface adapter 22 for level of integration of vendors which is possible in connecting a keyboard 24, a mouse 26, a speaker today's local area networks. The OS/2 SNA gate- 28, a microphone 32, and/or other 55 way 52 provides service to the LAN 40 via bus 54 devices such as a touch screen device (not shown) to the other networks which are using the SNA to the bus, a communication adapter 34 for con- Protocol. Finally, powerful RISC based workstations necting the workstation to a data processing net- such as the RISC System/6000 56 can also be

4 5 EP 0 588 046 A1 6

coupled to the local area network 40. passed control blocks to the LAN adapter contain- LAN adapter and Protocol Support (LAPS) con- ing data to be transmitted on the LAN and con- sists of the network communication software neces- trolled transmission of the data to remote destina- sary to support LAN connectivity. LAPS is a com- tion. Data sent out on the LAN and coming in off bination of Network Driver Interface Specification 5 the LAN is passed via interrupt 5C to LAN support (NDIS) compliant protocol drivers, NDIS compliant program which would then in turn give it to the network adapter drivers, Application Program Inter- application. The LAN support program can work in face (API) support software, and configuration and an OS/2 2.0 environment, however, since it was installation software for the drivers. The IBM Net- coded assuming that it had exclusive use of the work Basic Input/Output (NETBEUI) has been ex- 70 LAN adapter there are no provisions made for tended to interface to NDIS and to the 802.2 speci- sharing the LAN adapter. In other words, no other fication. A complete description of the 802.2 com- can use the LAN adapter once LAN munication standard is available in International support program has initialized. Standard (ISO) 8022 (1989). FIG. 3 is a block Under OS/2 2.0 virtual device drivers service diagram of the LAN Adapter and Protocol Support 75 DOS interrupt requests. This allows a DOS applica- for OS/2 2.0. tion to run unmodified within OS/2 2.0. There are The CPU within a computer can process in- two different operating modes on which a DOS formation relatively quickly. However, the computer application may run, Virtual 8086 mode (V86 mode) input and output devices are slow. Each of these and a VM Boot mode. When a DOS application devices is controlled by a device driver which 20 runs Virtual 8086 mode a VDD may allocate normal isolates the rest of the software from the I/O de- DOS memory. However, when a DOS application vices. Each device driver is programmed with the runs in a VM Boot mode, the allocation of normal physical characteristics of the device. DOS memory is not allowed by the OS/2 2.0 op- In the Personal Computer Disk Operating Sys- erating system. Therefore, an alternate mechanism tem (PC/DOS) each PC adapter in the personal 25 to get the necessary memory allocated for the VDD computer uses a certain interrupt in the interrupt is needed so that the DOS applications interrupt vector table and in the case of a local area network request can be satisfied. adapter card Talking IEEE 802.2 or NETBIOS it is One preferred method is to include a simple interrupt 5C (Int 5C). The LAN adapter card can be DOS device driver, whose purpose is to allocate a Token Ring adapter card, it can be PC Net 30 DOS memory for use by the VDD. When the DOS adapter card, it can be an Ethernet adapter card, driver initializes it has knowledge of how much etc. The Interrupt 5C is used by software applica- memory the VDD needs, this value is the maximum tions to interface with the LAN device driver which amount of memory that the VDD would need to interfaces to the LAN adapter card. When an ap- access in the VM Boot environment. As the DOS plication wants to give data to the LAN adapter 35 driver initializes, it places in its data area address card to transmit out on the LAN, interrupt 5C is into a command control block (CCB) which it is- invoked. The application uses a command control sues to the interrupt 5C which the VDD has taken block (CCB), for example, a CCB transmit, and control. The command code that the DOS device within the control block there are one or more driver places into the CCB is one which signifies to pointers to data. If an application wants to send the 40 the VDD that the address following is the address string "1, 2, 3, 4 and 5", it supplies a pointer in the of the DOS driver's data area and that its memory CMD control block to a data string and invokes is for use by the VDD. Upon receipt of the CCB, interrupt 5C. The computer system gives the data the VDD then initializes the memory by inserting its to the LAN adapter card to transmit out on the control block signatures. LAN. Conversely, when data arrives at the PC from 45 FIG. 3 depicts a plurality of software modules the LAN via the LAN adapter card, the LAN device which would be resident in the random access driver looks at the frame, determines the type of memory of a workstation operating in accordance frame and gives the data to the application via with the present invention. As part of the OS/2 2.0 interrupt 5C. The system refers to the DOS inter- Operating System 100, there is a MVDM manager rupt vector table, gets the address of the device 50 102 that manages the multiple virtual DOS ma- driver which handles the interrupt, makes a control chines that run under OS/2 2.0 in the V86 mode. block and transfers control to the device driver's The V86 mode is the emulated DOS mode that address so that the data can be decoded and OS/2 provides for DOS applications to enable them processed. to run unmodified. Those DOS applications which In one example of the prior art in a pure DOS 55 are accustomed to LAN communications can re- environment the interrupt 5C handling for the LAN main unmodified and as previously described adapter was done by an IBM product called LAN would invoke interrupt 5C, that interrupt 5C vector Support Program interfaced to the LAN adapter, now contains the address of a virtual device driver

5 7 EP 0 588 046 A1 8

130. When the virtual device driver 130 gets a configuration utility and all default values will be command control block from one of the applica- used. If input is provided to the DOS configuration tions via the MVDM manager 102, it passes the utility, step 156, a loop is constructed to process control block to the 802.2 PDD 132. The 802.2 each input parameter individually. Each input pa- PDD 132 is a 16-bit OS/2 physical device driver 16 5 rameter is checked to see if it is 0, step 158, running in the OS/2 protect mode. The PDD 132 in meaning that it is the last configuration parameter turn passes the control block to the 802.2 protocol processed and there are no further parameters to driver 134 and the 802.2 protocol stack then ser- be processed. vices that request, either by transmitting or receiv- If there are no further parameters, the process ing data across the NDIS interface 136. The ap- io continues to the issuance of the configuration con- plications 110 running in OS/2 protect mode also trol block to the interrupt 5C interface. In the next can share the LAN adapter now that the virtual check in step 160, the input is checked across a device driver 130 and physical device driver 132 switch construct with cases for each of the variable have enabled the DOS applications to share the resource values, "S" for Sessions, "C" for Com- adapter. The OS/2 protect mode applications 110 15 mands, "" for Direct station support, "N" for use the 16 and 32 bit API's 112 to issue control Names and "A" for SEND.NO.ACK Support. In blocks. The control blocks are passed directly to each case, the switch statement constructs a spe- the 802.2 protocol drivers 134 which in turn ser- cific request variable assigning to that the amount vices the API control block request and either of that resource as requested. Each resource vari- transmits or receives data over the network. The 20 able is checked against, an allowable range for that LAN technical reference which describes the 802.2 parameter. If the requested value is outside the protocol, details the specifics of each command allowable range, a flag is set indicating that there control block that can be issued to the 802.2 pro- has been invalid input into the configuration utility. tocol stack. Since there was invalid input, all the request vari- In FIG. 4A, step 150 is the start of the DOS 25 ables will be set to their default value. configuration utility. One preferred embodiment of As part of the case statement constructed in the DOS configuration utility is a DOS program that step 170, there are two special identifiers provided: is invoked from a DOS command prompt or is part the first is a back slash as in step 170 that tells the of a .BAT File in DOS. In step 152 a call is made DOS configuration facility to index to the next for the initialization of the data structures that will 30 adapter value or column in the 5X16 configuration be used in the DOS configuration program and matrix as depicted in FIG. 5. The second identifier passed to the virtual device driver. The main data is an equal sign that as in step 174 which tells the structure is the configuration control block which DOS configuration utility program to copy the re- consists of four fields. The first field being at offset quested variables from the current adapter to the 0 in the control block is the command code which 35 next adapter. If the input parameter does not sat- is predefined to be "0XFA". The second part of the isfy the tests in step 160, 170 or 174, it falls control block at offset 1 is defined to be the error through to step 178. Once the invalid argument flag code indicating to the virtual device driver whether is set to 'TRUE', a comparison is made to that flag or not an error in input had occurred. The third in step 180. If the flag is set to true all defaults will byte of control block at offset 2 is the 40 be taken in the 5X16 matrix as shown in FIG. 5. In "SEND.NO.ACK flag" which indicates to the virtual step 184, a check is made to see if name number device driver whether the SEND.NO.ACK support is one support is requested and the names are equal being requested from the DOS application. The to the default; if so, one name is added to the fourth byte of the structure at offset 3 is a byte amount requested. As name number 1 is itself a filler so that the virtual device driver remains on an 45 name, the user has 17 available names, instead of even word boundary. 16. The process continues in step 188 where the Next, embedded in the control block is a 5X16 actual configuration control block is issued to the array, using five distinct resource request variables interrupt 5C handler. and the 16 LAN adapters to support as indexes. FIG. 6 is a flow diagram of the procedure The memory for this control block is initialized also 50 which captures a CCB1 control block issued from a in step 152 to the area of memory allocated by the DOS application, passes it to the 802.2 virtual DOS configuration program. Additionally, the adapt- device driver passing it to the physical device er number variable which indexes from 0 through driver and further passing it onto the 802.2 protocol 15 for each adapter number is initialized to begin at driver. The process starts at step 200 where an adapter 0. The first check that is made in the DOS 55 interrupt 5C is received from the DOS application. configuration program is for the number of input This means that a CCB1 was issued by the DOS parameters, in step 154. If the number of input application to the interrupt 5C which is being han- parameters is 0, no input has been provided to the dled by the VDD 802.2 device driver. In step 202,

6 9 EP 0 588 046 A1 10 the V86 mode control block address is converted in step 226. The call return model between the into a linear mode control block address. The linear VDD and the LAN PDD 224, is a 32-bit call return mode control block address is used by the VDD as model. The call return model between LAN PDD it is much easier to manipulate than a V86 mode and 802.2 protocol driver is a 16-bit call return control block. A test is performed to determine 5 model. The LAN PDD is provides a 32-bit to 16-bit whether the control block is a valid CCB1 control compatibility call return model module. block in step 204. If not, the control block is routed FIGs. 7A-7F are flow diagrams of the asyn- to the error handler in step 206. The error handler chronous completion processing on a hardware in- will return an error code to the DOS application terrupt from a local area network communicating indicating that the control block sent was not a io back to the DOS application. After the hardware CCB1 control block. If the control block is a CCB1 interrupt has passed up through the network adapt- control block, in step 208, an initial copy of the er and the NDIS layer to the 802.2 protocol driver, CCB1 block is made to the trace buffer. the 802.2 protocol driver in step 250 needs to In step 210, the CCB1 command code is taken notify the virtual device driver of completion of a from the CCB1 and used as an index into a table of is hardware interrupt. It does so through the LAN local processing command specific routines, Con- PDD. A LAN DD 16-bit control block is passed by trol is transferred to a specific routine based on the the 802.2 protocol driver to the 802.2 PDD in step CCB1 command code. In step 212 through 218, 250. there are four representative commands that are of In step 252, the LAN 802.2 PDD will receive particular interest to the VDD. There are many 20 one of three events from the 802.2 protocol driver: other command specific routines which may be a CCB3 completion, a received data completion; or, addressed in translating a CCB1 control block to a an exception event completion. In step 254, the CCB3 control block that will ultimately be sent to type field in the CCB3 is set according to the type the OS/2 802.2 protocol stack. In step 212, direct of event. This event is passed by the PDD where open adapter issuing a CCB1 25 the event is put on a completion queue 256 to be DIR.OPEN.ADAPTER. Three functions that the vir- retrieved at a later time. Then a check is made, in tual device driver may need to perform on behalf of step 258, to see if the DOS context hook is already the DOS application include setting a group ad- armed, which is to be fired at a later time. The dress, setting a functional address and opening the DOS context hook is used to determine whether direct station on behalf of the DOS application, if 30 the specific VDM which will ultimately receive the configured. In step 214, the command chosen is message is loaded and active in the foreground. If DLC open service access point (SAP) where the the context hook is armed, control goes back to the virtual device driver will create its own SAP buffer operating system to wait for the context hook to pool. One of the key design points of the DLC fire, in step 259. If the context hook is not armed, open SAP is that there are two buffer pools that are 35 the context hook is then armed in step 260 and managed by the virtual device driver. One buffer then control is given back to the operating system pool is the DOS CCB1 buffer pool and the second in step 259. one is the CCB3 OS/2 SAP buffer pool that the In the second portion of FIG. 7A, the DOS virtual device driver will use when communicating context hook fires that was armed in step 260 to the OS/2 802.2 protocol driver. 40 indicating that the DOS context is in place. Control When a transmit CCB1 is issued to the virtual is given to the VDD from the MVDM manager in device driver by the DOS application in step 216, step 262, the VDD control is in CCB context in step the virtual device driver will copy the data to be 264 and then, in turn, to CCB APPEND in step 266. transmitted into one of its own buffers in order to CCB context is the procedure which gets control send that buffer to the 802.2 protocol stack. In step 45 after the DOS context hook fires. CCB APPEND is 218, the receive processing allows that when a the procedure which processes the completion receive command is issued by a DOS application, queue. The event that was placed on the comple- the virtual device driver will put a receive command tion queue in step 256 is taken off the queue in to 802.2 OS/2 protocol using buffers that the virtual step 266 and then examined to determine which of device driver had constructed during the DLC open 50 the three events, in the tests in steps 268, 270 or SAP processing. 272, the element pertains. If the test is positive in In step 220, CCB3s are issued asynchronously step 268, the event taken off the completion queue to the OS/2 802.2 protocol driver. In step 222, is a CCB3 completion. The event will proceed to CCB3s are issued asynchronously to the 802.2 step 274 where the CCB3 will have an associated OS/2 protocol stack. The CCB3s that come from 55 CCB1 to be completed back to the DOS applica- steps 220 and 222 are processed in step 224, tion. When the CCB1 is sent to the LAN and where the LAN PDD module a 16-bit physical de- translated to a CCB3, the segment offset and linear vice driver issues them to the 802.2 protocol driver addresses of the CCB1 and CCB3 are kept in a

7 11 EP 0 588 046 A1 12 cross-reference field at the end of the CCB3. This back to the virtual device driver after a predeter- information is used when the CCB3 is completed mined period in the event that the DOS application back by the message on the LAN. STI hook is a program does not perform an interrupt return. Con- way for a VDD to get information to a DOS applica- trol is then given back to the OS/2 2.0 operating tion without interrupting an important part of the 5 system in step 294, while the process waits for the DOS application process. If the test in step 278 return hook that was armed in step 292 to fire. determines that the application CCB1 has a post The flow diagram in FIG. 7C depicts the pro- routine defined, an STI hook will be armed in step cess of CCB return hook processing. Control is 280 to call the DOS application when are given to the virtual device driver, after a CCB return enabled in the DOS context. If the CCB1 does not io hook fires, by the MVDM manager in step 300. have a post routine, control will be returned to step After a specified period of time, a check is made, 274 in a loop processing CCBs until all CCBs are step 302, to determine if the dead man timer is still exhausted. The type of event received by the PDD armed. If the timer is armed, the timer is disarmed determines which test 268, 270 is performed. If it is in step 304. A check is performed in step 306 to a receive, step 276 forwards the data to step 316 in is see if the timer had fired inappropriately. If the FIG. 7D. If it is an exception, step 272 forwards the timer had fired inappropriately, control is given data to step 334 in FIG. 7E. back to the operating system. If the timer is FIG. 7B is a flow diagram which outlines the deemed to have fired correctly, the process pro- 802.2 asynchronous completion processing on a ceeds to step 308 where the client register frame CCB STI hook firing. Control is given to the 802.2 20 that contains the registers of the DOS context are virtual device driver as the result of a STI hook restored to their original values. Interrupts in the firing (meaning that interrupts are enabled in a DOS environment are enabled in step 310, and DOS context), a check in step 282 is made to then in step 312, a check is made to determine the ensure that the operating system is in protect initial mode of operation, protect mode or Virtual mode. If the operating system is not in protect 25 8086. If protect mode was the initial mode of op- mode, the check in step 282 will trigger step 284 eration, a switch is made to protect mode in step which switches to V86 mode. 314 and then control is given back to the operating The process continues on to step 286 where system via a call to CCB APPEND. the client register frame (CRF) is saved. Also, in In FIG. 7D, 802.2 asynchronous completion step 286, the DOS flags are saved on the stack 30 processing for a receive data appendage is de- that the DOS application is using; the flags are kept picted. If when the VDD is entered as the result of in one of the registers of the CRF. The CRF is a a CCB context hook firing, the event indicates structure that contains the values for all the regis- received data, a check is made to see if the DOS ters in a specific DOS contest. DOS interrupts are application program has SAP buffers available to disabled and the CCB1 is returned. A check is 35 hold the arriving data, in step 316. SAP buffers made, in step 288, to see if the command complet- memory that is given the 802.2 API by the DOS ing is a receive. The virtual device driver has to application to store data received by the LAN treat the receive completion differently than other adapter for that application. If the DOS application command completions due to the nature of the does not have SAP buffers available, a test is receive command. The receive stays outstanding 40 performed to determine whether the frame coming forever, so the receive command given to the 802.2 in is an information frame in step 318. If so, the OS/2 protocol driver is not cancelled. If the receive virtual device driver will emulate local busy to the data appendage test is true in step 288, the virtual DOS application in step 320. Local busy is a state device driver will call the DOS appendage in step in the 802.2 protocol to prevent more information 290, arm a return hook that will give control back to 45 being sent to a node than can be stored at the the virtual device driver when the DOS application node. If the frame received is not an information program does an interrupt return. Also, in step 290, frame, the OS/2 SAP buffers containing the data the virtual device driver will arm a timer that will received from the network are freed, in step 322, give control back to the virtual device driver after a and a call is made to CCB APPEND. predetermined period in the event that the DOS 50 If the DOS application does have enough DOS application program never executes an interrupt SAP buffers to hold the data, the DOS SAP buffers return. If the command completed to the virtual that are managed by the virtual device driver are device driver is not a receive data appendage in reserved to contain the data received in the OS/2 step 288, the virtual device driver will call the SAP buffers in step 324. The data is copied into CCB1 completion routine in step 292. Further, in 55 the DOS SAP buffers from the OS/2 SAP buffers in step 192, the VDD will issue a return hook, free the step 326. A loop is performed copying all data from CCB3 control block issued to the OS/2 802.2 pro- OS/2 SAP buffers to DOS SAP buffers until the tocol driver and set a timer that will give control number of DOS SAP buffers is exhausted or the

8 13 EP 0 588 046 A1 14

end of the data contained in the OS/2 SAP buffers program executes an interrupt return. Also, in step has been reached, step 328. Once the data is 362, the OS/2 event element that was used to copied into the DOS SAP buffers, the OS/2 SAP contain the exception event information is freed buffers are freed back to the OS/2 SAP buffer pool back to the status event free queue to be reused. A in step 330. The process continues to arm the CCB 5 check is then made in step 364 to determine STI hook, step 332, that will allow the VDD to whether or not a CCB time out timer should be deliver the DOS SAP buffers back to the DOS armed. If so, the timer is armed in step 366 and application. control is returned to the operating system in step In FIG. 7E, 802.2 asynchronous completion 367. If not, control goes back to the operating processing for an exception event is depicted by io system in step 367 without arming a timer. means of a flow diagram. When the MVDM man- FIGs. 8A-8B portray the CCB1 and CCB3 con- ager calls the virtual device driver due to a context trol blocks which are described in detail in the IBM hook firing and the event hype indicated is an Local Area Network Technical Reference (SC30- exception event, the exception event may be one 3383). The CCB1 control block is the command of four types: DLC status; adapter check; PC error; is control block for the IEEE 802.2 adapter support or, system action. The type of event is found in software, which was provided with the original To- step 334 by comparing the type code with the four ken-Ring PC adapter or rather, the Local Area different types of exception events. A check is then Support Program, both products of the IBM Cor- made in step 336 to see if the DOS application has poration. The CCB3 is the command control block requested to be notified on that particular type of 20 with a device interface provided with the commu- status event. If not, in step 338, the element con- nications manager of OS/2 Extended Edition 1.1 taining the data is put back on the status event free and higher. The CCB1 and CCB3 command control queue in the VDD and a call is made to CCB blocks are illustrated in FIGs. 8A and 8B, respec- APPEND. If the DOS application program has re- tively. In the specification, it is possible to discuss quested notification of these events, step 340, a 25 a command that might be used by both a CCB1 specific routine for each corresponding exception and a CCB3 interface, it is done by using the term type is called. Exception routines DLC status in CCB only. step 312, adapter check in step 344, PC error in To issue a request to a LAN device driver for step 346 and for system action in step 348 are the DOS operating system, a DOS network applica- available. In each of these four routines, specific 30 tion program assembles a control block containing status information is obtained from the element that a command and related information for the LAN was passed to the virtual device driver from the adapter. The application then puts the computer 802.2 protocol driver. Once the appropriate excep- systems main memory address of this control tion routine is finished and specific event process- block into the extra segment (ES) and base (BX) ing completed, an STI hook is then armed, in step 35 registers. At this point the DOS application invokes 350, to prevent the VDD from entering the DOS interrupt 5C. The LAN adapter device drivers re- application inappropriately, waiting until the STI spond to the 5C interrupt by processing the control hook is fired to complete the event back to the block. DOS application program. Control is then returned Referring to FIG. 8A, the LAN adapter support to the OS/2 operating system in step 351 . 40 for a CCB1 for DOS is described. The content of The process continues with 802.2 asynchro- the first field indicates to the LAN device drivers nous command processing for a CCB exception which type of interface the DOS program wishes to STI hook as depicted in FIG. 7F. A check is made use. If the first field contains either a "00" or "01 " in step 352 to ensure that the operating system is code, the block is considered to be a CCB and currently in V86 mode. If the operating system is 45 either the direct interface with the DLC interface is not V86 mode, a switch to V86 mode, step 354, is being used. If the first field contains a byte greater made. Once it is determined that the operating than "OF" the net BIOS interface is being used, system is V86 mode, step 356, the client register and the control block is to be considered NCB frame is saved. Also in step 356, the flags are also rather than a CCB. The second field indicates the saved on stack, DOS interrupts are disabled and 50 CCB command perform. The third field is a com- the client register frame is set up for the call to the pletion code as provided by the LAN adapter de- DOS application program. A check is then made, in vice drivers. Field is set to "FF" when the CCB is step 358, to determine whether traces are request- received, while the field is "FF" the application ed. If traces are requested, step 360, the event is must not alter CCB or any associated data. When traced to the OS/2 trace buffer. The process con- 55 the LAN adapter completes the command, the LAN tinues to step 362 where the DOS appendage is device driver set the field to the appropriate com- called, a return hook is armed to return control to pletion code, such as "00" means successful com- the virtual device driver when the DOS application pletion. The fourth field defines a work area field

9 15 EP 0 588 046 A1 16 for the LAN adapter device drivers to use. The fifth Claims field is used the application program to find the next command in the queue of outstanding com- 1. In a computer network having a plurality of mands or a queue of commands. The sixth field nodes with one or more computer systems CCB_CMB CMPL is the address of the user AP- 5 associated with a node, a method for transmit- PENDAGE that the LAN adapter device drivers will ting a message from a process resident in a go to upon command completion. When the AP- memory to the network, comprising the steps PENDAGE receives control at this point the ad- of: dress of the CCB that was completed will be in capturing a message in a first format by registers ES and BX and the CCB RETCODE will io means of a virtual device driver resident in the be in register AL. The seventh field memory; CCP_PARM_TAB points to additional commands converting the message in the first format specific parameters. to a second format; To request a device driver interface by CCB3, transmitting the message in a second for- the application program device driver must place 15 mat to a physical device driver resident in the address of the CCB3 to be executed by the system memory which converts the message device driver interface into registers ES and BX in the second format to a third format; and, and push an indication code of "0000" onto the transmitting the message in the third for- OS/2 stack. The application program device driver mat to a logical link control protocol driver then issues a far call instruction to the OS/2 Ex- 20 resident in the memory to be transmitted to tended Edition device driver interface intercommu- the network. nication entry point. At the return from the device driver interface all registers will contain their origi- 2. In a computer network having a plurality of nal values, with the exception of the AX register, nodes with one or more computer systems which will contain the immediate return code. 25 associated with a node, a method for transmit- When a given application program device driver ting a message from the network to a process makes a request to the device driver interface its resident in a system memory, comprising the sets the BX register to the address offset of the steps of: CCB3 to be executed, the ES register to the ad- transmitting a message in a third format dress selector of the CCB3 to be executed and 30 from a logical link protocol driver resident in pushes an indication code as 0 on to the stack. the memory to a physical device driver resi- Referring to FIG. 8B, the first four fields in the dent in the memory; CCB3 command control block are similar to those converting the message in the third format for a CCB1 command control block. The fifth field, to a second format; CCB POINTER, is used by the queue pointer and 35 transmitting the message in the second LAN adapter device drivers. The sixth field is used format to a virtual device driver resident in the to store the offset of the user APPENDAGE for a memory; given application programs device driver. The sev- converting the message in the second for- enth field CCB PARM OFFSET points to addi- mat to a first format; and, tional parameter commands specific parameters. 40 in response to the determination that the The eighth field contains another 2-bytes of param- process has sufficient memory allocated, trans- eter data. The CCB_RESOURCE_ID field is used mitting the message in the first format to the when more than one OS/2 application is running process. and used to clear the resources associated with an application when it terminates. The 45 3. The method as described in claim 1 or 2 CCB_APPL_ID field contains the ID of the ap- wherein the virtual device driver controls a first plication program which issued the CCB3 com- and a second buffer within the memory, the mand. The CCB_APPL_KEY field contains a key first buffer contains messages in the first for- code to provide resource security for application mat and the second buffer contains messages programs. The last field, the CCB Parameter2 50 in the second format. contains two bytes of parameter data which is usually the system key parameter. 4. A computer system attachable to a computer Service access points (SAP) provided means network having a plurality of nodes with one or of communication with devices connected to the more computer systems associated with a network. A given application program open several 55 node, the computer system including means SAPs for an adapter and each SAP can have for transmitting a message from a process several link stations opened. resident in a memory to the network compris- ing:

10 17 EP 0 588 046 A1 18

a virtual device driver means for capturing a message in a first format, the virtual device driver resident in the memory; means for converting the message in the first format to a second format; 5 means for transmitting the message in a second format; a physical device driver means resident in the system memory for receiving the message in the second format and for converting the 10 message in the second format to a third for- mat; and, means for transmitting the message in the third format to a logical link control protocol driver resident in the memory to be transmitted is to the network.

5. A computer system attachable to a computer network having a plurality of nodes with one or more computer systems associated with a 20 node, the computer system including means for transmitting a message from the network to a process resident in a memory comprising: means for transmitting a message in a third format from a logical link protocol driver 25 resident in the memory; a physical device driver resident in the memory for converting the message in the third format to a second format; means for transmitting the message in the 30 second format; a virtual device driver resident in the mem- ory for converting the message in the second format to a first format; and, means responsive to the determination 35 that the process has sufficient memory allo- cated, transmitting the message in the first format to the process.

6. The system as claimed in claim 4 or 5 wherein 40 the virtual device driver controls a first and a second buffer within the memory, the first buff- er contains messages in the first format and the second buffer contains messages in the second format. 45

50

55

11

EP 0 588 046 A1

13 EP 0 588 046 A1

116 MVDM PROTECTED MODE

TCP/IP V86 NOMAD VDM L&S-TO MODE 016 = 7

WIN WIN APPLS APPLS APPLS

802.2 DOS WIN LAN WIN 3.3 OS/2 APPLS APPLS 3.X 4.0 5.0 VDM VDM VMBOOT VMBOOT VMBOOT VDM 16-BIT, 32-BIT LAN 1™ 118 120 122 124 APIS . H± APIS 126 RING 3 RING0 802.2 MT5CH PDD ie; 802.2 132 BIT- VDD 32 130 BIT 802.2

134 136 NDIS

m ENET 3CNET DTHER

138 VDD/PDD INSTALL - DEV = IN CONFIG. SYS VDD/PDD CONFIG - DOS PROGRAM VIA BASE OPERATING SYSTEM AUTOEXEC.BAT 100 FILE MVDM DIS- MAN MAN PATCH FIG. 3 104 1 02 106

4 EP 0 588 046 A1

c blART

1 1 152 INITIALIZE DATA ; STRUCTURES p

lit I NEXT INPUT PARAMETER "

0

162 3ET REQUESTED VALUE FOR PARAMETER 166 I

SET DEFAULT St I NtXI VALUE ADAPTER FOR VALUE PARA- (NEXT METER COLUMN)

SET REQUESTED VALUE VALUES FOR PARAMETER FROM 3REVI0US ^1 68 ADAPTER

1 78 3ET INVALID ARGUMENT FLAG TRUE' Ly FIG. 4A EP 0 588 046 A1

ISSUE CONTROL BLOCK TO INTSC FIG. 4B HANDLER

JrlbUK WITHIN VIRTUAL DEVICE DRIVER FOR CONFIGURATION CONTROL BLOCK.

,9q COPY 5X16 MATRIX FIG. 4C INTO INSTANCE DATA FOR THIS VDM SPACE

6 EP 0 588 046 A1

UUNIHULHLUCK OFFSET FIELD DESCRIPTION FIELD VALUE

0 COMMAND CODE X'FA'

1 ERROR FLAG 00 OR 01

2 SEND NO ACK SUPPORT 00 OR 01

3 FILLER 00

4 5X16 MATRIX DEFAULTS INITIALLY

U 1 ^ 3 4 5 6 7 8 9 10 11 12 13 14 15

6666666666666666

12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12

255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255

oooooooooooooooo

oooooooooooooooo

3 - SESSIONS Z - COMMANDS Y - NAMES \-SEND NO. ACK SUPPORT ) - DIRECT STATION SUPPORT

=IG. 5

7 fcP U bob U46 Al

200 c INI5U

202 LANVDM INT5C HANDLES

218 J aSS P °IR^PPEN- ->» TRANSMIT RECEIVE . — J 1 1 1 1 1 -r— 1 ,

222 ISSUE CCB ISSUE CCB j J SYNCHRONOUS ASYNCHRONOUS - ISSUE ISSUE

I »r« r 224 -ANPDD PROC 802

226 .ANPDD IDC ENTRY POINT

=IG. 6

a EP 0 588 046 A1

THIS IS THE SEQUENCE WHEN 172 THE MVDM CALLS C THE VDD WHEN A CONTEXT HOOK PROCESS -IRES BRINGING IN EXCEPTION A DOS CONTEXT.

ARM STI / *„ HOOK \ FIG. 7A

9 fcH U SBB U4b Al

SWITCH TO IT REAL MODE

i 1. SAVECRE 2. PUSH FLAGS 3. DISABLE DOS 4. COMPCCB2

1. CALL DOS 290 2. ARM RETURN H U 3. ARM TIMER y

i 1. CALLCCBICOMP. ROUTINE 2. ARM RETURN H 3. FREE CCB 3 4. SET TIMER

-<

1 . s S

:IG. 7B

u EP 0 588 046 A1

3,0, ENABLE DOS INTERRUPTS

Ji^ 314 ^312 toIprot^ ^^modTS, TM0RDET

|N0

\ » 4 1

©

CALL CCB APPEND

21 fcH U boo U4b Al

EMULATE LOCAL BUSY

latl uut> rREE OS/2 SAP BUFFER SAP BUFFERS

0£O I VI I. L-UIMvcHI AUUHtSS 0« /ALL CCB APPEND \ 2. COPY DATA

YES FIG. 7D

30 V_ FREE OS/2 BUFFERS

>0£ I >TI HOOK 3 El* U OOO U4D A I

1

(ccb append) I

CONVERT TO A 7 WORD BY TYPE p

FREE ELEMENT

CALL CCB APPEND

\I-IIV1 fcVfcN I STI

:IG. 7E

3 EP 0 588 046 A1

SWITCH TO vr V86 MODE

1. SAVE CRF 2. PUSH FLAGS 3. DISABLE DOS 4. SET UP CRF

1. PUSH DOS APPENDAGE 2. ARM RETURN HOOK 3. FREE OS/2 EVENT ELEMENT

FIG. 7F

24 i -- CD , -n £ o y g B Q

O CD -1—

g S "g 5 §

^ Q- Q. Q- o § CO 4z > v_ CD CD CD CD O ■+=: * 1- = 3 ~ > Co

■2 OUcdoQ-ooo^ CQ - " p o c « o

£= DC m^a3^Q-n3a)£ § -I Q W & E E §"0 E 5i < UJ-ooo-d^ooj^ oo T3 Q<00I Q Q Q Q Q Q i o °° ^ O 5 i- LU _, £= m i — z o £J ^.lilT-T-T-T-^Tt^-^ 1 o co — j|

O

<<^r-n-9cc CD ^

fck CM -g O CO 21

25 i s CO" CO

i 1 .1

^ C= O CD O CD O g -O r£ CD -C -g .O p > CZ «|SE g; 2 E E 8 2 2 O CO S" a-Q c D) 03 v_ JJ? Bs—^oiS^CLo o o *g

CO ^ o == Cd CD 0= ^ O W U

— O o8^cDm™m^0™Q^cDj-t: m ^o^cB-cOoOOQo— o-^^^ O Q-O^.Q(y3 0^X3°CDCD-00-DOCD-Q £= 5^CDc CDCD >'*^^;^>cC>cCr2':^

■o Q

■ qj uj : = 0>I QQQQQQQQQQQQQQQHoot O O °°H- co CO UJ _ c= QQ 1— Z O £j ^LU t-t-t-t-\T(M(M(MCM(MCMt-t-(MCM -i= 1 o CO — ^ ■ *CD 1— "O LU _^ CO |— t- q CM O Ll_ LU 1 — . I O L±r co cc i or s Q O U_ LJJ LLJ LU

2Q-|p^z ^ < O _j' _j'< 8 zQOujOocL^< ^ < o a: ^ □_ < ^oZaicr 9? < < 2: o -JcQcommmoQ g> m m m $ m m m ™ tyOOOOOOcDOOOcDO O O £ U.OOOOOOVOOOVO OOjE

H~ \T, CM CD CD -r— CM ^ 3

26 EUROPEAN SEARCH REPORT Application Number EP 93 11 2622

DOCUMENTS CONSIDERED TO BE RELEVANT Category Citation of document with indication, where appropriate, Relevant CLASSIFICATION OF THE of relevant passages to claim APPLICATION (Int.CI.5) US-A-4 701 848 (CLYDE INC.) 1,2,4,5 G06F13/38 * column 2, line 25 - line 54; claims; G06F9/44 figures *

EP-A-0 186 007 (WANG) 1,2,4,5 * page 2, paragraph 2 - page 3, paragraph 2; figure 2 *

P,A EP-A-0 543 610 (IBM) 1,2,4,5 * the whole document *

TECHNICAL FIELDS SEARCHED (Int.CI.5) G06F

The present search report has been drawn up for all claims Place of tearck Date of cowpletloa of the learch Exatfaer THE HAGUE 25 November 1993 Gill, S LAItbUKI Ut CMKD DOCUMENTS T : theory or principle underlying the invention E : earlier patent document, but published on, or X : particularly relevant if taken alone after the filing date Y : particularly relevant if combined with another D : document cited in the application document of the same category L : document cited for other reasons A : technological background O : non-written disclosure & : member of the same patent family, corresponding P : intermediate document document