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

x25_call_clear Subroutine

Purpose

Clears a call.

Library

X.25 Communications Library (libx25s.a)

C Syntax

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;

Description

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.

Parameters

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.

Return Values

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.

Error Codes

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

X25BADCONNID

X25CALLED

X25CALLING

X25LONG

X25NOCARD

X25NOLINK

X25NOTINIT

X25PROTOCOL

X25SYSERR

X25RESETCLEAR

X25TRUNCTX

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

EINTR

EIO

ENOSPC

Examples

Terminate (clear) a call: example program svcxmit.

Implementation Specifics

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

Related Information

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.


[ Previous | Next | Contents | Search ]