DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

streamtab(D4str)


streamtab -- STREAMS driver and module declaration structure

Synopsis

   #include <sys/stream.h>
   #include <sys/ddi.h>

struct streamtab prefixinfo = { . . . };

Description

The streamtab structure is made up of pointers to qinit(D4str) structures for both the read and write queue portions of each module or driver. Multiplexing drivers require both upper and lower qinit structures. The qinit structure contains the entry points through which the module or driver routines are called.

Usage

Each STREAMS driver or module must have a streamtab structure. The streamtab structure must be named prefixinfo, where prefix is the driver's prefix(D1).

Structure definitions

The streamtab structure contains the following members:
   struct qinit	*st_rdinit;
   struct qinit	*st_wrinit;
   struct qinit	*st_muxrinit;
   struct qinit	*st_muxwinit;

Structure members


st_rdinit
contains a pointer to the read-side qinit(D4str) structure. For a multiplexing driver, this is the qinit structure for the upper read side.

st_wrinit
contains a pointer to the write-side qinit structure. For a multiplexing driver, this is the qinit structure for the upper write side.

st_muxrinit
contains a pointer to the lower read-side qinit structure for multiplexing drivers. For modules and non-multiplexing drivers, this member should be set to NULL.

st_muxwinit
contains a pointer to the lower write-side qinit structure for multiplexing drivers. For modules and non-multiplexing drivers, this member should be set to NULL.

Examples

For example, the header file for the tok driver might contain the following lines:
   struct qinit tokurinit = { NULL, NULL, tokopen, tokclose, NULL, &tokminfo, NULL
   };

struct qinit tokuwinit = { tokuwput, NULL, tokopen, tokclose, NULL, &tokminfo, N ULL };
struct streamtab tokinfo = { &tokurinit, &tokuwinit, NULL, NULL };

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

Differences between versions

In DDI versions prior to version 8 and all ODDI versions, every STREAMS driver and module must define a global streamtab(D4str) structure so that the system can identify the entry points and interface parameters.

Starting with DDI 8, the streamtab(D4str) structure is available through the drv_str member of the drvinfo(D4) structure, instead of being a global variable.

References

drvinfo(D4), qinit(D4str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005