blob: 8613770c61b4db3be888b51a181b3f0fa13a643e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MCOPYMSG 9F "Oct 16, 2007"
.SH NAME
mcopymsg \- Copy message contents into a buffer and free message
.SH SYNOPSIS
.nf
#include <sys/stream.h>
#include <sys/strsun.h>
\fBvoid\fR \fBmcopymsg\fR(\fBmblk_t *\fR\fImp\fR, \fBvoid *\fR\fIbuf\fR);
.fi
.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fImp\fR\fR
.ad
.RS 7n
Message to be copied.
.RE
.sp
.ne 2
.na
\fB\fIbuf\fR\fR
.ad
.RS 7n
Buffer in which to copy.
.RE
.SH DESCRIPTION
The \fBmcopymsg()\fR function copies the contents of the specified message into
the specified buffer. If the message consists of more than a single message
block, the contents of each message block are placed consecutively into the
buffer. After copying the message contents to \fIbuf\fR, \fBmcopymsg()\fR frees
the message \fImp\fR.
.sp
.LP
The provided buffer must be large enough to accommodate the message. If the
buffer is not large enough, the results are unspecified. The \fBmsgsize\fR(9F)
function can be used to calculate the total size of the message beforehand.
.SH RETURN VALUES
None.
.SH CONTEXT
This function can be called from user, kernel or interrupt context.
.SH SEE ALSO
\fBfreemsg\fR(9F), \fBmsgsize\fR(9F)
.sp
.LP
\fISTREAMS Programming Guide\fR
|