DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

Intro(D7str)


Intro -- Introduction to STREAMS message types

Description

This sections contains manual pages for the STREAMS message types that are defined for SVR5 DDI and SCO OpenServer 5 ODDI. The message types differ in their intended purposes, their treatment at the Stream head, and their message queueing priority.

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.''

Compatibility summary

The following tables list the STREAMS message types that are supported in the SVR5 kernel. The table indicates whether each message type is supported in the ODDI interface for SCO OpenServer 5 and the DDI interface for SVR5; see the manual pages for porting notes that are relevant for each message type.

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

 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

 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 (/cgi-                        Yes    Yes
                      bin/man?mansearchword=ioctl&mansection=)
                      acknowledgement
 M_IOCDATA(D7str)     Data for transparent ioctls                  Yes    Yes
 M_IOCNAK(D7str)      Negative ioctl (/cgi-                        Yes    Yes
                      bin/man?mansearchword=ioctl&mansection=)
                      acknowledgement
 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

STREAMS messages in MDI drivers

MDI drivers can use only the following STREAMS messages: M_PCPROTO(D7str), M_DATA(D7str), M_IOCACK(D7str), M_IOCNAK(D7str), and M_FLUSH(D7str).

References

Intro(D7dlpi), Intro(D7mdi), Intro(D7tpi)

``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


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005