HP X.25/9000 Programmer's Guide
Chapter 3 39
Establishing and Terminating a Socket Connection
Controlling Call Acceptance
int sd;
err = ioctl(sd, X25_CALL_ACPT_APPROVAL, 0);
sd Socket descriptor for a listen socket that has no accept() pending on it.
X25_CALL_ACPT
_APPROVAL
Definition for the request.
0 Dummy variable (ioctl(X25_CALL_ACPT_APPROVAL) does not take any
arguments).
The ioctl (X25_SEND_CALL_ACEPT) Call
The ioctl(X25_SEND_CALL_ACEPT) call causes X.25 (level 3) to send a
CALL ACCEPTED packet. The call is executed on a socket descriptor
returned from an accept() call. The listen socket on which the
accept() call was issued must have previously had an
ioctl(X25_CALL_APPROVAL) issued on it. The
ioctl(X25_SEND_CALL_ACEPT) causes a CALL ACCEPTED packet to be
sent on the SVC.
If the application determines that the call should not be accepted, the
call can be rejected with a CLEAR packet by calling close() or
shutdown() on the socket descriptor.
The application may specify D bit usage, facilities, and call user data to
be placed in the CALL ACCEPTEDpacket. The ioctl(X25_SEND_TYPE),
ioctl(X25_WR_USER_DATA), and ioctl(X25_WR_FACILITIES) calls
control these functions. They must be issued prior to accepting the call
with ioctl(X25_SEND_CALL_ACEPT).
The ioctl(X25_SEND_TYPE) is described in Chapter 4 , “Sending and
Receiving Data,” ioctl(X25_WR_USER_DATA) is described in Chapter 5 ,
“Receiving and Transmitting Out-of-band Information,” and
ioctl(X25_WR_FACILITIES) is described in Chapter 6 , “Extended
Features.”
Syntax for ioctl(X25_SEND_CALL_ACEPT)
The ioctl(X25_SEND_CALL_ACEPT) call and its parameters are
described below.
#include <x25/x25ioctls.h>
int err;
int sd;
36960-90061.bk Page 39 Friday, November 10, 2000 3:42 PM










