OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Sat, 01 Nov 2008 10:41:55 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


MSGSIZE

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

NAME

msgsize - calculate the size of the message blocks in a STREAMS message

SYNOPSIS

#include <sys/stream.h>

int msgsize(mblk_t *mp);

ARGUMENTS

mp

the message to count message bytes.

INTERFACE

STREAMS.

DESCRIPTION

msgsize() counts the size of all of the blocks in the message pointed to by mp, regardless of type.

USAGE

msgsize() is used internally to count the size of messages place on and taken off of message queues.

RETURN

Upon success, msgsize() returns the number of bytes in the message pointed to by mp.

Upon failure, msgsize() returns zero (0).

ERRORS

msgsize() fails and returns zero (0) when the message pointer mp is NULL.

CONTEXT

msgsize() 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

msgsize() is MP-safe. It is the responsibility of the caller, however, to ensure validity of reference and exclusive access to the passed in message. See mp-streams(9).

NOTICES

msgsize() is a Solaris®[1] specific helper function provided by the base Linux Fast-STREAMS streams-0.9.2.4 package. The STREAMS Compatibility Modules strcompat(5) package is not required for this symbol to be access. It is not necessary to define _SUN_SOURCE or to include <sys/strsun.h> to access this symbol. However, portable STREAMS drivers and modules will not access this function.

SEE ALSO

msgdsize(9), xmsgsize(9).

BUGS

msgsize() has no known bugs.

COMPATIBILITY

msgsize() is compatible with Solaris®[1], and LiS[2] with the following portability considerations:

---
msgsize() is an implementation specific utility provided by Solaris® where it is made accessible by including the <sys/strsun.h> header file. msgsize() is also provided by LiS.
Portable STREAMS drivers and modules will not access this function. Solaris® compatible STREAMS drivers and modules may access this function.
---
The Solaris® implementation can produce invalid sizes because it does not check whether b_wptr is less than b_rptr. Linux Fast-STREAMS does not reproduce this Solaris® behaviour and will treat negative length message blocks as zero length.
Solaris® compatible STREAMS drivers and modules will never pass messages where the difference between b_wptr and b_rptr pointers is negative.
---
msgsize() counts the size (b_wptr - b_rptr) of all blocks in the message. LiS counts the absolute size (db_lim - db_base) of all blocks in the message. This is particularly broken verion of the Solaris® helper function. The worst problem with this is that LiS uses this broken msgsize() to do all queue and queue band accounting: meaning that queue counts have nothing to do with the size of message blocks, just the size of data buffers. That is completely inconsistent with any STREAMS implementation and does not conform to SVR 4[3].
Solaris® compatible STREAMS drivers and modules will use Linux Fast-STREAMS instead of LiS.
---
Binary compatibility is not guaranteed.

See STREAMS(9) for additional compatibility information.

CONFORMANCE

Solaris® documentation[1].

HISTORY

msgsize() appears as an exported function in LiS[2].

msgsize() first appeared in Solaris®[1].

REFERENCES

[1]
Solaris® 8, Solaris 8 Docmentation, 2001, (Santa Clara, California), Sun Microsystems, Inc., Sun. <http://docs.sun.com/>
[2]
LIS 2.18, Linux STREAMS (LiS) 2.18.6 Source Code, Brian Bidulock, ed., OpenSS7 Corporation. <http://www.openss7.org/>
[3]
SVR 4, UNIX® System V Release 4 STREAMS Programmer's Guide, 1990, (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
USAGE
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: 22:10:27 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:55 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.