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

Intro(D2mdi)


Intro -- introduction to MDI entry point routines

Synopsis

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

Description

This section provides MDI-specific notes about the entry point routines that can be used in an MDI device driver. It supplements the information provided in Section D2 manual pages in Section D2 manual pages and Section D2str manual pages in Section D2str manual pages.

MDI version 2 drivers can be implemented with either ``DDI interface versioning''DDI version 7 or DDI version 8. The set of supported entry points in these two DDI versions is different. The following table compares the entry point routine set in DDI 7 and DDI 8.

Comparison of DDI 7 and DDI 8 entry point routines (MDI drivers)

Routine Context DDI 7 DDI 8 Notes
close(D2mdi) blockable r r changed syntax
config(D2mdi) blockable -- r  
devinfo(D2mdi) blockable -- r changed syntax
init(D2mdi) initialization o -- use _load(D2mdi) for dynamically loadable drivers
halt(D2mdi) non-blockable r -- see CFG_SUSPEND subfunction to config(D2)
intr(D2mdi) interrupt r r changed syntax
_load(D2mdi) blockable r r  
open(D2mdi) blockable r r note different syntax; see open(D2str).
_unload(D2mdi) blockable r r  
_verify(D2mdi) blockable o -- see CFG_VERIFY subfunction to config(D2)
uwput(D2mdi) interrupt r r  

 Routine        | Context        ||DDI 7 ||DDI 8 | Notes
 close(D2mdi)   | blockable      ||r     ||r     | changed syntax
 config(D2mdi)  | blockable      ||      ||r     |
 devinfo(D2mdi) | blockable      ||      ||r     | changed syntax
 init(D2mdi)    | initialization ||o     ||      | use _load(D2mdi) for
                |                ||      ||      | dynamically loadable drivers
 halt(D2mdi)    | non-blockable  ||r     ||      | see CFG_SUSPEND subfunction to
                |                ||      ||      | config(D2)
 intr(D2mdi)    | interrupt      ||r     ||r     | changed syntax
 _load(D2mdi)   | blockable      ||r     ||r     |
 open(D2mdi)    | blockable      ||r     ||r     | note different syntax; see
                |                ||      ||      | open(D2str)
 _unload(D2mdi) | blockable      ||r     ||r     |
 _verify(D2mdi) | blockable      ||o     ||      | see CFG_VERIFY subfunction to
                |                ||      ||      | config(D2)
 uwput(D2mdi)   | interrupt      ||r     ||r     |
KEY:

o
Optional

r
Required

--
Not applicable


NOTE: MDI drivers must use the _load(D2mdi) and _unload(D2mdi) entry point routines to make them dynamically loadable. The init(D2) entry point routine that can be used in static DDI 7 drivers is not called directly by the kernel with dynamically loadable MDI drivers running on top of DDI 7.

DDI 7 drivers declare their entry point routines in a streamtab(D4str) structure and a driver wrapper; see _load(D2) concerning the different wrapper types.

DDI 8 STREAMS drivers use the drvops(D4) structure to declare all entry point routines except for the put(D2str) and srv(D2str) routines that are used only in STREAMS drivers and are declared in a streamtab structure. The drvops structure includes a pointer to the driver's streamtab structure. The driver must call the drv_attach(D3) function from its _load(D2) routine to attach the drvops structure.

References

Intro(D2), Intro(D2str), Intro(D2oddi)

_load(D2mdi), _unload(D2mdi), _verify(D2mdi), close(D2mdi), config(D2mdi), devinfo(D2mdi), halt(D2mdi), intr(D2mdi), open(D2mdi), uwput(D2mdi),

Developing MDI network adapter drivers in Developing MDI network adapter drivers


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