Lines Matching refs:mask
66 buf->mask = 0; in create_node()
164 SETBIT(nodep->zero->mask, in t_split()
190 SETBIT(nodep->one->mask, in t_split()
200 UNSETBIT(nodep->mask, i, key_len); in t_split()
216 t_insert(trie_id_t *tid, key_t id, uint32_t key, uint32_t mask) in t_insert() argument
224 if (mask == 0) { in t_insert()
231 key &= mask; /* apply mask */ in t_insert()
236 if (EXTRACTBIT(mask, (pos - 1), key_len) != 1) { in t_insert()
287 SETBIT(c_node->mask, (pos - 1), 1, key_len); in t_insert()
301 SETBIT(c_node->mask, (pos - 1), 1, key_len); in t_insert()
330 t_insert6(trie_id_t *tid, key_t id, in6_addr_t key, in6_addr_t mask) in t_insert6() argument
339 if (IN6_ARE_ADDR_EQUAL(&mask, &zero_addr)) { in t_insert6()
346 V6_MASK_COPY(key, mask, key); /* apply mask to key */ in t_insert6()
355 if (EXTRACTBIT(mask.s6_addr32[i], (pos - 1), type_len) in t_insert6()
400 uint32_t mask, trie_id_t **tid) in t_traverse_delete() argument
412 (EXTRACTBIT(mask, (pos - 1), (uint8_t)(*tid)->key_len) != 1)) { in t_traverse_delete()
438 c_node->mask = 0; in t_traverse_delete()
446 if ((key & c_node->mask) != c_node->val) { in t_traverse_delete()
454 (EXTRACTBIT(mask, (pos - 1), (uint8_t)(*tid)->key_len) in t_traverse_delete()
485 c_node->mask = 0; in t_traverse_delete()
494 if (t_traverse_delete(&c_node->zero, (pos - 1), id, key, mask, in t_traverse_delete()
499 if (t_traverse_delete(&c_node->one, (pos - 1), id, key, mask, in t_traverse_delete()
528 c_node->mask |= c_node->zero->mask; in t_traverse_delete()
530 SETBIT(c_node->mask, (pos - 1), 1, in t_traverse_delete()
554 c_node->mask |= c_node->one->mask; in t_traverse_delete()
556 SETBIT(c_node->mask, (pos - 1), 1, in t_traverse_delete()
586 c_node->mask = 0; in t_traverse_delete()
602 t_remove(trie_id_t *tid, key_t id, uint32_t key, uint32_t mask) in t_remove() argument
607 if (mask == 0) { in t_remove()
612 key &= mask; /* apply mask */ in t_remove()
616 (void) t_traverse_delete(&c_node, (uint8_t)tid->key_len, id, key, mask, in t_remove()
627 t_remove6(trie_id_t *tid, key_t id, in6_addr_t key, in6_addr_t mask) in t_remove6() argument
636 if (IN6_ARE_ADDR_EQUAL(&mask, &zero_addr)) { in t_remove6()
643 V6_MASK_COPY(key, mask, key); in t_remove6()
652 if (EXTRACTBIT(mask.s6_addr32[i], (pos - 1), type_len) in t_remove6()
725 if ((key & c_node->mask) != c_node->val) { in t_retrieve()
737 if ((ret = ipgpc_mark_found(tid->info.mask, in t_retrieve()
762 if ((ret = ipgpc_mark_found(tid->info.mask, c_node->elements, in t_retrieve()
823 if ((ret = ipgpc_mark_found(tid->info.mask, in t_retrieve6()