PVCs can be used for machines that are either connected back to back or via a switch. In the latter case, the cell forwarding has to be manually set up at the switch.
aread/awrite and br/bw are simple programs to access the ATM API. awrite sends the text string passed as its second argument in an AAL5 PDU. aread receives one AAL5 PDU and displays it in hex. Both programs also display the return values of the corresponding system calls and the current values of errno.
bw either sends its standard input or a stream of blocks containing arbitrary data (if a number is passed as its fourth argument) in 8 kB AAL5 PDUs. br receives AAL5 PDUs and writes them to standard output.
The first argument of aread, awrite, br and bw is always the PVC address, i.e. the ATM interface number, the VPI and the VCI number, with a dot between elements. The interface number can be omitted if it is zero. Example:
Note that some adapters only support VPI == 0. Also, the VCI range may be limited, e.g 0 to 1023. The interface number can be obtained from the initialization message the driver printed during startup. atm0 is interface 0, atm1 is interface 1, etc. If the system is equipped with a real ATM adapter (e.g. not only atmtcp), that adapter is normally at atm0.
aping receives and sends small AAL5 PDUs on a PVC. It expects that messages it sends are either echoed back or that a similar program on the other side generates a stream of messages. aping reports an error if no messages are received for too long. aping is invoked by specifying the PVC, like aread.
For "real" tests, you should use the modified version of ttcp that comes with this package. The original is available at ftp://ftp.sgi.com/sgi/src/ttcp/. The following options have been added:
use native ATM instead of UDP/TCP. The address must be in the format [itf.]vpi.vci for PVCs, or a valid ATM end system address for SVCs.
use a CBR connection with a peak cell rate of num cells per second. Default is to use UBR.
disable (UDP) checksums
On adapters where the device driver supports access to raw cells (``AAL0''), individual cells can be composed and received with the atmdump program. Here is an example: