Kernel Functions for Drivers mcopyout(9F)
NAME
mcopyout - Convert an MIOCTL or MIOCDATA message to an
MCOPYOUT
SYNOPSIS
#include
#include
void mcopyout(mblkt *mp, void *private, sizet size, void *useraddr,
mblkt *dp);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
mp MIOCTL or MIOCDATA message.
private Value to set the cqprivate field of the
copyreq(9S) to.
size Value to set the cqsize field of the
copyreq(9S) to.
useraddr Optionally, the value to set the cqaddr field
of the copyreq(9S) to.
dp Optionally, the payload to copy out.
DESCRIPTION
The mcopyout() function converts an MIOCTL or MIOCDATA
message into an MCOPYOUT message using the supplied argu-
ments.
To convert the message, mcopyout() changes the message type
to MCOPYOUT, and its payload from a iocblk(9S) to a
copyreq(9S). Since the iocblk(9S) and copyreq(9S) are
designed to overlay one another, the only fields which must
be updated are cqprivate, cqsize, and cqaddr, which are
set to the supplied values. If useraddr is passed as NUL,
the MIOCTL must be transparent and cqaddr is assigned the
pointer-sized quantity found at mp->bcont->brptr.
SunOS 5.11 Last change: 9 June 2004 1
Kernel Functions for Drivers mcopyout(9F)
If dp is not NUL, any trailing message blocks associated
with mp are freed, mp->bcont is reset to dp and dp->bwptr
is set to dp->brptr ] size. Otherwise, any trailing message
blocks are unaffected.
RETURN VALUES
None.
CONTEXT
This function can be called from user, kernel or interrupt
context.
SEE ALSO
mcopyin(9F), copyreq(9S), iocblk(9S)
STREAMS Programming Guide
SunOS 5.11 Last change: 9 June 2004 2
|