Device Source Code

Complete source code for the current implementation can be found in device.c and device.h in the LayGO etc/clib/test/device directory. In addition, a sample program based on the device library can be found in sftp.c. sftp implements a simple file transfer program. The data communications protocol used for the transfer can be configured at runtime, and may be either a major device or a virtual circuit. For more information about sftp, see sftp in the Sample Programs section of the LayGO Installation Guide

The current implementation of the device library makes a number of simplifying assumptions: that no data is required to issue a connect request, connect accept, disconnect request or disconnect confirm, and that the default configurations set by lgo_ConfigureStack() may be used for each service in the device. It also assumes that any data received with events may be discarded. Future releases of the device library may remove these limitations.