HP X.25/9000 Programmer's Guide

Chapter 5 81
Receiving and Transmitting Out-of-band Information
Transmitting Out-of-band Events
* u_char x25_cud_data[X25_MAX_CU_LEN];
* }
*/
int err;
int sd;
struct x25_userdata udata;
err = ioctl(sd, X25_WR_USER_DATA, &udata);
sd Socket descriptor for an VC socket.
X25_WR_USER_D
ATA
Definition for the request.
udata Contains the length and the data for the user data field (
x25_cud_data
).
The maximum length is 126 bytes. If you want to send more than this,
the ioctl() call must be called again. Usually the maximum length of
the call user data field is 16 bytes. If the fast select facility is specified,
the maximum length of the call user data field is 128 bytes.
err On successful completion,
err
is set to 0. Otherwise, a value of –1 is
returned and
errno
is set to indicate the error.
CAUTION Avoid using 0xCC in the first byte of the call user data field. If this is not
possible, the interface must not be used for X.25/IP. If the first byte of an
incoming call’s call user data field contains 0xCC and it arrives over an
X.25 interface which has been assigned an IP address (see the x25init
command in your X.25/9000 User’s Guide), then the X.25 subsystem will
assume the call is meant for the X.25/IP interface and not the
programmatic access interface.
The ioctl(X25_RD_USER_DATA) Call
The ioctl(X25_RD_USER_DATA) call can read any data in the clear user
data field of a CLEAR INDICATION packet or the call user data field of
an incoming CALL INDICATION or CALL CONNECTED packet. This
call is best used with the ioctl(X25_NEXT_MSG_STAT) call. The
ioctl(X25_NEXT_MSG_STAT) call can determine whether call user data
is available in the next message, whether clear user data is available, or
both clear and call user data are available.
If both call user data and clear user data are available, first issue an
36960-90061.bk Page 81 Friday, November 10, 2000 3:42 PM