HP X.25/9000 Programmer's Guide

134 AppendixB
Program Examples
Example Programs
Example Programs
Several pairs of example programs are shipped with the X.25 product.
These programs can be found in the /var/x2r/netdemo directory.
Table B-1
Program name Purpose
client.c
/server.c
Send/receive one message of data, no
out-of-band signal handling. For Switched
Virtual Circuits only.
client2.c
/server2.c
Send/receive one message of data then
send/receive one Interrupt packet with
out-of-band signal handling. For Switched
Virtual Circuits only.
clientpvc.c
/serverpvc.c
Send/receive one message of data,
send/receive one interrupt packet, then send a
reset packet with out-of-band signal handling.
For Permanent Virtual Circuits only.
client2pvc.c
/server2pvc.c
Identical to clientpvc.c and
serverpvc.c except that there is a long
loop on sending and receiving data messages.
This difference allows the testing of the
out-of-band level 2 Down event. For
Permanent Virtual Circuits only.
infoserv_client.c
/infoserv.c
Similar to the programs above except that the
server “forks” the listener’s process before
receiving the incoming calls allowing for
faster processing at connection time. Several
parameters are configurable: number of
messages, message size, number of processes
to fork, interface name, X.121, and the
number of loops.
36960-90061.bk Page 134 Friday, November 10, 2000 3:42 PM