* Copyright (c) 1993 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)snd.c 5.2 (Berkeley) %G%";
* Send a message back to a customer,
* from data structures and return error status
sendrequest(sock
, rqst
, cp
, opts
, optlen
, fd
)
struct conversation
*cp
;
/* send message to user application containing fd */
msg
.msg_namelen
= 0 ; /* size of address */
iov
[0].iov_base
= (caddr_t
) &rqst
;
iov
[0].iov_len
= sizeof (rqst
) ;
iov
[1].iov_base
= (caddr_t
) &cp
->co_constatus
;
iov
[1].iov_len
= sizeof(int) ;
iov
[2].iov_base
= (caddr_t
) opts
;
iov
[2].iov_len
= optlen
;
msg
.msg_accrights
= (caddr_t
) &fd
;
msg
.msg_accrightslen
= sizeof(int) ;
msg
.msg_accrightslen
= 0 ;
rv
= sendmsg(sock
, &msg
, 0) ;