STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

STREAMS Driver Entry Points

STREAMS drivers have five different points of contact with the kernel:

Table 9-1  Kernel Contact Points
Kernel Contact Point
Description
Configuration entry points
These kernel (dynamically loading) routines enable the kernel to find the driver binary in the file system and load it into, or unload it from, the running kernel. The entry points include _init(9E), _info(9E), and _fini(9E).
Initialization entry points
Enable the driver to determine a device's presence and initialize its state. These routines are accessed through the dev_ops(9S) data structure during system initialization. They include getinfo(9E), probe(9E), attach(9E), and detach(9E).
Table-driven entry points
Accessed through cb_ops(9S), the character and block access table, when an application calls the appropriate interface. The members of the cb_ops(9S) structure include pointers to entry points that perform the device's functions, such as read(9E), write(9E), ioctl(9E). The cb_ops(9S) table contains a pointer to the streamtab(9S)structure.
STREAMS queue processing entry points
Contained in the streamtab, read and process the STREAMS messages that travel through the queue structures. Examples of STREAMS queue processing entry points are put(9E) and srv(9E).
Interrupt routines
Handle the interrupts from the device (or software interrupts). It is added to the kernel by ddi_add_intr(9F) when the kernel configuration software calls attach(9E).