msgdsize(9F)
NAME
msgdsize − return the number of bytes in a message
SYNOPSIS
#include <sys/stream.h>
int msgdsize(mblk_t ∗mp);
ARGUMENTS
mp Message to be evaluated.
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
DESCRIPTION
msgdsize() counts the number of bytes in a data message. Only bytes included in the data blocks of type M_DATA are included in the count.
RETURN VALUES
The number of data bytes in a message, expressed as an integer.
CONTEXT
msgdsize() can be called from user or interrupt context.
EXAMPLE
See bufcall(9F) for an example of using msgdsize().
SEE ALSO
SunOS 5.1 Writing Device Drivers
SunOS 5.1 STREAMS Programmer’s Guide
SunOS 5.1/SPARC — Last change: 11 Apr 1991