.TH copyresp "" "" "STREAMS Data Structure"
.PC "Structure for responding to STREAMS transparent ioctl copy"
.B "#include <sys/stream.h>"
.PP
Structure
.B copyresp
contains the information needed to continue processing transparent
.BR ioctl s.
No driver creates this structure:
it is contained within any
.B M_IOCDATA
messages that the stream head generates.
.PP
The following fields within
.B copyresp
are available to drivers:
.IP "\fBint cp_cmd\fR" 1.3i
The
.B ioctl
command, copied from field
.B cq_cmd
of the structure
.BR copyreq .
.IP "\fBcred_t *cp_cr\fR"
The user's credentials.
It is copied from field
.B cq_cr
of structure
.BR copyreq .
.IP "\fBuint_t cp_id\fR"
The
.B ioctl
identifier, which uniquely identifies this
.B ioctl
within the stream.
It is copied from field
.B cq_id
of the structure
.BR copyreq .
.IP "\fBcaddr_t cp_rval\fR"
The value returned by the last copy request.
Zero indicates that the request succeeded;
a non-zero value indicates that the copy failed,
with the nature of the failure indicated by the value.
When this field indicates failure, the driver or module should abort
processing the
.B ioctl
and free the message.
.IP "\fBmblk_t *cp_private\fR"
The contents of this field are copied from field
.B cq_private
of the structure
.BR copyreq .
The driver defines what goes into this field.
.SH "See Also"
.B
datab,
DDI/DKI data structures,
mesgb,
copyreq,
iocblk
.R
.SH Notes
If a driver reuses an
.B M_IOCDATA
message, it must clear all unused fields.
.PP
When a \*(ST function frees an
.B M_IOCDATA
message, it does
.I not
free the memory to which
.B cp_private
points.
Your driver must free this memory.
