[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

tokopen Token-Ring Device Handler Entry Point

Purpose

Initializes a token-ring device handler and allocates the required system resources.

Syntax

#include <sys/device.h>
#include <sys/comio.h>
#include <sys/tokuser.h>

int tokopen (devno, devflag, chan, arg)
dev_t devno;
ulong devflag;
int chan;
struct kopen_ext *arg;

Parameters

devno Specifies major and minor device numbers.
devflag Specifies the flag word with the following definitions:
DKERNEL Indicates kernel-mode processes. For user-mode processes, this flag must be clear.
DNDELAY Specifies that the device handler performs nonblocking reads and writes for this channel. Otherwise, blocking reads and writes are performed for this channel.
chan Specifies the channel number assigned by the tokmpx entry point.
arg Points to a kopen_ext structure for kernel-mode processes. For user-mode processes, this field is not used.

Description

The tokopen entry point is called when a user-mode caller issues an open, openx, or creat subroutine. The tokopen routine can also be invoked in response to an fp_opendev kernel service. The device is opened to read and write data.

Note: After the tokopen operation has successfully completed, the caller must then issue a CIO_START operation before any data can be transmitted or received from a token-ring device handler.

Execution Environment

The tokopen entry point can be called from the process environment only.

Return Values

ENXIO Indicates the specified minor number is not valid.
EINVAL Indicates a specified parameter is not valid.
ENOMEM Indicates the device handler was unable to allocate the required memory.

Implementation Specifics

The tokopen entry point functions with a Token-Ring High Performance Network Adapter 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

The CIO_START tokioctl Token-Ring Device Handler Operation.

The open, openx or creat subroutine.

The ddopen Communications PDH entry point.

The fp_opendev kernel service.


[ Previous | Next | Contents | Home | Search ]