HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
sad(7) sad(7)
NAME
sad - STREAMS Administrative Driver
SYNOPSIS
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/sad.h>
#include <stropts.h>
int ioctl(
int fildes,
int command,
...
/* arg */
);
DESCRIPTION
The sad driver provides an interface to the
autopush facility using the ioctl() function. As an
interface, the
sad driver enables administrative tasks to be performed on STREAMS modules and
drivers. By specifying the command parameter to the
ioctl() function, an administrator can configure
autopush information for a device, get information on a device, or check a list of modules.
fildes is a file descriptor obtained by opening
/dev/sad using open(). command specifies the admin-
istrative function to be performed. arg points to a data structure. If command is SAD_SAP or SAD_GAP
,
arg points to a struct of type
strapush.Ifcommand is SAD_VML, arg points to a struct of type
str_list.
ioctl Commands
The commands used to perform administrative functions on a STREAMS module or driver are specified
by the following
ioctl() commands:
SAD_SAP Allows the superuser to configure autopush information for a device. The arg parameter
points to a strapush structure (defined in the <sys/sad.h> header file), whose members
are as follows:
struct strapush {
uint sap_cmd;
long sap_major;
long sap_minor;
long sap_lastminor;
long sap_npush;
char sap_list[MAXAPUSH][FMNAMESZ+1];
};
sap_cmd Allows you to specify the type of configuration to perform. This field can have the
following values:
SAP_ALL Configures all minor devices.
SAP_RANGE
Configures a range of minor devices.
SAP_ONE Configures a single minor device.
SAP_CLEAR
Clears the previous settings. Specify only the sap_major and
sap_minor fields when using this command. If a previous entry
specified SAP_ALL, set the sap_minor field to 0 (zero). If a previous
entry was specified as SAP_RANGE, set the sap_minor field to the
lowest minor device number in the range.
sap_major
Specifies the major device number.
sap_minor
Specifies the minor device number.
HP-UX 11i Version 2: September 2004 − 1 − Hewlett-Packard Company Section 7−−127