| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:41:52 GMT | ||||||||||||||||
| |||||||||||||||||
| Manpage of M_DATADescription: Manual PageKeywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpciM_DATASection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEM_DATA - STREAMS data messageFORMATThe M_DATA message block is a datab(9) structure and associated data buffer that contains unstructured data. (With a few exceptions, any structure imposed on the M_DATA data buffer is defined outside of STREAMS.) An M_DATA message is a normal priority message that consists of one or more M_DATA message blocks. INTERFACEDESCRIPTIONThe M_DATA message is intended to contain ordinary data. Messages allocated by the allocb(9) utility are type M_DATA by default. M_DATA messages are generally sent upstream or downstream on a Stream and their contents can be passed between a process and the Stream head. An M_DATA message consists of one or more M_DATA blocks. M_DATA messages are generally sent in both the downstream and upstream directions on a Stream. M_DATA message sent upstream and arriving at the Stream head are available to be read by user level processes using the read(2s), getmsg(2), or getpmsg(2s) system calls. M_DATA messages can be sent downstream from the Stream head by a user level process using the write(2s), putmsg(2), or putpmsg(2s) system calls. When describing STREAMS-specific system calls, the contents of an M_DATA messsage are referred to collectively as the data part. For the getmsg(2), getpmsg(2s), putmsg(2), and putpmsg(2s) system calls, the control and data parts are passed separately. Only a putmsg(2) or putpmsg(2s) call that does not contain a control part will generate M_DATA messages. (For the messages resulting from calls to these system calls with a control part specified, see M_PROTO(9) and M_PCPROTO(9).) For the read(2s) and write(2s) system calls, only the data part is passed. M_DATA messages can be formulated using multiple M_DATA message blocks. The minimum and maximum packet sizes associated with the upstream module read-side queue (that is, the q_minpsz and q_maxpsz fields of the upstream queue(9) structure), provide advise to the module on the minimum and maximum amounts of data that a given M_DATA block in an M_DATA message should contain. The Stream head will compact multiple M_DATA blocks into a single data part, when passing them to the user process. The write(2s), putmsg(2), and putpmsg(2s) system calls use the q_minpsz and q_maxpsz fields of the write-side queue of the topmost downstream module when determining the size and number of M_DATA blocks placed in the resulting downstream M_DATA messages. For a description of this procedure, see write(2s). M_DATA messages, by nature of the initial message block type, are normal (or priority) messages, and are, therefore, subject to flow control restrictions with a Stream. In contrast, the non-standard M_HPDATA(9) message is a high priority message serving the same purpose, that is not subject to flow control restrictions. M_DATA messages can have an assigned priority. The priorty of an M_DATA message contained in the b_band member of the msgb(9) structure of the initial M_DATA message block in the message. M_DATA messages passed upstream to be read by a user level process, or passed downstream as a result of being written by a user level process can support both a byte-stream view of the data path, where there are no message boundaries, or a packet (delimited) view, where message boundaries are preserved. To support the delimited view, M_DATA message blocks can optionally contain the MSGDELIM flag in the b_flag member of the intial message block to indicate that the last byte of the message represents a message boundary. A driver or module can request that the Stream head support the delimited view of M_DATA messages using the MSGDELIM flag, by sending an M_SETOPTS(9) message to the Stream head with the SO_DELIM flag set. For details, see SO_DELIM in M_SETOPTS(9), read(2s) and write(2s). Because a driver or module has no mechanism to examine Stream head options (only a mechanism to set them), drivers and modules should both generate and respect the MSGDELIM flag in M_DATA messages when appropriate. Messages composed of multiple message blocks will typically have M_DATA as the message type for all message blocks following the first. Examples are M_PROTO(9), M_PCPROTO(9), M_IOCTL(9), M_IOCDATA(9), and M_CTL(9), messages. In the getmsg(2), getpmsg(2s), putmsg(2), and putpmsg(2s) system calls, the contents of the M_DATA message blocks, when attached to a M_PROTO(9) or M_PCPROTO(9) initial message block, are also referred to as the data part. Rules governing the creation and form of M_DATA messages also applies to the M_DATA(9) blocks attached to M_PROTO(9) and M_PCPROTO(9) messages. See M_PROTO(9) and M_PCPROTO(9) for details. M_DATA messages can be generated by user level processes using the write(2s), putmsg(2), putpmsg(2s), and I_INSERTFD(7) ioctl(2s) system calls. M_DATA message arriving at the Stream head are made available to the user level process for reading with read(2s), getmsg(2), getpmsg(2s) and I_PEEK(7) ioctl(2s) system calls. M_DATA messages may be generated by drivers and modules. USAGEM_DATA, M_PROTO(9) and M_PCPROTO(9) messages are the work horses of a service interface under STREAMS. They are generated both by user level processes as well as drivers and modules. These messages normally represent a default service primitive within a service interface definition at a message passing boundary within a Stream. An M_DATA message is normally equivalent to a M_PROTO(9) message, but with default control information associated with the message. The M_DATA message contains unstructured service interface user data. SEE ALSOdatab(9), allocb(9), read(2s), getmsg(2), getpmsg(2s), write(2s), putmsg(2), putpmsg(2s), M_PROTO(9), M_PCPROTO(9), queue(9), M_HPDATA(9), msgb(9), M_SETOPTS(9), M_IOCTL(9), M_IOCDATA(9), M_CTL(9), STREAMS(9). COMPATIBILITYThe M_DATA STREAMS message is compatible with SVR 4.2 MP STREAMS, and implementations based on SVR 4, with the following portability considerations:
See STREAMS(9) for additional compatibility information. CONFORMANCEHISTORYThe M_DATA message first appeared in SVR 3[2]. REFERENCES
TRADEMARKS
Other trademarks are the property of their respective owners. IDENTIFICATION
Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
Index
This document was created by man2html, using the manual pages. Time: 17:32:49 GMT, May 22, 2013 | ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:41:52 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |