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

x25_ctr_wait Subroutine

Purpose

Waits for counters to change in value.

Library

X.25 Communications Library (libx25s.a)

C Syntax

int x25_ctr_wait(ctr_num, ctr_array)
int ctr_num;
struct ctr_array_struct ctr_array[ ];

Description

The x25_ctr_wait subroutine waits for the values of active counters to change. The process is suspended until the value of one of the counters is greater than the specified value. Setting this value in the application is optional, but recommended.

Parameters

ctr_num Indicates the number of elements in the ctr_array_struct structure.
ctr_array Indicates the contents of an array of structures.
ctr_id Contains the counter identifier allocated by a previous x25_ctr_get subroutine.
ctr_value Specifies the value that must be exceeded by this counter.

Return Values

If successful, the x25_ctr_wait subroutine returns the counter identifier (ctr_id) of the counter that satisfied the condition by exceeding the specified value. (If more than one counter exceeded its specified value, only one of the counter identifiers is returned.) If an error occurs, the x25_ctr_wait 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:

X25INVCTR

X25NOTINIT

X25SYSERR

Examples

  1. See the example program svcxmit for an illustration of code statements that wait for a call to be connected or cleared.
  2. See the example program svcrcv for an illustration of codes statements that wait for an incoming call.
  3. See the example program svcrcv for an illustration of code statements that wait for data or some other message.

Implementation Specifics

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

Related Information

The x25_ctr_get subroutine, x25_ctr_remove subroutine x25_ctr_test 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 ]