DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

copyresp(D4str)


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(D7str) 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.

DDI structure definition

The DDI copyresp structure contains the following members:
   int	cp_cmd;
   cred_t	*cp_cr;
   uint_t	cp_id;
   caddr_t	cp_rval;
   mblk_t	*cp_private;

ODDI structure definition

The ODDI copyresp structure contains the following members:
   int	cp_cmd;
   ushort	cp_uid;
   ushort	cp_gid;
   uint	cp_id;
   caddr_t	cp_rval;
   mblk_t	*cp_private;
   };

Structure members


cp_cmd
the ioctl command, copied from the cq_cmd member of the copyreq(D4str) structure.

cp_cr
contains a pointer to the user credentials. It is copied from the cq_cr member of the copyreq(D4str) structure. (DDI only)

cp_uid
effective UID (ODDI only).

cp_gid
effective GID (ODDI only).

cp_id
the ioctl ID, copied from the cq_id member of the copyreq(D4str) structure. It is used to uniquely identify the ioctl request in the stream.

cq_rval
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.

cp_private
copied from the cq_private member of the copyreq(D4str) 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 references is not freed by the STREAMS subsystem. It is the responsibility of the module or driver to free it.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

References

copyreq(D4str), datab(D4str), iocblk(D4str), Intro(D7str), msgb(D4str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005