OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Sat, 01 Nov 2008 10:41:56 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
Quick Links

Download

SCTP

SIGTRAN

SS7

Hardware

STREAMS

Asterisk

Related

Package

Manual

FAQ

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

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


QREPLY

Section: Linux Fast-STREAMS DDI/DKI (9)
Updated: 2008-10-31
Index Return to Main Contents

NAME

qreply - replys to a message from a STREAMS message queue

SYNOPSIS

#include <sys/stream.h>

void qreply(queue_t *q, mblk_t *mp);

ARGUMENTS

q

the queue from which to reply.
mp
the message to reply with.

INTERFACE

STREAMS.

DESCRIPTION

qreply() replies, with the message pointed to by mp, to the read queue that is upstream from the specified write queue pointed to by q, or the write queue downstream from the specified read queue pointed to by q.

qreply() is normally used within q's qi_putp(9) or qi_srvp(9) procedure to reply to messages that have arrived on its write queue from upstream, or its read queue from downstream.

It is the responsibility of the procedure calling qreply() with a normal message pointer to by mp to first call canputnext(9) or bcanputnext(9) for the queue to check for flow control. If canputnext(9) or bcanputnext(9) fails for queue q, the procedure should not normally invoke qreply() with a low priority message for the flow controlled queue OTHERQ(q)->q_next.

qreply() will wake up any processes waiting with qwait(9) or qwait_sig(9) on the previous queue OTHERQ(q)->q_next.

RETURN

qreply() returns void.

ERRORS

qreply() is always successful.

CONTEXT

qreply() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines.

MP-STREAMS

qreply() is MP-safe. The caller is responsible for ensuring exclusive access to the passed in message block. The caller should remove all global references to the passed in message block before calling qreply().

qreply() whould always be used in the MP environment in preference to put(OTHERQ(q)->q_next, mp) because the later does not protect dereference of the q_next pointer. putnext(OTHERQ(q), mp) would be an acceptable alternative.

NOTICES

qreply(q, mp) has the same effect as putnext(OTHERQ(q), mp)). Because qreply() invokes the qi_putp(9) procedure of the upstream or downstream queue, the same care should be taken with qreply() as is taken with putnext(9).

SEE ALSO

qi_putp(9), qi_srvp(9), canputnext(9), bcanputnext(9), qwait(9), qwait_sig(9), strqget(9), strqset(9), putnext(9), qprocsoff(9), OTHERQ(9), freezestr(9).

BUGS

qreply() has no known bugs.

COMPATIBILITY

qreply() is compatible with SVR 4.2 MP DDI/DKI[1], and implementations based on SVR 4, with the following portability considerations:

---
qreply() could panic the kernel if passed a NULL or invalid queue or message pointer. Under LiS, qreply() fails silently and frees mp if the message pointer mp is NULL; the queue pointer q is NULL, or OTHERQ(q) is NULL; OTHERQ(q) does not refer to a queue structure; OTHERQ(q)->q_next is NULL; OTHERQ(q)->q_next does not refer to a queue structure; OTHERQ(q)->q_next->q_info is NULL, or OTHERQ(q)->q_next does not have a qi_putp(9) procedure; OTHERQ(q)->q_next has qi_putp(9) and qi_srvp(9) procedures turned off (e.g. with qprocsoff(9)).
Portable STREAMS drivers and modules will not pass NULL or invalid queue or message pointers to qreply().
---
qreply() protects dereference of the q_next pointer with the stream head read lock. SVR 4.2 MP and Solaris® offer the same protection. Under LiS, qreply() does not protect dereference of the q_next pointer against module pushes and pops. See putnext(9) for additional information.
Portable STREAMS drivers and modules in a multiprocessor (MP) environment can assume that qreply() properly protects dereference of the q_next pointer.
Portable STREAMS drivers and modules will not use LiS and will use Linux Fast-STREAMS[2] in its place.
---
qreply() may be called on a stream frozen with freezestr(9). Solaris®, SUPER-UX® and UnixWare® do not permit qreply() to be called on a stream frozen with freezestr(9)[3..5].
Portable STREAMS drivers and modules should not call qreply() on a stream frozen with freezestr(9).
---
HP-UX®[6] lists qreply() as a function that can only be passed a queue in the queue pair currently being synchronized within a module procedure. HP-UX®[6] also lists qreply() as a utility that cannot be called from user functions or non-STREAMS code; that is, contexts asynchronous to the Stream containing q.
HP-UX® compatible drivers and modules will not call qreply() from outside of a qinit(9) routine for the queue pair of q.
---
Binary compatibility is not guaranteed.

See STREAMS(9) for additional compatibility considerations.

CONFORMANCE

SVR 4.2 MP DDI/DKI[1].

HISTORY

qreply() appears as part of SVR 4.0 STREAMS[7].

qreply() first appeared in SVR 3[8].

REFERENCES

[1]
USL DDI/DKI, Device Driver Interface/Driver-Kernel Interface (DDI/DKI) Reference Manual for Intel Processors, 1992, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[2]
streams-0.9.2, Linux Fast-STREAMS (LfS) 0.9.2 Source Code, Brian Bidulock, ed., OpenSS7 Corporation. <http://www.openss7.org/>
[3]
Solaris® 8, STREAMS Programming Guide, August 1999, (Palo Alto, California), Sun Microsystems, Inc., Sun. [Part No: 805-7478-05] <http://docs-pdf.sun.com/>
[4]
SUPER-UX® Release 9.2, SUPER-UX STREAMS Programmers Guide, 1999, NEC Corporation, NEC.
[5]
UnixWare® 7.1.3, UnixWare® 7 STREAMS Programmer's Guide, 2002, (Lindon, Utah), Caldera International, Inc., Caldera. <http://uw713doc.sco.com/>
[6]
HP-UX STREAMS, STREAMS Programmer's Guide -- HP 9000 and Integrity Server Computer Systems, October 2005, (Palo Alto, California), Hewlett-Packard Development Company L.P., HP. <http://docs.hp.com/>
[7]
SVR 4, UNIX® System V Release 4 STREAMS Programmer's Guide, 1990, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[8]
SVR 3, UNIX® System V Release 3 STREAMS Programmer's Guide, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.

TRADEMARKS

OpenSS7tm
is a trademark of OpenSS7 Corporation.
Linux®
is a registered trademark of Linus Torvalds.
UNIX®
is a registered trademark of The Open Group.
Solaris®
is a registered trademark of Sun Microsystems.

Other trademarks are the property of their respective owners.

IDENTIFICATION


Linux Fast-STREAMS: Package streams version 0.9.2.4 released 2008-10-31.

Copyright©1997-2008OpenSS7 Corp. All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
SYNOPSIS
ARGUMENTS
INTERFACE
DESCRIPTION
RETURN
ERRORS
CONTEXT
MP-STREAMS
NOTICES
SEE ALSO
BUGS
COMPATIBILITY
CONFORMANCE
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 08:10:15 GMT, May 18, 2013
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
Last modified: Sat, 01 Nov 2008 10:41:56 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.