Specifications
Understanding the Kernel Environmen
t
9-
7
d_msgio VOP_MSGIO() routine called for non-STREAMS character
devices that support msgio.
d_ttys Pointer to the driver’s array of tty structures. This is for
downward compatibility with the advent of STREAMS program-
ming.
d_str Pointer to the streamtab structure (used only by STREAMS
device drivers).
d_name Pointer to character string that contains the name of the device
driver.
d_flag A pointer to an integer containing flag bits that define driver char-
acteristics. See devflag(D1) for details.
d_cpu Driver binding to a CPU.
d_modp Used by the Dynamically Loadable Module (DLM) installation
code. Not used for statically linked drivers.
The cred Structure 9
A cred, or credential, structure is associated with each process. The purpose of this struc-
ture is to check the access credentials of the current process. As such, it serves the same
purpose as the file access modes and the special minor device number.
The cred structure is passed into various driver entry point functions—open, close,
read, write and ioctl. A pointer to this structure can also be obtained by calling the
drv_getparm(D3) routine from base-level driver code.
NOTE
The cred structure must be used only when the file access mode
and minor device number are insufficient to protect a device. In
this case, the driver must use the drv_priv(D3) routine; for
additional details, refer to the on-line Device Driver Reference.
For source and binary compatibility purposes, the DDI/DKI spec-
ification specifies that the driver must not access the contents of
the cred structure directly. Under the DDI/DKI, there should be
no dereferencing of pointers to the cred structure.
The iovec and uio Structures 9
One of the main purposes of a device driver is to provide a mechanism for applications to
read data from and write data to a hardware device. As a result, a device driver must have
a means for transferring data to and from a user’s virtual address space. To accommodate