Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

msgdsize(9F)

Name

msgdsize - return the number of bytes in a message

Synopsis

#include <sys/stream.h>

size_t msgdsize(mblk_t *mp);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

mp

Message to be evaluated.

Description

The msgdsize() function 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

The msgdsize() function can be called from user, interrupt, or kernel context.

Examples

See bufcall(9F) for an example that uses msgdsize().

See Also

bufcall(9F)

Writing Device Drivers for Oracle Solaris 11.3

STREAMS Programming Guide