HP X.25/9000 Programmer's Guide
Chapter 4 55
Sending and Receiving Data
Data Transmission Requirements
time in the CALL REQUEST or CALL ACCEPTED packet.
Setting the D Bit in CALL REQUEST Packets
Use the ioctl(X25_SEND_TYPE) call to set the D bit in a CALL
REQUEST packet. After the D bit is set, issue the connect() call to
transmit the CALL REQUEST packet.
After the connect() call, turn the D bit off again by issuing an
ioctl(X25_SEND_TYPE) call so that the next message does not have its
D bit set. Refer to “Controlling the MDTF, D, and Q bits” below for the
syntax for ioctl(X25_SEND_TYPE)
Setting the D Bit in CALL ACCEPTED Packets
To set the D bit in CALL ACCEPTED packets:
1. First set the listen socket so that transmission of the CALL
ACCEPTED packet is controlled by the application. Use the
ioctl(X25_CALL_ACPT_APPROVAL) call.
2. When the accept() call returns, issue ioctl(X25_SEND_TYPE) on
the VC socket to set the D bit for the transmission of the CALL
ACCEPTED packet.
3. Finally, send the CALL ACCEPTED packet with the
ioctl(X25_SEND_CALL_ACEPT) call.
Turn off the D bit with the ioctl(X25_SEND_TYPE) call after the
ioctl(SEND_CALL_ACEPT) call. Otherwise, the next message you send
will have the D bit set. Refer to “Controlling the MDTF, D, and Q bits”
below for the syntax for ioctl(X25_SEND_TYPE)
Setting the D Bit in a Data Message
To use the D bit in a DATA packet, the D bit must have been set at
connection time in either the CALL REQUEST packet (on the calling
side) or the CALL ACCEPTED packet (on the called side).
Issue the ioctl(X25_SEND_TYPE) call to set the D bit immediately prior
to issuing a send() or write() call. In blocking mode, the process is
blocked until confirmation is received. If the connection has been
established to use the D bit, the application can set the D bit for any data
message being transmitted. A data message may be a single packet or a
set of packets with the M bit set on all but the last packet.
The D bit is set on every data message transmitted until it is cleared
36960-90061.bk Page 55 Friday, November 10, 2000 3:42 PM










