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

x25_call Subroutine

Purpose

Makes an X.25 call by setting up a switched virtual circuit (SVC).

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_call(cb_call, ctr_id)
struct cb_call_struct *cb_call,
int ctr_id;

Description

The x25_call subroutine sets up a switched virtual circuit (SVC) for the X.25 port specified in cb_call_struct for an X.25 call between the calling address and called address, also specified in the cb_call_struct structure.

Control is returned to the application as soon as the call-request packet has been transmitted, but the SVC is not established until a call-connected packet is received (using the x25_receive subroutine).

Optional facilities, such as fast-select calls, can be requested by entering the correct values in the cb_fac_struct structure. If the facilities requested are not allowed by the network, the call is cleared and an appropriate error code is made available in the cb_clear_struct structure, which can be received using the x25_receive subroutine.

Parameters

cb_call Pointer to the cb_call_struct structure.
ctr_id Identifier of a counter allocated by a previous x25_ctr_get subroutine.

Return Values

If successful, the x25_call subroutine returns the connection identifier to be used by other subroutines for the duration of the call. If an error occurs, or the call is cleared, the x25_call 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:

X25CALLED

X25CALLING

X25INVCTR

X25INVFAC

X25LONG

X25NOCARD

X25NOLINK

X25NOSUCHLINK

X25NOTINIT

X25PROTOCOL

X25SYSERR

X25TOOMANYVCS

X25TRUNCTX

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

EINTR

EIO

ENOSPC

Examples

Make 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_accept subroutine, x25_call_clear subroutine, x25_ctr_get subroutine, x25_receive 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 ]