[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2


clone Device Driver

Purpose

Opens an unused minor device on another STREAMS driver.

Description

The clone device driver is a STREAMS software driver that finds and opens an unused minor device on another STREAMS driver. The minor device passed to the clone device driver during the open routine is interpreted as the major device number of another STREAMS driver for which an unused minor device is to be obtained. Each such open operation results in a separate stream to a previously unused minor device.

The clone device driver consists solely of an open subroutine. This open function performs all of the necessary work so that subsequent subroutine calls (including the close subroutine) require no further involvement of the clone device driver.

The clone device driver generates an ENXIO error, without opening the device, if the minor device number provided does not correspond to a valid major device, or if the driver indicated is not a STREAMS driver.

Note: Multiple opens of the same minor device cannot be done through the clone interface. Executing the stat subroutine on the file system node for a cloned device yields a different result from executing the fstat subroutine using a file descriptor obtained from opening the node.

Related Information

The close subroutine, fstat subroutine, open subroutine, stat subroutine.

Understanding STREAMS Drivers and Modules and Understanding the log Device Driver in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]