HP X.25/9000 Programmer's Guide

Chapter 4 57
Sending and Receiving Data
Data Transmission Requirements
packets. X.25 applications can control the use of these bits with
ioctl(X25_SEND_TYPE).
Syntax for ioctl(X25_SEND_TYPE)
The syntax for the ioctl(X25_SEND_TYPE) system call and its
parameters are described below. Refer also to the socket_x25(7) entry
in your HP-UX man pages for more information on
ioctl(X25_SEND_TYPE).
#include <x25/x25ioctls.h>
#include <x25/x25.h>
int err;
int sd, type;
err = ioctl(sd, X25_SEND_TYPE, &type);
sd Socket descriptor for a VC socket. The socket need not be connected to a
VC when the ioctl() is issued.
X25_SEND_TYPE Indicates the type of ioctl() being performed.
type Indicates which bits are being set with this ioctl(). HP supplies three
predefined values you can use to indicate the position of these bits within
type
:
X25_MDTF_BIT
,
X25_Q_BIT
, and
X25_D_BIT
. These values
represent the bits’ positions and not their actual placement (that is, they
must be used in a shift operation).
For example, the following expression returns an integer with the D bit
set: 1 << X25_D_BIT. The MDTF, D, and Q bits can be set in the same
message, but the use of the M and D bits in the same packet are subject
to CCITT specifications. Typically, the D bit is not set in the same packet
as the M bit.
Once an MDTF, D, or Q bit has been turned on with
ioctl(X25_SEND_TYPE), it remains on until it is explicitly turned off
with a subsequent call.
36960-90061.bk Page 57 Friday, November 10, 2000 3:42 PM