LayGO is a toolkit for building data communications applications. The toolkit contains stackable protocol blocks and interfaces to different communication hardware and operating systems. LayGO's implementation of dynamically configurable protocol stacks allows an application to run devices assembled from different protocols simultaneously.

A LayGO device is a stack of LayGO protocol blocks terminated by an interface to a physical line (see Figure 2.1). Each block represents an instance of a protocol layer. For instance, an X.25 device is created by stacking X.25 packet layer, LAPB link layer and X.21 bis physical layer protocol blocks. The X.21 bis layer manages the interface to a synchronous communication line controlled by a device driver.

LayGO Protocol Stack
Figure 2-1 LayGO Stack with X.25 Communication Device

Through the services provided by LayGO devices, applications can establish connections through different protocol stacks. Each connection can operate in DTE, DCE or Loopback mode. A hardware emulation driver is also provided which allows application testing without any communication hardware installed.

The protocol stack with all its supported layers is called the LayGO Protocol Stack. The stack is internally controlled by the LayGO Stack Executive (LSX). The LSX provides stack services such as scheduling, timers, buffer queue management, stacking and unstacking of blocks, and directory services for the opening and attaching of devices. The stack has three interfaces:

The LSX uses the services of the host operating system to provide services to the protocol stack. For example, to provide timers, the LSX accesses timer functions provided by the host OS. Most of the HOSI functions are handled by standard C-library functions for the host OS. The stack can either be activated by the application or by the host OS scheduler, which, in its most primitive form, could be just an interrupt service routine which hooks the PC's timer interrupt.

The lowest layer of the stack, the physical layer, accesses the hardware via the HWI. The communication hardware is controlled by the LayGO Communications Controller Driver (CCD). Interrupts created by the communication hardware are handled by the CCD's interrupt service routine (ISRs). The CCD can also be activated from the physical layer. To encapsulate the hardware from the stack, all CCDs are HWI compatible.

The LayGO API is implemented as if it were a protocol layer. It uses the same block structure and may request LSX services. Unlike protocol layers, the API is only activated by function calls from the application. The API encapsulates the stack from the application. The application uses a standard set of API functions (open, close, connect, disconnect, read, write). The API functions are common to all protocols and are not affected by the host operating system or communication hardware.