STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

Autopush Facility

The autopush facility (see autopush(1M)) enables administrators to specify a list of modules to be automatically pushed onto the stream whenever a STREAMS device is opened. A prespecified list (/etc/iu.ap) of modules can be pushed onto the stream if the STREAMS device is not already open.

The STREAMS Administrative Driver (SAD) (see sad(7D)) provides an interface to the autopush mechanism. System administrators can open the SAD and set or get autopush information on other drivers. The SAD caches the list of modules to push for each driver. When the driver is opened, if not already open, the stream head checks the SAD's cache to determine if the device is configured to have modules automatically pushed. If an entry is found, the modules are pushed. If the device is open, another open does not cause the list of the prespecified modules to be pushed again.

The autopush SAD_SAP command ap_cmd field specifies the configuration options:

SAP_ONE

Configure each minor device (that is, a specific major and minor device number).

SAP_RANGE

Configure a range of minor devices within a major device.

SAP_ALL

Configure all minor devices within a major device.

SAP_CLEAR

Undo configuration information for a driver.

In addition, when configuring the module list, an optional anchor can be placed within the list. (See STREAMS Anchors for more information.)

When the configuration list is cleared, a range of minor devices has to be cleared as a range and not in parts.