Obtaining the address family of a socket