Kernel Functions for Drivers mcopyin(9F)
NAME
mcopyin - Convert an MIOCTL or MIOCDATA message to an
MCOPYIN
SYNOPSIS
#include
#include
void mcopyin(mblkt *mp, void *private, sizet size,
void * useraddr);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
mp MIOCTL or MIOCDATA message.
private Value to which the cqprivate field of
copyreq(9S) is set.
size Value to which the cqsize field of copyreq(9S)
is set.
useraddr Optionally, the value to which the cqaddr field
of copyreq(9S) is set.
DESCRIPTION
The mcopyin() function converts an MIOCTL or MIOCDATA mes-
sage into an MCOPYIN message using the supplied arguments.
To convert the message, mcopyin() changes the message type
to MCOPYIN, 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,
mp must be a transparent MIOCTL, and cqaddr is assigned
the pointer-sized quantity found at mp->bcont->brptr.
Any trailing message blocks associated with mp are freed.
RETURN VALUES
SunOS 5.11 Last change: 9 June 2004 1
Kernel Functions for Drivers mcopyin(9F)
None.
CONTEXT
This function can be called from user, kernel or interrupt
context.
SEE ALSO
mcopyout(9F), copyreq(9S)
STREAMS Programming Guide
SunOS 5.11 Last change: 9 June 2004 2
|