/* Guess address family of an abstract address object based on address size.  */
int nl_addr_guess_family(struct nl_addr *addr)
/* Guess address family of an abstract address object based on address size.  */
int nl_addr_guess_family(struct nl_addr *addr)
{
	switch (addr->a_len) {
		case 4:
			return AF_INET;
		case 6:
			return AF_LLC;
		case 16:
			return AF_INET6;
		default:
			return AF_UNSPEC;
	}
}