qinit(D4DK) —
NAME
qinit − STREAMS queue initialization structure
SYNOPSIS
#include <sys/stream.h>
DESCRIPTION
The qinit structure contains pointers to processing procedures and default values for a queue(D4DK). Drivers and modules declare qinit structure for their read and write queues, and place the addresses of the structures in their streamtab(D4DK) structure. After the initial declaration, all fields are intended to be read-only.
STRUCTURE MEMBERS
| int | (∗qi_putp)(); | /∗ put procedure ∗/ |
| int | (∗qi_srvp)(); | /∗ service procedure ∗/ |
| int | (∗qi_qopen)(); | /∗ open procedure ∗/ |
| int | (∗qi_qclose)(); | /∗ close procedure ∗/ |
| int | (∗qi_qadmin)(); | /∗ for future use ∗/ |
| struct module_info | ∗qi_minfo; | /∗ module parameters ∗/ |
| struct module_stat | ∗qi_mstat; | /∗ module statistics ∗/ |
The qi_putp field contains the address of the put(D2DK) routine for the queue.
The qi_srvp field contains the address of the service [srv(D2DK)] routine for the queue. If there is no service routine, this field should be set to NULL.
The qi_qopen field contains the address of the open(D2DK) routine for the driver or module. Only the read-side qinit structure need define contain the routine address. The write-side value should be set to NULL.
The qi_qclose field contains the address of the close(D2DK) routine for the driver or module. Only the read-side qinit structure need define contain the routine address. The write-side value should be set to NULL.
The qi_qadmin field is intended for future use and should be set to NULL.
The qi_minfo field contains the address of the module_info(D4DK) structure for the driver or module.
The qi_mstat field contains the address of the module_stat structure for the driver or module. The module_stat structure is defined in /usr/include/sys/strstat.h. This field should be set to NULL if the driver or module does not keep statistics.
NOTES
There is usually one qinit structure for the read side of a module or driver, and one qinit structure for the write side.
SEE ALSO
Programmer’s Guide: STREAMS
queue(D4DK), module_info(D4DK), streamtab(D4DK)
DDI/DKI — STREAMS