Deleted Added
sdiff udiff text old ( 256281 ) new ( 269257 )
full compact
1/*
2 * validator/val_neg.h - validator aggressive negative caching functions.
3 *
4 * Copyright (c) 2008, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 7 unchanged lines hidden (view full) ---

16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * Neither the name of the NLNET LABS nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36/**
37 * \file
38 *
39 * This file contains helper functions for the validator module.
40 * The functions help with aggressive negative caching.
41 * This creates new denials of existance, and proofs for absence of types
42 * from cached NSEC records.
43 */
44
45#ifndef VALIDATOR_VAL_NEG_H
46#define VALIDATOR_VAL_NEG_H
47#include "util/locks.h"
48#include "util/rbtree.h"
49struct val_neg_data;
50struct config_file;
51struct reply_info;
52struct rrset_cache;
53struct regional;
54struct query_info;
55struct dns_msg;
56struct ub_packed_rrset_key;

--- 167 unchanged lines hidden (view full) ---

224 * @param now: current time for ttl checks.
225 * @return
226 * 0 on error
227 * 0 if no proof of negative
228 * 1 if indeed negative was proven
229 * thus, qname DLV qclass does not exist.
230 */
231int val_neg_dlvlookup(struct val_neg_cache* neg, uint8_t* qname, size_t len,
232 uint16_t qclass, struct rrset_cache* rrset_cache, uint32_t now);
233
234/**
235 * For the given query, try to get a reply out of the negative cache.
236 * The reply still needs to be validated.
237 * @param neg: negative cache.
238 * @param qinfo: query
239 * @param region: where to allocate reply.
240 * @param rrset_cache: rrset cache.

--- 9 unchanged lines hidden (view full) ---

250 * may have a trust-anchor below the optout and thus the optout cannot
251 * be used to create a proof from the negative cache.
252 * @return a reply message if something was found.
253 * This reply may still need validation.
254 * NULL if nothing found (or out of memory).
255 */
256struct dns_msg* val_neg_getmsg(struct val_neg_cache* neg,
257 struct query_info* qinfo, struct regional* region,
258 struct rrset_cache* rrset_cache, ldns_buffer* buf, uint32_t now,
259 int addsoa, uint8_t* topname);
260
261
262/**** functions exposed for unit test ****/
263/**
264 * Insert data into the data tree of a zone
265 * Does not do locking.
266 * @param neg: negative cache

--- 48 unchanged lines hidden ---