Solstice X.25 9.2 Developer's Guide

12.7.4 Permanent Virtual Circuits

Since permanent virtual circuits are always in data transfer state, there is no need to issue a connect on the calling side, or bind, listen, and accept on the called side. Instead, use an ioctl call to bind the socket to a logical channel number and to specify other parameters.

typedef struct pvc_db_s {
 u_short lcn; /* lcn of PVC */
 u_short sendpktsize; /* Maximum packet size */
 u_short recvpktsize; /* Maximum packet size */
 u_char sendwndsize;  /* Output flow control window */
 u_char recvwndsize;  /* Input flow control window */
 } X25_PVC_DB;
 X25_PVC_DB pvc_parms;
 int pvc_so;
 pvc_so = socket(AF_X25, SOCK_STREAM, 0);
 error = ioctl(pvc_so, X25_SETUP_PVC, &pvc_parms); 

In the current release, the sendpktsize, recvpktsize, sendwndsize, and recvwndsize parameters are ignored. The default value in the link configuration file is always used. By default, the lowest numbered WAN link is used for the permanent virtual circuit. If you desire some other link for the permanent virtual circuit, you must select the desired link using the X25_SET_LINK ioctl as described earlier, after the socket call, but before the X25_SETUP_PVC ioctl. Permanent virtual circuits are not supported over LAN interfaces.