STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

STREAMS Driver Code Samples

The following discussion describes characteristics of a STREAMS driver:

  • Basic hardware/pseudo drivers

    This type of driver communicates with a specific piece of hardware (or simulated hardware). The lp example simulates a simple printer driver.

  • Clonable drivers

    The STREAMS framework supports a CLONEOPEN facility, which allows multiple streams to be opened from a single special file. If a STREAMS device driver chooses to support CLONEOPEN, it can be referred to as a clonable device. The attach(9E) routines from two Oracle Solaris drivers, ptm(7D) and log(7D), illustrate two approaches to cloning.

  • Multiple instances in drivers

    A multiplexer driver is a regular STREAMS driver that can handle multiple streams connected to it instead of just one stream. Multiple connections occur when more than one minor device of the same driver is in use. See Cloning STREAMS Drivers for more information.