Lines Matching defs:tree

72  * A tree of dnames and their offsets in the packet is kept.
77 * It is a binary tree, not a rbtree or balanced tree, as the effort
82 /** left node in tree, all smaller to this */
84 /** right node in tree, all larger than this */
87 /** the parent node - not for tree, but zone parent. One less label */
98 * Find domain name in tree, returns exact and closest match.
99 * @param tree: root of tree.
104 * can be null if the tree is empty.
111 compress_tree_search(struct compress_tree_node** tree, uint8_t* dname,
116 struct compress_tree_node* p = *tree;
118 struct compress_tree_node** prev = tree;
143 * Lookup a domain name in compression tree.
144 * @param tree: root of tree (not the node with '.').
151 compress_tree_lookup(struct compress_tree_node** tree, uint8_t* dname,
158 if(compress_tree_search(tree, dname, labs, &p, &m, insertpt)) {
174 * Create node for domain name compression tree.
175 * @param dname: pointer to uncompressed dname (stored in tree).
198 * Store domain name and ancestors into compression tree.
199 * @param dname: pointer to uncompressed dname (stored in tree).
205 * if the tree has an ancestor of dname already, this must be it.
206 * @param insertpt: where to insert the dname in tree.
217 int uplabs = labs-1; /* does not store root in tree */
220 /* algorithms builds up a vine of dname-labels to hang into tree */
246 /* if we have a vine, hang the vine into the tree */
292 struct regional* region, struct compress_tree_node** tree,
301 (p = compress_tree_lookup(tree, key->rk.dname,
345 struct regional* region, struct compress_tree_node** tree,
352 (p = compress_tree_lookup(tree, dname, labs, &insertpt))) {
380 struct regional* region, struct compress_tree_node** tree,
396 tree, compress_count)) != RETVAL_OK)
463 int do_data, int do_sig, struct compress_tree_node** tree,
493 if((r=compress_owner(key, pkt, region, tree,
505 data->rr_len[j], region, tree, c,
527 pkt, owner_labs, region, tree,
559 struct regional* region, struct compress_tree_node** tree,
576 pkt, num_rrs, timenow, region, 1, 1, tree,
589 pkt, num_rrs, timenow, region, 1, 0, tree,
600 pkt, num_rrs, timenow, region, 0, 1, tree,
613 insert_query(struct query_info* qinfo, struct compress_tree_node** tree,
623 /* the query is the first name inserted into the tree */
625 sldns_buffer_position(buffer), region, NULL, tree))
691 struct compress_tree_node* tree = 0;
710 if((r=insert_query(qinfo, &tree, buffer, region)) !=
740 timezero, region, &tree, LDNS_SECTION_ANSWER,
755 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype,
772 rep->an_numrrsets, timenow, region, &tree,
790 &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype,