int getsockname(int sockfd, struct sockaddr* addr, socklen_t* addrlen);
Fills the addr structure with the address associated with the socket sockfd.
int getsockname(int sockfd, struct sockaddr* addr, socklen_t* addrlen);
Fills the addr structure with the address associated with the socket sockfd.