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

x25_init Subroutine

Purpose

Initializes the X.25 application programming interface (API).

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_init(link_name)
struct cb_link_name_struct *link_name;

Description

The x25_init subroutine establishes communications with the X.25 device driver to set up X.25 communications with the X.25 port named by the link_name parameter. The application must invoke the x25_init subroutine before any other X.25 subroutines.

Note: Initializing a port does not guarantee that the port is connected (see the x25_link_query subroutine).

Parameters

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

Return Values

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

X25BADDEVICE

X25INIT

X25MAXDEVICE

X25NOSUCHLINK

X25SYSERR

Examples

Initialize the API for an X.25 port: example program svcxmit.

Implementation Specifics

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

Related Information

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