Deleted Added
full compact
val_neg.h (256281) val_neg.h (269257)
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
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.
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE 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"
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 sldns_buffer;
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,
50struct val_neg_data;
51struct config_file;
52struct reply_info;
53struct rrset_cache;
54struct regional;
55struct query_info;
56struct dns_msg;
57struct ub_packed_rrset_key;

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

225 * @param now: current time for ttl checks.
226 * @return
227 * 0 on error
228 * 0 if no proof of negative
229 * 1 if indeed negative was proven
230 * thus, qname DLV qclass does not exist.
231 */
232int 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 uint16_t qclass, struct rrset_cache* rrset_cache, time_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,
234
235/**
236 * For the given query, try to get a reply out of the negative cache.
237 * The reply still needs to be validated.
238 * @param neg: negative cache.
239 * @param qinfo: query
240 * @param region: where to allocate reply.
241 * @param rrset_cache: rrset cache.

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

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

--- 48 unchanged lines hidden ---