Lines Matching defs:key
76 * 1 a mismatch occured between the insert key and the value at the node
77 * 2 the insert key specifies a shorter key than the one at the node
78 * 3 the insert key specifies a longer key than the one at the node
83 * and a "key" in this example is actaully some value of key_len n that
85 * For example: key = 1011 with key_len = 8, would actaully be the key:mask
110 * inserting key 11101111 would results in the following split
206 * t_insert(tid, id, key, mask)
208 * inserts a new value, id, into the trie, tid->trie with the input key
216 t_insert(trie_id_t *tid, key_t id, uint32_t key, uint32_t mask)
231 key &= mask; /* apply mask */
235 /* bit in key is significant if it is covered by the mask */
249 bit = EXTRACTBIT(key, (pos - 1), key_len);
269 * this case occurs when mask for key
270 * is longer than mask for key at
314 * check if this is the first key to be inserted that is not a
325 * t_insert6(tid, id, key, mask)
330 t_insert6(trie_id_t *tid, key_t id, in6_addr_t key, in6_addr_t mask)
346 V6_MASK_COPY(key, mask, key); /* apply mask to key */
359 bit = EXTRACTBIT(key.s6_addr32[i], (pos - 1), type_len);
379 * check if this is the first key to be inserted that is not a
390 * t_traverse_delete(in_node, pos, id, key, mask, tid)
392 * used to traverse to the node containing id, as found under key
399 t_traverse_delete(node_t **in_node, uint8_t pos, key_t id, uint32_t key,
416 return (B_FALSE); /* key does not exist at node */
446 if ((key & c_node->mask) != c_node->val) {
449 return (B_FALSE); /* key does not exist at node */
492 bit = EXTRACTBIT(key, (pos - 1), (uint8_t)(*tid)->key_len);
494 if (t_traverse_delete(&c_node->zero, (pos - 1), id, key, mask,
499 if (t_traverse_delete(&c_node->one, (pos - 1), id, key, mask,
595 * t_remove(tid, id, key, mask)
599 * - if more than one id share the same key, only the id specified is removed
602 t_remove(trie_id_t *tid, key_t id, uint32_t key, uint32_t mask)
612 key &= mask; /* apply mask */
616 (void) t_traverse_delete(&c_node, (uint8_t)tid->key_len, id, key, mask,
622 * t_remove6(tid, id, key, mask)
624 * specific to removing key of 128 bits in length
627 t_remove6(trie_id_t *tid, key_t id, in6_addr_t key, in6_addr_t mask)
643 V6_MASK_COPY(key, mask, key);
656 bit = EXTRACTBIT(key.s6_addr32[i], (pos - 1), type_len);
688 * t_retrieve(tid, key, fid_table)
690 * returns the number of found filters that match the input key
691 * - each value that matches either a partial or exact match on the key
702 t_retrieve(trie_id_t *tid, uint32_t key, ht_match_t *fid_table)
725 if ((key & c_node->mask) != c_node->val) {
731 /* if node covers rest of bits in key */
746 bit = EXTRACTBIT(key, (pos - 1), (uint8_t)tid->key_len);
774 * t_retrieve6(tid, key, fid_table)
779 t_retrieve6(trie_id_t *tid, in6_addr_t key, ht_match_t *fid_table)
808 EXTRACTBIT(key.s6_addr32[i], (pos - 1), type_len);