diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-08-13 10:26:42 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-08-13 10:26:42 +0000 |
commit | d3d4aa96aa1150e5ae930b0f8a295762779aa86c (patch) | |
tree | afd9c835e4c310f3f1cfe495e896f39e07fc59db /winsup/cygwin/fhandler.h | |
parent | af0a038ecbb7e6eecb18a034a414b871e55b37f5 (diff) | |
download | cygnal-d3d4aa96aa1150e5ae930b0f8a295762779aa86c.tar.gz cygnal-d3d4aa96aa1150e5ae930b0f8a295762779aa86c.tar.bz2 cygnal-d3d4aa96aa1150e5ae930b0f8a295762779aa86c.zip |
* fhandler.h (class fhandler_socket): Add peer_sun_path member.
(fhandler_socket::set_peer_sun_path): New method.
(fhandler_socket::get_peer_sun_path): New method.
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
peer_sun_path to NULL.
(fhandler_socket::~fhandler_socket): Free peer_sun_path if necessary.
(fhandler_socket::dup): Duplicate peer_sun_path.
(fhandler_socket::accept): Ditto. Return fake unbound peer content
and len in case of AF_LOCAL sockets.
(fhandler_socket::getsockname): Always use local sockaddr_storage to
store socket address and copy over to incoming address. Handle every
namelen correctly per POSIX.
(fhandler_socket::getpeername): Ditto. Add code path to return
correct value for AF_LOCAL sockets.
(fhandler_socket::set_peer_sun_path): New method.
* net.cc (socketpair): Set peer_sun_path to empty string, just like
sun_path.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index f661fc01f..7733d8f50 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -462,6 +462,7 @@ class fhandler_socket: public fhandler_base private: char *sun_path; + char *peer_sun_path; struct status_flags { unsigned async_io : 1; /* async I/O */ @@ -533,6 +534,8 @@ class fhandler_socket: public fhandler_base int get_socket_type () {return type;} void set_sun_path (const char *path); char *get_sun_path () {return sun_path;} + void set_peer_sun_path (const char *path); + char *get_peer_sun_path () {return peer_sun_path;} int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2))); int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2))); |