/* Compare two ROSE addresses for only mask digits, 0 == equal.  */
int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask)
/* Compare two ROSE addresses for only mask digits, 0 == equal.  */
int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask)
{
	unsigned int i, j;
	if (mask > 10)
		return 1;
	for (i = 0; i < mask; i++) {
		j = i / 2;
		if ((i % 2) != 0) {
			if ((addr1->rose_addr[j] & 0x0F) != (addr2->rose_addr[j] & 0x0F))
				return 1;
		} else {
			if ((addr1->rose_addr[j] & 0xF0) != (addr2->rose_addr[j] & 0xF0))
				return 1;
		}
	}
	return 0;
}