.TH "entry-point routines" "" "" "Overview"
.PC "Routines for managing requests to the driver"
.PP
A driver contains entry-point routines via which the kernel or an
application can ask the driver to do something.
The following gives the legal entry points.
Each is described in its own Lexicon entry.
Those marked with an `*' apply only to the DDI/DKI interface; those
marked with a `\(dg' apply only to the internal \*(CO interface.
.sp \n(pDu
.nf
.ta 1.5i
.tc . 0.1i
\fBblock\fR\(dg	Block interface to the device
\fBchpoll\fR*	Polling entry point
\fBclose\fR	Close a device
\fBhalt\fR*	Shut down a device upon system shut-down
\fBinit\fR*	Initialize a device
\fBintr\fR*	Process an interrupt
\fBioctl\fR	Control a character device
\fBload\fR\(dg	Routine to execute upon loading the driver into memory
\fBmmap\fR*	Check virtual mapping for a memory-mapped device
\fBopen\fR	Open a device
\fBpoll\fR\(dg	Poll the device
\fBpower\fR\(dg	Routine to execute if power fails
\fBprint\fR*	Print a message on the system's console
\fBput\fR*	Receive messages from the preceding queue
\fBread\fR	Read data from a device
\fBsize\fR*	Return the size of a logical block device
\fBsrv\fR*	Service messages
\fBstart\fR*	Initialize a device at system start-up
\fBstrategy\fR*	Perform block I/O
\fBtime\fR\(dg	Routine to execute when timeouts occur
\fBuload\fR\(dg	Routine to execute when driver is unloaded from memory
\fBwrite\fR	Write data to a device
.fi
.PP
Under the DDI/DKI, driver routines are accessed by the kernel by using
the driver's unique prefix.
For example, to access a driver's
.B read
routine for the driver whose prefix is
.BR foo ,
call the function
.BR fooread() .
.PP
Under the internal \*(CO kernel routines,
entry points are accessed through the driver's copy of the structure
.BR CON .
For example, the address of the
.B read
routine is kept in field
.B c_read
of the driver's
.B CON
structure.
The kernel contains functions to invoke these routines.
For example, to
invoke the
.B read
routine for a device, call function
.B dread()
with that device's unique identifier.
.SH "See Also"
.B
con,
DDI/DKI kernel routines,
internal kernel routines,
STREAMS
.R
