Lines Matching defs:tree

62  * A tree of dnames and their offsets in the packet is kept.
67 * It is a binary tree, not a rbtree or balanced tree, as the effort
72 /** left node in tree, all smaller to this */
74 /** right node in tree, all larger than this */
77 /** the parent node - not for tree, but zone parent. One less label */
88 * Find domain name in tree, returns exact and closest match.
89 * @param tree: root of tree.
94 * can be null if the tree is empty.
101 compress_tree_search(struct compress_tree_node** tree, uint8_t* dname,
106 struct compress_tree_node* p = *tree;
108 struct compress_tree_node** prev = tree;
133 * Lookup a domain name in compression tree.
134 * @param tree: root of tree (not the node with '.').
141 compress_tree_lookup(struct compress_tree_node** tree, uint8_t* dname,
148 if(compress_tree_search(tree, dname, labs, &p, &m, insertpt)) {
164 * Create node for domain name compression tree.
165 * @param dname: pointer to uncompressed dname (stored in tree).
188 * Store domain name and ancestors into compression tree.
189 * @param dname: pointer to uncompressed dname (stored in tree).
195 * if the tree has an ancestor of dname already, this must be it.
196 * @param insertpt: where to insert the dname in tree.
207 int uplabs = labs-1; /* does not store root in tree */
210 /* algorithms builds up a vine of dname-labels to hang into tree */
236 /* if we have a vine, hang the vine into the tree */
282 struct regional* region, struct compress_tree_node** tree,
289 if((p = compress_tree_lookup(tree, key->rk.dname,
331 struct regional* region, struct compress_tree_node** tree)
336 if((p = compress_tree_lookup(tree, dname, labs, &insertpt))) {
362 struct regional* region, struct compress_tree_node** tree,
378 tree)) != RETVAL_OK)
445 int do_data, int do_sig, struct compress_tree_node** tree,
466 if((r=compress_owner(key, pkt, region, tree,
478 data->rr_len[j], region, tree, c))
500 pkt, owner_labs, region, tree))
532 struct regional* region, struct compress_tree_node** tree,
544 pkt, num_rrs, timenow, region, 1, 1, tree,
557 pkt, num_rrs, timenow, region, 1, 0, tree,
568 pkt, num_rrs, timenow, region, 0, 1, tree,
581 insert_query(struct query_info* qinfo, struct compress_tree_node** tree,
587 /* the query is the first name inserted into the tree */
590 ldns_buffer_position(buffer), region, NULL, tree))
631 struct compress_tree_node* tree = 0;
649 if((r=insert_query(qinfo, &tree, buffer, region)) !=
666 0, timenow, region, &tree, LDNS_SECTION_ANSWER, qinfo->qtype,
683 rep->an_numrrsets, timenow, region, &tree,
700 &tree, LDNS_SECTION_ADDITIONAL, qinfo->qtype,