Header files and declarations
The global declarations required for
an MDI driver include:
-
Appropriate #include lines for
header files
-
A global
module_info(D4str)
structure,
qinit(D4str)
structures for read and write operations,
and a global
streamtab(D4str)
structure declared as
<prefix>info; see
info(D1str).
These are used by the STREAMS subsystem
to identify the entry points,
high and low water marks,
module name,
and the minimum and maximum packet sizes for a MDI driver.
-
All MDI drivers should declare
their version number in the
_ndversion(D1str)
variable.
-
DDI version 8 and later MDI drivers
must also populate
drvinfo(D4)
and
drvops(D4)
structures for the driver.
The drvinfo structure must include
a pointer to the driver's
streamtab(D4str)
structure in the
drv_str
member.
-
Drivers written for DDI versions prior to version 8
must set the
devflag(D1)
variable to appropriate values.
All externally visible symbols
such as entry point routines and global structures
should be identified by a driver
prefix(D1).
For example,
the IBM Token-Ring driver,
which uses the tok prefix,
includes the
tokopen( )
and
tokintr( )
entry point routines
and structures named tokurinit,
tokuwinit, tokinfo, and so forth.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005