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

module_info(D4str)


module_info -- STREAMS driver and module information structure

Synopsis

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

Description

The module_info structure stores several identification and limit values that can be set when a STREAMS module or driver is declared. These values are used to initialize the module's or driver's queues when they are created.

Usage

After the initial declaration, the module_info structure should be treated as read-only. However, the flow control limits (mi_hiwat and mi_lowat) and the packet size limits (mi_minpsz and mi_maxpsz) are copied to the queue(D4str) structure, where they may be modified.

There may be one module_info structure per read and write queue, or the driver or module may use the same module_info structure for both the read and write queues.

Structure definitions

The module_info structure contains the following members:
   struct module_info {
           ushort  mi_idnum;
           char    *mi_idname;
           long    mi_minpsz;
           long    mi_maxpsz;
           ulong   mi_hiwat;
           ulong   mi_lowat;
   };

Structure members


mi_idnum
a unique identifier for the driver or module that distinguishes the driver or module from the other drivers and modules in the system.

mi_idname
points to the driver or module name. The constant FMNAMESZ limits the length of the name, not including the terminating NULL. This should be set based on the MODNAME or prfx_MODNAME preprocessor symbol in the Space.c(DSP/4dsp) file rather than being hard-coded. For DDI 8 and later versions, the value of the mi_idname member must match the value of the drv_name member of the drvinfo(D4) structure.

mi_minpsz
the default minimum packet size for the driver or module queues. This is an advisory limit specifying the smallest message that can be accepted by the driver or module.

mi_maxpsz
the default maximum packet size for the driver or module queues. This is an advisory limit specifying the largest message that can be accepted by the driver or module.

mi_hiwat
the default high water mark for the driver or module queues. This specifies the number of bytes of data contained in messages on the queue such that the queue is considered full and hence flow-controlled.

mi_lowat
the default low water mark for the driver or module queues. This specifies the number of bytes of data contained in messages on the queue such that the queue is no longer flow-controlled.

Applicable hardware

All

Version applicability

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

References

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