-
- Downloads
Log identifying information for the other end of connections.
When anyone connects to a PuTTY tool's listening socket - whether it's a user of a local->remote port forwarding, a connection-sharing downstream or a client of Pageant - we'd like to log as much information as we can find out about where the connection came from. To that end, I've implemented a function sk_peer_info() in the socket abstraction, which returns a freeform text string as best it can (or NULL, if it can't get anything at all) describing the thing at the other end of the connection. For TCP connections, this is done using getpeername() to get an IP address and port in the obvious way; for Unix-domain sockets, we attempt SO_PEERCRED (conditionalised on some moderately hairy autoconfery) to get the pid and owner of the peer. I haven't implemented anything for Windows named pipes, but I will if I hear of anything useful.
Showing
- Recipe 2 additions, 2 deletionsRecipe
- configure.ac 22 additions, 0 deletionsconfigure.ac
- errsock.c 7 additions, 1 deletionerrsock.c
- network.h 8 additions, 0 deletionsnetwork.h
- pageant.c 8 additions, 2 deletionspageant.c
- portfwd.c 17 additions, 2 deletionsportfwd.c
- proxy.c 2 additions, 1 deletionproxy.c
- ssh.c 7 additions, 2 deletionsssh.c
- ssh.h 2 additions, 1 deletionssh.h
- sshshare.c 4 additions, 1 deletionsshshare.c
- unix/unix.h 5 additions, 0 deletionsunix/unix.h
- unix/uxnet.c 50 additions, 1 deletionunix/uxnet.c
- unix/uxpeer.c 32 additions, 0 deletionsunix/uxpeer.c
- unix/uxproxy.c 2 additions, 1 deletionunix/uxproxy.c
- windows/winhsock.c 7 additions, 1 deletionwindows/winhsock.c
- windows/winnet.c 45 additions, 3 deletionswindows/winnet.c
- windows/winnps.c 7 additions, 1 deletionwindows/winnps.c
Loading
Please register or sign in to comment