.TH qinit "" "" "STREAMS Data Structure"
.PC "Structure to initialize a STREAMS queue"
.B "#include <sys/stream.h>"
.PP
The structure
.B qinit
contains pointers to procedures that initialize or manipuate a queue.
A driver or module declares one
.B qinit
structure for all of its read queues, and one for all of its write queues.
The driver's
.B streamtab
structure holds the address of each
.B qinit
structure.
.PP
Once they are initialized, all fields within
.B qinit
are read-only.
A driver or module can read the following fields:
.IP "\fBint (*qi_putp)()\fR" 1.25i
The address of the driver's
.B put
routine.
.IP "\fBint (*qi_srvp)()\fR"
The address of the driver's
.B srv
(service) routine.
This is initialized to NULL if the driver has no
.B srv
routine.
.IP "\fBint (*qi_qopen)()\fR"
The address of the driver's
.B open
routine.
Only read queues
need an
.B open
routine; the
.B qinit
structure for write queues initializes this field to NULL.
.IP "\fBint (*qi_qclose)()\fR"
The address of the driver's
.B close
routine.
Only read queues
need an
.B open
routine; the
.B qinit
structure for write queues initializes this field to NULL.
.IP "\fBint (*qi_qadmin)()\fR"
This field reserved for future use.
Always initialize it to NULL.
.IP "\fBstruct module_info *qi_minfo\fR"
The address of the driver's
.B module_info
structure.
.IP "\fBstruct module_stat *qi_mstat\fR"
The address of structure
.BR module_stat ,
which is defined in header file
.BR <sys/strstat.h> .
.B module_stat
holds statistics; if the driver or module
does not keep statistics, it initializes this field to NULL.
.SH "See Also"
.B
DDI/DKI data structures,
module_info,
queue,
streamtab
.R
