3 getpeername \- get the name/address of the connected peer.
6 #include <sys/socket.h>
10 int getpeername(int \fIsd\fP, struct sockaddr * \fIaddr\fP, socklen_t * \fIaddr_len\fP);
14 getpeername() takes a connected socket \fIsd\fP and fills in \fIaddr\fP
15 with the name/address of the connected peer.
17 On success, this function returns 0. On error, -1 is returned and
22 The operation is not implemented for the given socket.
25 The socket is not connected; there is no peer.