HP X.25/9000 Programmer's Guide

Chapter 5 79
Receiving and Transmitting Out-of-band Information
Transmitting Out-of-band Events
settings.
The ioctl(X25_WR_CAUSE_DIAG) call must be issued prior to a RESET
or CLEAR packet in order to set cause and diagnostic codes.
NOTE When using this call over a PDN (Public Data Network), avoid using the
same cause codes as those already used by the network. This makes
troubleshooting events easier by removing any ambiguity about the
originator of RESET packets.
Syntax for ioctl(X25_WR_CAUSE_DIAG)
The ioctl(X25_WR_CAUSE_DIAG) call and its parameters are described
below.
#include <x25/x25ioctls.h>
#include <x25/x25str.h>
/* struct x25_cause_diag {
* u_char x25_cd_loc_rem; (unused, for compatibility only)
* u_char x25_cd_cause;
* u_char x25_cd_diag;
* }
*/
int err;
int sd;
struct x25_cause_diag diag;
err = ioctl(sd, X25_WR_CAUSE_DIAG, &diag);
sd Socket descriptor for an VC socket.
X25_WR_CAUSE
_DIAG
Definition for the request.
Table 5-2 Setting Cause Codes
Network Type Cause Specified Cause Sent
DTE 84 any as specified
DCE (1980 or 1984) any as specified
DTE 80 any 0
36960-90061.bk Page 79 Friday, November 10, 2000 3:42 PM