| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:41:53 GMT | ||||||||||||||||
| |||||||||||||||||
| Manpage of M_READDescription: 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_READSection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEM_READ - STREAMS read messageFORMATThe M_READ message block is a datab(9) structure and associated data buffer that contains structured data. An M_READ message is a high priority message that consists of a single M_READ message block. The M_READ message block contains a single unsigned long value reflecting the nbytes argument to the read(2s) system call. INTERFACEDESCRIPTIONThe M_READ message, (when requested using the SO_MREADON flag in a M_SETOPTS(9) message to the Stream head), is generated by the Stream head just prior to blocking a process calling read(2s), getmsg(2), or getpmsg(2s) that has opened the Stream for blocking operation (i.e., neither O_NONBLOCK nor O_NDELAY flags are set with open(2s) or fcntl(2)) due to an empty read queue at the Stream head. By default, Stream heads do no generate M_READ messages: the SO_MREADON flag in the so_flags field of an M_SETOPTS(9) message must be sent to the Stream head by a driver or module to enable the generation of M_READ messages. Generation of M_READ messages can be disabled again using the SO_MREADOFF flag. The format of the M_READ message is a single M_READ message block containing the unsigned long value of the nbyte argument to the read(2s) system call that generated the M_READ message. For the getmsg(2) or getpmsg(2) system calls where the data part is being retrieved, the unsigned long value in the M_READ message corresponds to the maxlen member of the strbuf(5) structure to which a pointer is passed in the datap argument to the getmsg(2) or getpmsg(2s) call. M_READ messages, when enabled, notify drivers and modules of the occurence of a read that blocks. It is also intended to support communication between Streams that are hosted on separate processors. The use of the resulting M_READ messages by drivers and modules is developer dependent. When processed, treatment of M_READ messages form part of the specification of the service interface. M_READ messages cannot be generated directly by a user level process (but indirectly by performing a read operation). M_READ messages arriving at the Stream head are discarded (ignored and freed). M_READ messages should not be generated by drivers or modules. M_READ messages are consumed by the driver or module responding to them. USAGEFor a STREAMS-based terminal in canonical mode, if the ICANON flag is on in c_lflag, canonical processing is performed. If the ICANON flag is off, non-canonical processing is performed (see termios(7) for more details). Handling of VMIN/VTIME in the STREAMS environment is somewhat complicated, because read(2s) needs to activate a timer in the ldterm(4) module in some cases; hence, read notification becomes necessary. When a user issues an ioctl(2s) to put ldterm(4) in non-canonical (raw) mode, the ldterm(4) module sends an M_SETOPTS(9) message to the Stream head to register read notification. Further reads on the terminal file descriptor will cause the Stream head to issue an M_READ message downstream and data will be sent upstream in response to the M_READ message. With read notification, buffering of raw data is performed by ldterm(4). It is possible to canonize the raw data, when the user has switched from raw to canonical mode. However, the reverse is not possible. To summarize, in non-canonical mode, the ldterm(4) module buffers all data until a request for the data arrives in the form of an M_READ message. The number of bytes sent upstream will be the argument of the M_READ message. If the number is FASTBUF or less, the M_READ message can trasformed into an M_DATA(9) message to pass the data. The following guidelines are for processing of the M_READ message at drivers and modules:
SEE ALSOCOMPATIBILITYThe M_READ 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_READ message first appeared in SVR 3[7]. 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: 06:45:28 GMT, May 22, 2013 | ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:41:53 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |