#ifndef _CH_PROXY_SENFD #define _CH_PROXY_SENFD #include /* size_t */ #include /* ssize_t */ #include /* iovec */ /* send_fd(chanFd, fd, *iov) * * chanFd: fd to sendmsg over; * fd: fd to send; * iov: extra data to send or NULL; * * returns: result of sendmsg, * i.e. the number of bytes sent */ ssize_t send_fd(int chanFd, int fd, const struct iovec *); /* recv_fd(chanFd, flags) * * chanFd: fd to recvmsg from; * flags: recvmsg flags e.g. 0, or MSG_CMSG_CLOEXEC? * * returns: the received fd or -1 */ int recv_fd(int chanFd, int flags); #endif /* _CH_PROXY_SENFD */