3 getsockname \- get the current name/address of a socket.
6 #include <sys/socket.h>
10 int getsockname(int \fIsd\fP, struct sockaddr * \fIaddr\fP, socklen_t * \fIaddr_len\fP);
14 getsockname() takes a connected socket \fIsd\fP and fills in \fIaddr\fP
15 with the name/address of the socket.
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 does not have a name/address.