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

ddopen (User Mode) Communications PDH Entry Point

Purpose

Performs data structure allocation and initialization for a communications physical device handler (PDH).

Syntax

#include <sys/device.h>
#include <sys/comio.h>
int ddopen (devno, devflag, chan, ext)
dev_t devno;
ulong devflag;
int chan;
int ext;

Parameters for User-Mode Processes

devno Specifies major and minor device numbers.
devflag Specifies the flag word with the following definitions:
DKERNEL This flag must be clear, indicating call by a user-mode process.
DNDELAY If this flag is set, the PDH 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 device handler's ddmpx entry point.
ext Indicates device-dependent.

Description

The ddopen entry point performs data structure allocation and initialization. Hardware initialization and other time-consuming activities such as call initialization are not performed. This call is synchronous and does not return until the open operation is complete.

Execution Environment

A ddopen entry point can be called from the process environment only.

Return Values

In general, communication device handlers use the common return codes defined for an entry point. However, device handlers for specific communication devices can return device-specific codes. The common return codes for the ddopen entry point are:

EINVAL Indicates a parameter is not valid.
ENODEV Indicates there is no such device.
EBUSY Indicates the maximum number of opens was exceeded.
ENOMEM Indicates the PDH was unable to allocate needed space.
ENOTREADY Indicates the PDH is in the process of shutting down the adapter.
ENXIO Indicates an attempt was made to open the PDH before it was configured.

Related Information

The ddclose entry point, ddopen entry point for kernel-mode processes.


[ Previous | Next | Contents | Home | Search ]