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

x25_reset Subroutine

Purpose

Resynchronizes communications on a virtual circuit.

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_reset(conn_id, cb_res)
int conn_id;
struct cb_res_struct *cb_res;

Description

The x25_reset subroutine sends a reset-indication packet to reset the virtual circuit using the specified connection identifier.

If the application is sending data at the time this subroutine is called, the data is flushed from the system, and the x25_send subroutine returns an appropriate error code. Incoming data not already passed to the application will be flushed. Because resets can cause data to be lost, it is the responsibility of the application to provide higher-level protocol for data protection.

Parameters

conn_id Contains the connection identifier of the call.
cb_res Specifies a pointer to the cb_res_struct structure, which is used to pass the reset cause and diagnostic codes.

Return Values

If successful, the x25_reset subroutine returns a value of 0. If an error occurs, the x25_reset 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 value:

X25BADCONNID

X25NOCARD

X25NOLINK

X25NOTINIT

X25PROTOCOL

X25RESETCLEAR

X25SYSERR

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

See the example program pvcxmit for a code sample that resets a call.

Implementation Specifics

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

Related Information

The x25_reset_confirm 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 ]