1mcopymsg(9F) Kernel Functions for Drivers mcopymsg(9F)
2
3
4
6 mcopymsg - Copy message contents into a buffer and free message
7
9 #include <sys/stream.h>
10 #include <sys/strsun.h>
11
12
13
14 void mcopymsg(mblk_t *mp, void *buf);
15
16
18 Solaris DDI specific (Solaris DDI).
19
21 mp Message to be copied.
22
23
24 buf Buffer in which to copy.
25
26
28 The mcopymsg() function copies the contents of the specified message
29 into the specified buffer. If the message consists of more than a sin‐
30 gle message block, the contents of each message block are placed con‐
31 secutively into the buffer. After copying the message contents to buf,
32 mcopymsg() frees the message mp.
33
34
35 The provided buffer must be large enough to accommodate the message. If
36 the buffer is not large enough, the results are unspecified. The msg‐
37 size(9F) function can be used to calculate the total size of the mes‐
38 sage beforehand.
39
41 None.
42
44 This function can be called from user, kernel or interrupt context.
45
47 freemsg(9F), msgsize(9F)
48
49
50 STREAMS Programming Guide
51
52
53
54SunOS 5.11 16 Oct 2007 mcopymsg(9F)