/* The scope will default to universe except for loopback addresses in which case a host scope is used if not specified otherwise. */
int rtnl_addr_build_add_request(struct rtnl_addr *addr, int flags, struct nl_msg **result)
/* The scope will default to universe except for loopback addresses in which case a host scope is used if not specified otherwise. */
int rtnl_addr_build_add_request(struct rtnl_addr *addr, int flags, struct nl_msg **result)
{
	int required = ADDR_ATTR_IFINDEX | ADDR_ATTR_FAMILY |
		       ADDR_ATTR_PREFIXLEN | ADDR_ATTR_LOCAL;
	if ((addr->ce_mask & required) != required)
		return -NLE_MISSING_ATTR;
	return build_addr_msg(addr, RTM_NEWADDR, NLM_F_CREATE | flags, result);
}