LayGO for Solaris is currently available for the SPARC and SPARCV9 platforms.
The LayGO distribution files are shipped in Solaris package format (tar'd and gzip'd). Copy the package file to a temporary directory, unzip and untar it, then become root and run the package installation utility for package laygosdk. For instance, to install the laygosdk package from laygosdk-3.10.pkg.tar.gz located in /tmp, enter:
# cd /tmp # gunzip laygosdk-3.10.pkg.tar.gz # tar xf laygosdk-3.10.pkg.tar # pkgadd -d . laygosdk
The package installation script will ask you where the package should be installed (the default is /opt). Press enter to accept the default or enter the name of an alternate directory. The package will be installed into /<directory>/laygo-3.10. As part of the installation, a symbolic link will be created from /usr/laygo to the installation directory.
To remove the package, enter:
# pkgrm laygosdk
The LayGO documentation files are also shipped in Solaris package format in laygodoc-3.10.pkg.tar.gz. Follow the steps shown above and install package laygodoc.
laygosolx is a dynamically loaded Solaris device driver which provides LayGO communication services to Solaris applications. (The x in laygosolx is replaced by a single hexadecimal digit 0-f depending on the type of hardware the driver uses.) laygosolx is accessed exclusively through the shared object liblaygosol.so.
To install laygosolx, become root and run the laygosolx.sh installation script located in the LayGO drv/solaris directory (or drv/solarisv9 for Solaris 8):
Use of laygosolx requires that the proper communication board be installed. A second device driver called laygosol6 is also provided. laygosol6 is a hardware emulation driver implemented as a pseudo device. When used in place of laygosolx, laygosol6 emulates a communication board in software. When laygosol6 is configured for internal loopback mode, data written on a line is looped back on the same line. Otherwise, lines 0 and 1 are connected so that signals and data output on one line are received on the other. Since laygosol6 emulates the communication hardware in software, it can be used without any communication board installed.
To install laygosol6, become root and run the laygosol6.sh installation script located in the LayGO drv/solaris directory.
Both the emulation driver and the actual hardware driver can be installed at the same time.
The LayGO drv/solaris directory contains 2 .conf files which can be used to configure the drivers.
These files can be edited with any text editor, but the values do not normally need to be changed. They are copied to a system directory by the driver installation script.
In order for the stack to locate the correct driver(s) during stack initialization, a system stack configuration is required. The file stackx.cfg contains a system stack configuration for the laygosolx driver. Applications should load this file by calling lgo_ConfigureStack() prior to initializing the stack. If no system stack configuration is loaded, the emulation driver is loaded by default.
The LayGO protocol stack accesses the laygosolx driver through symbolic links located in the /dev directory. During driver installation, a default link called /dev/laygosolx is created. If the system stack configuration contains a hardware driver id of 15 (0xF in hex), the stack will attempt to open /dev/laygosolf. There is no need to change this if the driver is accessing only a single board. However in multiboard configurations, the driver must be opened once for each board. To do this, additional symbolic links to the driver and corresponding entries in the system stack configuration are required.
For instance, to run 2 boards using laygosolf, you might do the following:
# cd /dev # ls -l laygosolf lrwxrwxrwx 1 root other 49 Jun 25 10:53 laygosolf -> ../devices/pci@1f,0/pci@1/pci10df,1156@0:laygosolf # find ../devices -name "pci10df,1156*" ../devices/pci@1f,0/pci@1/pci10df,1156@0:laygosolf ../devices/pci@1f,0/pci@1/pci10df,1156@2:laygosolf # ln -s ../devices/pci@1f,0/pci@1/pci10df,1156@2:laygosolf laygosolc
This creates a second symbolic link called /dev/laygosolc which is a reference to the same driver as /dev/laygosolf, but through the second board's device. Now you can use edcfg to edit the system stack configuration in stackf.cfg. Change the number of hardware drivers from 1 to 2. Leave hardware driver 0 as 15 (0xF in hex) and set hardware driver 1 to 12 (0xC in hex). The stack will now open the driver twice, once under each alias.
Note: Some machines may have multiple PCI buses, so the device entry for the second card may not appear in the same subdirectory in the /devices directory as the entry for the first card. Use the find command as shown above to make sure you locate all of the device entries.
All LayGO API functions are exported by 2 shared objects:
liblaygosol.so is accessed internally by these objects.
liblaygosolx.so contains the X.25 call setup data encoding and decoding functions from call.h, and the X.25 diagnostic and cause code conversion functions from diag.h.
liblaygosold.so contains the device library functions from device.h.
C Language prototypes for all functions are found in the .h files in the LayGO inc directory.
The shared objects are located in the LayGO lib directory. You may want to add /usr/laygo/lib/solaris to your LD_LIBRARY_PATH environment variable.