HP-UX Reference (11i v3 07/02) - 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 inter-
face, 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 adminis-
trative 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.
Security Restrictions
The SAD_SAP ioctl() is restricted to superusers or users with the NETADMIN privilege. See
privileges(5) for more information about privileged access on systems that support fine-grained privileges.
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 you 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 fol-
lows:
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 fol-
lowing 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
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 145