[ Previous | Next | Contents | Search ]
AIXLink/X.25 1.1 for AIX: Guide and Reference

x25_interrupt Subroutine

Purpose

Sends an interrupt packet.

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_interrupt(conn_id, cb_int)
int conn_id:
struct cb_int_data_struct *cb_int;

Description

The x25_interrupt subroutine sends an interrupt message. Control is returned to the application when the message has been received by the adapter.

Parameters

conn_id Contains the connection identifier of the call.
cb_int Contains a pointer to the cb_int_data_struct structure, which contains the interrupt data.

Return Values

If successful, the x25_interrupt subroutine returns a value of 0. If an error occurs, the x25_interrupt subroutine returns a value of -1 and sets the x25_errno global variable to one of the error codes shown below.

Error Codes

On failure, the x25_errno global variable is set to one of the following:

X25BADCONNID

X25NOCARD

X25NOLINK

X25NOTINIT

X25PROTOCOL

X25RESETCLEAR

X25SYSERR

X25TRUNCTX

If the x25_errno global variable is set to a X25SYSERR value, the errno global variable is set to one of the following values:

EINTR

EIO

ENOSPC

Examples

The following code statement ends an interrupt:

struct cb_int_struct int_data;
int_data.flags = X25FLG_INT_DATA;
int_data.data_len = 20;
int_data.int_data = "This is an interrupt";
rc = x25_interrupt(conn_id,&int_data);
if (rc < 0)
  (void)printf("Error %d from x25_interrupt.",x25_errno);

Implementation Specifics

This subroutine is part of X.25 Application in Base Operating System (BOS) Extensions 2.

Related Information

Processing Calls with the X.25 API , Using the X.25 Structures and Flags ,

in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Search ]