STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
169
NAME
dupmsg () – Duplicates a message.
SYNOPSIS
#include <sys/stream.h>
mblk_t *dupmsg (mblk_t *mp);
PARAMETERS
mp
Pointer to a message block, which is to be duplicated.
DESCRIPTION
This function calls dupb() to duplicate all message block descriptors starting at
mp
, and then links the
message block descriptors to form a new message. It does not copy data buffers. Since dupb() is used to
duplicate message block descriptors, the relevant fields in the message block descriptors are initialized as
described in the section on dupb().
RETURN VALUES
dupmsg() returns a pointer to the message block on success, and a NULL pointer upon failure.
CONSTRAINT
dupmsg() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order can
be held across this call.