1dupmsg(9F) Kernel Functions for Drivers dupmsg(9F)
2
3
4
6 dupmsg - duplicate a message
7
9 #include <sys/stream.h>
10
11
12
13 mblk_t *dupmsg(mblk_t *mp);
14
15
17 Architecture independent level 1 (DDI/DKI).
18
20 mp Pointer to the message.
21
22
24 dupmsg() forms a new message by copying the message block descriptors
25 pointed to by mp and linking them. dupb(9F) is called for each message
26 block. The data blocks themselves are not duplicated.
27
29 If successful, dupmsg() returns a pointer to the new message block.
30 Otherwise, it returns a NULL pointer. A return value of NULL indi‐
31 cates either memory depletion or the data block reference count, db_ref
32 (see datab(9S)), has reached a limit (255). See dupb(9F).
33
35 dupmsg() can be called from user, kernel, or interrupt context.
36
38 Example 1 Using dupmsg()
39
40
41 See copyb(9F) for an example using dupmsg().
42
43
45 copyb(9F), copymsg(9F), dupb(9F), datab(9S)
46
47
48 Writing Device Drivers
49
50
51 STREAMS Programming Guide
52
53
54
55SunOS 5.11 11 Apr 1991 dupmsg(9F)