DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

dupmsg(D3str)


dupmsg -- duplicate a message

Synopsis

   #include <sys/stream.h>
   #include <sys/ddi.h>
   

mblk_t *dupmsg(mblk_t *mp);

Description

dupmsg forms a new message by duplicating the message blocks in the message pointed to by mp and linking them using their b_cont pointers.

Arguments


mp
Pointer to the msgb(D4str) message block.

Return values

On success, dupmsg returns a pointer to the new message. On failure, it returns a NULL pointer.

Usage

The dupmsg( ) function calls the dupb(D3str) function to duplicate the specified message block. This is done by copying all individual message block descriptors and then linking the new message blocks to form the new message. dupmsg( ) does not copy data buffers, only message block descriptors.

Context

Base or Interrupt.

Synchronization constraints

Does not block.

Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.

Examples

See the copyb(D3str) manual page for an example of dupmsg.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

References

copyb(D3str), copymsg(D3str), dupb(D3str), datab(D4str), msgb(D4str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005