copyresp(D4)

copyresp - STREAMS transparent ioctl copy response structure

As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.

NAME
     copyresp - STREAMS transparent ioctl copy response structure

SYNOPSIS
     #include <sys/stream.h>
     #include <sys/ddi.h>

DESCRIPTION
     The copyresp structure contains information in response to a prior copy
     request necessary to continue processing transparent ioctls.

USAGE
     M_IOCDATA messages, generated by the stream head, contain the copyresp
     structure.

     If an M_IOCDATA message is reused, any unused fields in the new message
     should be cleared.

   Structure Definitions
     The copyresp structure contains the following members:
     int      cp_cmd;       /* ioctl command */
     cred_t   *cp_cr;       /* user credentials */
     uint_t   cp_id;        /* ioctl ID */
     caddr_t  cp_rval;      /* status of request */
     mblk_t   *cp_private;  /* module private data */

     The cp_cmd field is the ioctl command, copied from the cq_cmd field of
     the copyreq structure.

     The cp_cr field contains a pointer to the user credentials.  It is copied
     from the cq_cr field of the copyreq structure.

     The cp_id field is the ioctl ID, copied from the cq_id field of the
     copyreq structure.  It is used to uniquely identify the ioctl request in
     the stream.

     The cq_rval field contains the return value from the last copy request.
     If the request succeeded, it is set to 0.  Otherwise, if it is non-zero,
     the request failed.  On success, the module or driver should continue
     processing the ioctl.  On failure, the module or driver should abort
     ioctl processing and free the message.  No M_IOCNAK message need be
     generated.

     The cp_private field is copied from the cq_private field of the copyreq
     structure.  It is available so that the module or driver can regain
     enough state information to continue processing the ioctl request.  When
     the M_IOCDATA message is freed, any message that cp_private refers to is
     not freed by the STREAMS subsystem.  It is the responsibility of the
     module or driver to free it.
REFERENCES
     copyreq(D4), datab(D4), iocblk(D4), messages(D5), msgb(D4)