dlaygo Sample Program


dlaygo is a sample LayGO program designed to illustrate basic programming practices using the LayGO API. It can be compiled as a 32-bit console mode program for Windows or as a command line program for Solaris or Linux.

Based on the command-line argument shown, the program constructs one of the following devices:

-p : X.21 bis only
-b : X.21 bis and HDLC LAPB
-x : X.21 bis, HDLC LAPB, and X.25
-f : X.21 bis and Frame Relay

It then establishes a connection on this device. If the device is X.25 or Frame Relay, it then opens a PVC, establishes a connection and sends and receives numbered data packets on the PVC. Otherwise, packets are sent and received directly on the major device. All devices are then disconnected, disassembled and closed.

dlaygo is the program referred to in the LayGO API Manual.

Command-line Arguments

Either -? or -h as the first command-line argument prints a usage message.

-b, -f, -p or -x as the first command-line argument sets the device configuration for the session.

Any additional arguments are taken to be the names of stack configuration files.


dlaygo hardware.cfg x21src.cfg

dlaygo will configure the stack using the configuration files hardware.cfg and x21src.cfg. Configuration files are loaded in the order given on the command-line. In case of multiple files with conflicting configurations, configurations in files listed later on the command-line override those from files listed previously.

Source Code

C Source Code dlaygo.c
Linux Makefile makefile
Solaris Makefile makefile
Windows Makefile makefile