|
|
STREAMS does not prevent a module or driver from generating any message type and sending it in any direction on the Stream. However, established processing and direction rules should be observed. Stream head processing according to message type is fixed, although certain parameters can be altered.
A STREAMS message may consist of a number of linked blocks, each of which may contain zero or more bytes. It is therfore completely legal to have the first block contain no bytes, followed by another block that contains non-zero bytes. This situation can occur if a module consumes all the data within the first block. Message blocks can be coalesced into a single block by using msgpullup(D3str) or msgpullup_physreq(D3str) in DDI drivers or pullupmsg(D3str) in SCO OpenServer 5 drivers. Drivers should not asume anything about message boundaries, unless they have explicit control over the STREAMS stack in question.
A message composed of multiple message blocks may include different message types except for protocol messages, which start with one or more M_PROTO(D7str) or M_PCPROTO(D7str) message blocks followed perhaps by one or more M_DATA(D7str) blocks. The STREAM head handles such messages correctly, treating them as if all the M_PROTO and M_PCPROTO blocks are one and the M_DATA blocks are another.
Each message type listed in this section is classified according to its message queueing priority:
In certain cases, two message types may perform similar functions, differing in priority. The use of the word module generally implies ``module or driver.''
Ordinary STREAMS message types
Message | Description | ODDI | DDI |
---|---|---|---|
M_BREAK(D7str) | Request to a Stream driver to send a ``break'' | Yes | Yes |
M_CTL(D7str) | Control/status req for intermodule commun. | Yes | Yes |
M_DATA(D7str) | User data message for I/O system calls | Yes | Yes |
M_DELAY(D7str) | Request a realtime delay on output | Yes | Yes |
M_IOCTL(D7str) | Control/status req generated by a Stream head | Yes | Yes |
M_PASSFP(D7str) | File pointer passing message | Yes | Yes |
M_PROTO(D7str) | Protocol control information | Yes | Yes |
M_RSE(D7str) | Reserved for internal use | Yes | Yes |
M_SETOPTS(D7str) | Set options at the Stream head | Yes | Yes |
M_SIG(D7str) | Signal sent from a module/driver to a user | Yes | Yes |
Priority STREAMS message types
Message | Description | ODDI | DDI |
---|---|---|---|
M_COPYIN(D7str) | Copy in data for transparent ioctls | Yes | Yes |
M_COPYOUT(D7str) | Copy in data for transparent ioctls | Yes | Yes |
M_ERROR(D7str) | Report downstream error condition | Yes | Yes |
M_FLUSH(D7str) | Flush module queue | Yes | Yes |
M_HANGUP(D7str) | Set a Stream head hangup condition | Yes | Yes |
M_IOCACK(D7str) | Positive ioctl acknowledgement | Yes | Yes |
M_IOCDATA(D7str) | Data for transparent ioctls | Yes | Yes |
M_IOCNAK(D7str) | Negative ioctl acknowledgement | Yes | Yes |
M_PCCTL(D7str) | Control/status req for intermodule commun. | No | Yes |
M_PCPROTO(D7str) | Protocol control information | Yes | Yes |
M_PCSETOPTS(D7str) | Priority version of M_SETOPTS | No | Yes |
M_PCRSE(D7str) | Reserved for internal use | Yes | Yes |
M_PCSIG(D7str) | Signal sent from a module/driver to a user | Yes | Yes |
M_READ(D7str) | Read notification | Yes | Yes |
M_START(D7str) | Restart stopped device output | Yes | Yes |
M_STOP(D7str) | Suspend output | Yes | Yes |
M_STARTI(D7str) | Restart stopped device input | No | Yes |
M_STOPI(D7str) | Suspend input | No | Yes |
M_TRAIL(D7str) | Marks end of data | No | Yes |
``Messages, STREAMS'' in HDK Technical Reference
``DDI interface versioning'' in HDK Technical Reference
``ODDI driver interface version for SCO OpenServer 5'' in HDK Technical Reference