Technical data

sad(7D) Devices SunOS 5.5
NAME sad STREAMS Administrative Driver
SYNOPSIS #include <sys/types.h>
#include <sys/conf.h>
#include <sys/sad.h>
#include <sys/stropts.h>
int ioctl ( int fildes, int command, int arg);
DESCRIPTION The STREAMS Administrative Driver provides an interface for applications to perform
administrative operations onSTREAMS modules and drivers. The interface is provided
through ioctl(2) commands. Privileged operations may access the sad driver using
/dev/sad/admin. Unprivileged operations may access the sad driver using /dev/sad/user.
fildes is an open file descriptor that refers to the sad driver. command determines the con-
trol function to be performed as described below. arg represents additional information
that is needed by this command. The type of arg depends upon the command, but it is
generally an integer or a pointer to a command-specific data structure.
COMMAND
FUNCTIONS
The autopush facility (see autopush(1M)) allows one to configure a list of modules to be
automatically pushed on a stream when a driver is first opened. Autopush is controlled
by the following commands:
SAD_SAP Allows the administrator to configure the given device’s autopush informa-
tion. arg points to a strapush structure, which contains the following
members:
uint sap_cmd;
long sap_major;
long sap_minor;
long sap_lastminor;
long sap_npush;
uint sap_list [MAXAPUSH] [FMNAMESZ + 1];
The sap_cmd field indicates the type of configuration being done. It may take
on one of the following values:
SAP_ONE Configure one minor device of a driver.
SAP_RANGE Configure a range of minor devices of a driver.
SAP_ALL Configure all minor devices of a driver.
SAP_CLEAR Undo configuration information for a driver.
The sap_major field is the major device number of the device to be
configured. The sap_minor field is the minor device number of the device to
be configured. The sap_lastminor field is used only with theSAP_RANGE
command, which configures a range of minor devices between sap_minor
and sap_lastminor, inclusive. The minor fields have no meaning for the
SAP_ALL command. The sap_npush field indicates the number of modules to
7D-280 modified 3 Jul 1990