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

x25sselect X.25 Device Handler Entry Point

Purpose

Determines whether a specified event occurred on a device.

Syntax

int x25sselect (devno, events, reventp, chan)
dev_t devno;
ushort events;
ushort *reventp;
int chan;

Parameters

devno Specifies major and minor device numbers.
events Identifies the events to check. The events parameter is indicated by a bitwise OR using the following flags:
DPOLLIN Checks if the receive data is available.
DPOLLOUT Checks if transmission is possible. For the X.25 device handler, this event is always true.
DPOLLPRI Checks if status is available.
DPOLLSYNC Indicates the request is synchronous. The x25sselect entry point should not perform a selnotify kernel service if the events occur later.
reventp Returns the events pointer. The x25sselect entry point uses this parameter to indicate which of the selected events are true at the time of the call. The reventp parameter is indicated by a bitwise OR of the DPOLLIN, DPOLLOUT, or DPOLLPRI flag, as appropriate.
chan Identifies the channel number assigned by the x25smpx entry point.

Description

Note: This entry point should only be called by user-mode processes using the select or poll subroutine.

The x25sselect entry point determines if a specified event occurred on a device. If one or more events specified by the events parameter are true, this entry point updates the reventp parameter by setting the corresponding bits.

If none of the events are true, the reventp parameter is set to 0 (zero) and the entry point checks the DPOLLSYNC flag. If this flag is set, the request is synchronous and the entry point simply returns. If this flag is false, the x25sselect entry point records which events were requested. When one or more of the events subsequently becomes true, the x25sselect entry point calls the selnotify kernel subroutine to notify the user process.

When the X.25 device handler is in a state that prevents any of the events from being satisfied (such as an adapter failure), the x25sselect entry point sets the reventp parameter to 1 for the appropriate event. This prevents the select or poll subroutine from waiting indefinitely.

Note: Unless the session protocol is PROTOCOL_YBTS, an X.25 packet sequence can not satisfy a x25sselect entry point until the final packet of the sequence is received or the sequence is otherwise terminated (for example, by the arrival of a clear indication).

Execution Environment

An x25sselect entry point can be called from the process environment only.

Return Values

A return code of -1 indicates an unsuccessful operation. The kernel sets the errno global variable to the following value:

EINVAL Indicates an invalid argument was specified or that the x25sselect entry point was called by a kernel-mode user.

Implementation Specifics

The x25sselect entry point functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.

Related Information

Select /Poll Logic for ddwrite and ddread Routines.

The CIO_GET_FASTWRT ddioctl Communications PDH entry point.

The selnotify kernel service.

The poll subroutine, select subroutine.


[ Previous | Next | Contents | Search ]