1mcopyin(9F) Kernel Functions for Drivers mcopyin(9F)
2
3
4
6 mcopyin - Convert an M_IOCTL or M_IOCDATA message to an M_COPYIN
7
9 #include <sys/stream.h>
10 #include <sys/strsun.h>
11
12
13
14 void mcopyin(mblk_t *mp, void *private, size_t size,
15 void * useraddr);
16
17
19 Solaris DDI specific (Solaris DDI).
20
22 mp M_IOCTL or M_IOCDATA message.
23
24
25 private Value to which the cq_private field of copyreq(9S) is set.
26
27
28 size Value to which the cq_size field of copyreq(9S) is set.
29
30
31 useraddr Optionally, the value to which the cq_addr field of copy‐
32 req(9S) is set.
33
34
36 The mcopyin() function converts an M_IOCTL or M_IOCDATA message into an
37 M_COPYIN message using the supplied arguments.
38
39
40 To convert the message, mcopyin() changes the message type to M_COPYIN,
41 and its payload from a iocblk(9S) to a copyreq(9S). Since the
42 iocblk(9S) and copyreq(9S) are designed to overlay one another, the
43 only fields which must be updated are cq_private, cq_size, and cq_addr,
44 which are set to the supplied values. If useraddr is passed as NULL, mp
45 must be a transparent M_IOCTL, and cq_addr is assigned the pointer-
46 sized quantity found at mp->b_cont->b_rptr.
47
48
49 Any trailing message blocks associated with mp are freed.
50
52 None.
53
55 This function can be called from user, kernel or interrupt context.
56
58 mcopyout(9F), copyreq(9S)
59
60
61 STREAMS Programming Guide
62
63
64
65SunOS 5.11 9 June 2004 mcopyin(9F)