HP X.25/9000 Programmer's Guide
38 Chapter3
Establishing and Terminating a Socket Connection
Controlling Call Acceptance
The ioctl(X25_CALL_ACPT_APPROVAL) call is used to instruct X.25 not
to send the CALL ACCEPTED packet when the user does an accept().
For a listen socket, the ioctl(X25_CALL_ACPT_APPROVAL) call should be
implemented before the listen() call. The accept() call still returns a
socket descriptor connected to the incoming SVC but no packets are sent.
When the ioctl(X25_SEND_CALL_ACEPT) call is issued on an SVC
socket, it causes a CALL ACCEPTED packet to be transmitted. The two
ioctl() call acceptance calls are described below.
The ioctl (X25_CALL_ACPT_APPROVAL) Call
The ioctl(X25_CALL_ACPT_APPROVAL) call lets applications screen
incoming calls. When the call is issued for a given listen() socket, a
new accept() socket is still created whenever a valid call comes in, but
no data can be sent or received on the new socket until an
ioctl(X25_SEND_CALL_ACEPT) call is issued on the new socket. This
feature must be set if:
• the process is going to control use of the D bit,
• facilities are specified,
• or there is user data in the CALL ACCEPTED packet.
If the application does not want to accept the call, the circuit can be
cleared with a close() call. The ioctl(X25_SEND_CALL_ACEPT) call is
described below.
Once the ioctl(X25_CALL_ACPT_APPROVAL) is enabled, it cannot be
turned off unless the listen socket is closed and the socket(), bind(),
and listen() calls are repeated.
Syntax for ioctl(X25_CALL_ACPT_APPROVAL)
The ioctl(X25_CALL_ACPT_APPROVAL) call and its parameters are
described below.
#include <x25/x25ioctls.h>
int err;
11. No event CALL
CONNECTED
packet received
connect()
unblocks
Table 3-1 Controlling Call Acceptance When Establishing an SVC
36960-90061.bk Page 38 Friday, November 10, 2000 3:42 PM










