dedup getsockname