SS7 for the
|© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |
Last modified: Mon, 28 Apr 2008 12:53:46 GMT
Manpage of M_PASSFP
Description: Manual Page
Keywords: 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 compactpci
M_PASSFPSection: The OpenSS7 Project DDI/DKI (9)
Updated: Thu, 17 Apr 2014 18:36:46 GMT
Index Return to Main Contents
NAMEM_PASSFP - STREAMS pass file pointer message
The M_PASSFP message block is a datab(9) structure and associated data buffer that contains structured data.
The M_PASSFP message is used internally by STREAMS to pass a file pointer from the Stream head at one end of a STREAMS-based pipe(4) to the Stream head at the other end of the same STREAMS-based pipe(4).
The message is generated as a result of an I_SENDFD(7) command to an ioctl(2s) system call issued by a user level process to the sending Stream head. STREAMS places the M_PASSFP message directly on the destination Stream head's read queue to be retreived by an I_RECVFD(7) command to the ioctl(2s) system call. The message is placed without passing it through the Stream (i.e., it is not seen by any drivers or modules in the Stream). This message should never be present on any queue except the read queue of a Stream head. Consequently, drivers and modules do not need to recognize this message, and it can be ignored by driver and module developers.
There are several reasons why the M_PASSFP message is placed directly on the opposite Stream head:
Because the M_PASSFP message is placed directly on the opposite Stream head, although it is message of normal priority, it is treated as a high priority message. M_PASSFP messages can be generated directly by a user level process with the I_SENDFD(7) ioctl(2s). M_PASSFP messages can be consumed directly by a user level process with the I_RECVFD(7) ioctl(2s). M_PASSFP messages should not be generated by drivers or modules. M_PASSFP messages arriving at a driver or module can be discarded (ignored and freed).
There is one standard module (besides the Stream head) that needs to generate an pass a M_PASSFP message. That module is connld(4). The connld(4) module must pass a file pointer to the Stream head opposite to the one that is is pushed over, on each open of the Stream. The The OpenSS7 Project implementation of the M_PASSFP message is detailed below, under IMPLEMENTATION ® as documentation for this module and any other module that needs to perform a similar task.
Under The OpenSS7 Project, the M_PASSFP message contains (indirectly) a file pointer (that is, a pointer to a file structure as defined in <linux/fs.h>). The Stream head allocates the message block using the esballoc(9) utility instead of allocb(9). The free routine and argument to the free routine are special. The free routine argument is the file pointer, and the free routine simply releases the reference to the file pointer. Rather than pointing into the data buffer, b_rptr points to the free routing argument contained in the data block, datab(9), structure, and b_wptr points one byte past the argument.
In this way, M_PASSFP messages sitting on a Stream head read queue can be flushed as normal, using the flushq(9) utility, and the reference to each file pointer will be released.
The M_PASSFP 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.
This document was created by man2html, using the manual pages.
Time: 18:36:46 GMT, April 17, 2014
SS7 for the
|Last modified: Mon, 28 Apr 2008 12:53:46 GMT |
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.