HP X.25/9000 Programmer's Guide

Chapter 3 45
Establishing and Terminating a Socket Connection
Using Permanent Virtual Circuits
Using Permanent Virtual Circuits
Permanent virtual circuits (PVCs) are provided by a network provider
and are set up during X.25 configuration. Refer to your X.25/9000 User’s
Guide for details on configuring PVCs.
A PVC is similar to a “leased line” in that it is always connected and
terminates at a single destination. By contrast, an SVC can terminate at
different destinations, depending on the call. A PVC can be used by only
one socket at a time.
Although a PVC can be RESET, so that all data on the connection is
discarded, it cannot be cleared like an SVC. A PVC is connected as long
as X.25 level 3 is active.
A socket is bound to a PVC with the ioctl(X25_SETUP_PVC) call. Unlike
setting up an SVC, the listen(), connect(), and accept() system calls
are not used to establish a connection over a PVC. The close() call
removes the binding between a socket and the circuit of a PVC, and also
sends a RESET REQUEST packet out on the circuit. Data is cleared
from the circuit, but the circuit is not destroyed.
The ioctl() calls associated with sending and receiving CALL
REQUEST and CALL ACCEPTED packets and the fields within them,
such as ioctl(X25_RD_USER_DATA), ioctl(X25_WR_USER_DATA),
ioctl(X25_WR_FACILITIES), and ioctl(X25_RD_FACILITIES)have no
effect on a PVC.
Preparing a PVC for Use
A PVC is connected from the moment the programmatic access interface
is active. However, until a socket is bound to the PVC, X.25 discards all
packets received over the PVC and a RESET REQUEST packet is sent.
There is no implicit client/server relationship in establishing a PVC
connection. Actions taken on either end of a PVC are essentially the
same.
The ioctl(X25_SETUP_PVC) call binds a socket to a PVC. The
application first creates the socket, then calls ioctl(X25_SETUP_PVC).
The logical channel identifier (lci) of the PVC (which you can get from
your system administrator) must be known before the
ioctl(X25_SETUP_PVC) is issued.
36960-90061.bk Page 45 Friday, November 10, 2000 3:42 PM