STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
164
NAME
datamsg () – Checks to see if a specified message type is a data message.
SYNOPSIS
#include <sys/stream.h>
int datamsg (unsigned char type);
PARAMETERS
type
Type of the message to be tested.
DESCRIPTION
This function is typically invoked with the message type parameter mp->b_datap->db_type, where
mp
is a
message pointer. This utility checks if it is a data message type: M_DATA, M_DELAY, M_PROTO or M_PCPROTO.
RETURN VALUES
datamsg() returns 1 if the message is a data message, and 0 otherwise.
CONSTRAINTS
datamsg() can be called from thread or interrupt context. Spinlocks can be held across this call.