4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-31 11:30:56 +08:00

Cygwin: AF_UNIX: introduce methods to handle ancillary data

...doing nothing for now.
This commit is contained in:
Corinna Vinschen 2019-02-09 20:04:17 +01:00
parent 3bd0df5170
commit dab6ac1b33
2 changed files with 18 additions and 0 deletions

View File

@ -958,6 +958,8 @@ class af_unix_shmem_t
struct ucred *peer_cred () { return &_peer_cred; }
};
struct af_unix_pkt_hdr_t;
class fhandler_socket_unix : public fhandler_socket
{
protected:
@ -1067,6 +1069,7 @@ class fhandler_socket_unix : public fhandler_socket
int shutdown (int how);
int close ();
int getpeereid (pid_t *pid, uid_t *euid, gid_t *egid);
bool evaluate_cmsg_data (af_unix_pkt_hdr_t *packet, bool);
ssize_t recvmsg (struct msghdr *msg, int flags);
ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen);
@ -1074,6 +1077,7 @@ class fhandler_socket_unix : public fhandler_socket
ssize_t __stdcall readv (const struct iovec *const iov, int iovcnt,
ssize_t tot = -1);
bool create_cmsg_data (af_unix_pkt_hdr_t *packet, const struct msghdr *msg);
ssize_t sendmsg (const struct msghdr *msg, int flags);
ssize_t sendto (const void *ptr, size_t len, int flags,
const struct sockaddr *to, int tolen);

View File

@ -1879,6 +1879,13 @@ fhandler_socket_unix::getpeereid (pid_t *pid, uid_t *euid, gid_t *egid)
return ret;
}
bool
fhandler_socket_unix::evaluate_cmsg_data (af_unix_pkt_hdr_t *packet,
bool clocexec)
{
return true;
}
ssize_t
fhandler_socket_unix::recvmsg (struct msghdr *msg, int flags)
{
@ -1945,6 +1952,13 @@ fhandler_socket_unix::readv (const struct iovec *const iov, int iovcnt,
return recvmsg (&msg, 0);
}
bool
fhandler_socket_unix::create_cmsg_data (af_unix_pkt_hdr_t *packet,
const struct msghdr *msg)
{
return true;
}
ssize_t
fhandler_socket_unix::sendmsg (const struct msghdr *msg, int flags)
{