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

x25_term Subroutine


Terminates the X.25 API for a specified X.25 port.


X.25 Communications Library (libx25s.a)

C Syntax

int x25_term(link_name)
struct cb_link_name_struct *link_name;


The x25_term subroutine terminates communication with the X.25 device driver to stop X.25 communications with the X.25 port named by the link_name subroutine. If this is the last X.25 port open for this process, X.25 resources are freed.

The x25_term subroutine clears any virtual circuits still being used by the application. However, it is recommended that you clear virtual circuits in an orderly manner before invoking the x25_term subroutine.


link_name Contains the pointer to the cb_link_name_struct structure, which gives the name of the X.25 port.

Return Values

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




The example program svcxmit illustrates code statements that terminates an API.

Implementation Specifics

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

Related Information

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