X.25 Communications Library (libx25s.a)
int x25_call_clear (conn_id, cb_clear, cb_msg) int conn_id; struct cb_clear_struct *cb_clear; struct cb_msg_struct *cb_msg;
The x25_call_clear subroutine clears a call by generating and sending a clear request packet. Control is not returned to the application until a clear confirmation or a clear indication packet has been received.
A call is cleared by disconnecting a connected call or rejecting a call that has not been accepted.
conn_id | Specifies the Connection identifier of the call. |
cb_clear | Indicates the pointer to the clear structure, cb_clear_struct. |
cb_msg | Indicates the pointer to the message structure, cb_msg_struct. This structure is used to return information from the clear confirmation packet. The application must interpret the appropriate structure to access the message. This structure is allocated by the API. (It is the responsibility of the application to free this memory). If the cb_msg value is set to a null value, no clear confirmation information is returned. |
If successful, the x25_call_clear subroutine returns a value of 0. If an error occurs, the x25_call_clear subroutine returns a value of -1 and sets the x25_errno global variable to one of the error codes shown below.
On failure, the x25_errno global variable is set to one of the following values:
If the x25_errno global variable is set to the X25SYSERR value, the errno global variable is set to one of the following values:
Terminate (clear) a call: example program svcxmit.
This subroutine is part of X.25 Application in Base Operating System (BOS) Extensions 2.
The x25_call subroutine, x25_call_accept subroutine.
Processing Calls with the X.25 API, Using the X.25 Structures and Flags in AIX Version 4.3 Communications Programming Concepts.