An interrupt packet may be sent in the following manner. The interrupt user data is contained in intr:
int s; char intr = 0; /* set this variable to contain the interrupt * user data (in this case 0) */ error = send(s, &intr, 1, MSG_OOB);
If the link supports 1984 X.25, you may send up to 32 bytes of interrupt data. On 1980 links, you may send only one byte.
A reset packet may be sent in the following manner:
X25_CAUSE_DIAG diag; int error, s; diag.flags = 0; diag.datalen = 2; diag.data[0] = 0; /* cause */ diag.data[1] = 67; /* diagnostic */ error = ioctl(s, X25_WR_CAUSE_DIAG, &diag);
This will cause a Reset to be sent with the cause code and diagnostic specified by the user. See "12.7.8 Accessing the Diagnostic Code" of this chapter for more information.