| 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_PCTTYDescription: 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_PCTTYSection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEM_PCTTY - STREAMS interrupt messageFORMATThe M_PCTTY message block is a datab(9) structure and associated data buffer that contains structured data. An M_PCTTY message is a high priority message that consists of a single M_TRAIL message block. INTERFACESTREAMS, implementation extension. DESCRIPTIONThe M_PCTTY message is a high priority message type used for communication between the ldterm(4) module and the Stream head under AIX®[1]. Used by the AIX® Stream head to inform the ldterm(4) module when an event, such as read(2s) or ioctl(2s) has been aborted by user signal (timer or break). The ldterm(4) module must remove message blocks representing aborted read or ioctl from the queue and free it. A pointer to the original message block that was aborted is included in this message. Any module or driver that can defer procesing on an M_IOCTL(9) or M_READ(9) message (a TCSETAW input-output control, for example) must be prepared to release that deferred message when the associated system call is interrupted. A typical scenario is as follows:
To prevent this situation, each time a read(2s) or ioctl(2s) system call is interrupted, the AIX® Stream head sends a M_PCTTY message downstream with a pointer to the message block associated with the interrupted system call. Any module or driver must compare that pointer to any queued message block and release the message block it it matches. The M_PCTTY message will be formatted as a ttyblk structure, defined in the <sys/stream.h> header file. The tty_op field corresponds tot he tyupe of system call interrupted: either S_IOCTLGONE or S_READGONE. The b_rptr field of the message block contains the address of the message block to be released. Example code is as follows:
A module that is pushed above the ldterm(4) module and processes M_DATA(9) messages received from the ldterm(4) module should send an M_READ(9) message downstream to the ldterm(4) module if more data is required. The ldterm(4) module only sends M_DATA(9) message upstream when an M_READ(9) is outstanding, so the pushed module must simulate the interaction between the Stream head and the ldterm(4) module. This module should also be prepared to receive an M_PCTTY message from the Stream head, indicating the termination of an outstanding read. M_PCTTY messages are generated by the Stream head. M_PCTTY messages cannot be generated directly by a user level process (but indirectly upon receipt of a signal). M_PCTTY messages arriving at the Stream head are discarded (ignored and freed). M_PCTTY messages should not be geenrated by drivers or modules. M_PCTTY messages are consumed by the driver or module responding to them. USAGEThis message is supposedly necessary because an indefinite number of M_IOCTL(9) or M_READ(9) messages could be otherwise queued. This is hard to support and probably just reflects a poorly designed ldterm(4) module. Only one (unabandonned) M_IOCTL(9) message can be outstanding at a time. The following put procedure code would do the same function as that above:
Although multiple M_READ(9) messages can be outstanding, the messages never need to be queued as they simply contain a count. (Note also that M_READ(9) messages are high priority messages. NOTICESThe M_PCSETOPTS message is documented only by AIX®[1]. It is provided to assist porting of drivers and modules written for AIX® to Linux. It might be necessary to define _AIX_SOURCE before including <sys/stream.h> to expose this symbol. Binary compatibility is not guaranteed. The following guidelines are for processing of the M_PCTTY message at drivers and modules:
SEE ALSOM_IOCTL(9), M_READ(9), datab(9), msgb(9). COMPATIBILITYThe M_PCTTY 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_TRAIL message first appeared in AIX®[1]. 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: 01:01:23 GMT, May 23, 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. |