STREAMS Programming Guide

Exit Print View

Updated: July 2014
 
 

Message Types

Several STREAMS messages differ in their purpose and queueing priority. The message types are briefly described and classified, according to their queueing priority, in Table 7–1 and Table 7–2. A detailed discussion of message types is in Chapter 8, STREAMS Kernel-Level Mechanisms.

Some message types are defined as high-priority types. Ordinary or normal messages can have a normal priority of 0, or a priority (also called a band) from 1 to 255.

Table 7-1  Ordinary Messages, Description of Communication Flow
Ordinary Messages
Direction
M_BREAK
Request to a stream driver to send a “break”
Upstream
M_CTL
Control or status request used for intermodule communication
Bidirectional
M_DATA
User data message for I/O system calls
Bidirectional
M_DELAY
Request for a real-time delay on output
Downstream
M_IOCTL
Control/status request generated by a stream head
Downstream
M_PASSFP
File pointer-passing message
Bidirectional
M_PROTO
Protocol control information
Bidirectional
M_SETOPTS
Sets options at the stream head; sends upstream
Upstream
M_SIG
Signal sent from a module or driver
Upstream
Table 7-2  High-Priority Messages, Description of Communication Flow
High-Priority Messages
Direction
M_COPYIN
Copies in data for transparent ioctls
Upstream
M_COPYOUT
Copies out data for transparent ioctls
Upstream
M_ERROR
Reports downstream error condition
Upstream
M_FLUSH
Flushes module queue
Bidirectional
M_HANGUP
Sets a stream head hangup condition
Upstream
M_UNHANGUP
Reconnects line, sends upstream when hangup reverses
Upstream
M_IOCACK
Positive ioctl acknowledgement
Upstream
M_IOCDATA
Data for transparent ioctls, sent downstream
Downstream
M_IOCNAK
Negative ioctl acknowledgement
Upstream
M_PCPROTO
Protocol control information
Bidirectional
M_PCSIG
Sends signal from a module or driver
Upstream
M_READ
Read notification; sends downstream
Downstream
M_START
Restarts stopped device output
Downstream
M_STARTI
Restarts stopped device input
Downstream
M_STOP
Suspends output
Downstream
M_STOPI
Suspends input
Downstream