Writing Device Drivers

Character Driver Structure Overview

Figure 10–1 shows data structures and routines that define the structure of a character device driver. Device drivers typically include the following:

The shaded device access section in Figure 10–1 illustrates character driver entry points.

Figure 10–1 Character Driver Roadmap

Diagram shows structures and entry points for character device drivers.

Associated with each device driver is a dev_ops(9S) structure, which in turn refers to a cb_ops(9S) structure. These structures contain pointers to the driver entry points. Note that some of these entry points can be replaced with nodev(9F) or nulldev(9F) as appropriate.