Electroneum
Loading...
Searching...
No Matches
validator.h
Go to the documentation of this file.
1/*
2 * validator/validator.h - secure validator DNS query response module
3 *
4 * Copyright (c) 2007, 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
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright notice,
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
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
42
43#ifndef VALIDATOR_VALIDATOR_H
44#define VALIDATOR_VALIDATOR_H
45#include "util/module.h"
46#include "util/data/msgreply.h"
47#include "validator/val_utils.h"
48struct val_anchors;
49struct key_cache;
50struct key_entry_key;
51struct val_neg_cache;
52struct config_strlist;
53
59#define NULL_KEY_TTL 60 /* seconds */
60
65#define BOGUS_KEY_TTL 60 /* seconds */
66
68#define VAL_MAX_RESTART_COUNT 5
69
71#define SENTINEL_IS "root-key-sentinel-is-ta-"
73#define SENTINEL_NOT "root-key-sentinel-not-ta-"
75#define SENTINEL_KEYTAG_LEN 5
76
127
143
242
248
255
257int val_init(struct module_env* env, int id);
258
260void val_deinit(struct module_env* env, int id);
261
263void val_operate(struct module_qstate* qstate, enum module_ev event, int id,
264 struct outbound_entry* outbound);
265
273void val_inform_super(struct module_qstate* qstate, int id,
274 struct module_qstate* super);
275
277void val_clear(struct module_qstate* qstate, int id);
278
286size_t val_get_mem(struct module_env* env, int id);
287
288#endif /* VALIDATOR_VALIDATOR_H */
int lock_basic_type
Definition locks.h:269
module_ev
Definition module.h:536
unsigned int uint32_t
Definition stdint.h:126
signed int int32_t
Definition stdint.h:123
unsigned char uint8_t
Definition stdint.h:124
Definition dns.h:61
Definition val_kentry.h:55
size_t * nsec3_keysize
Definition validator.h:113
int32_t skew_max
Definition validator.h:96
size_t num_rrset_bogus
Definition validator.h:125
struct key_cache * kcache
Definition validator.h:83
int32_t date_override
Definition validator.h:90
struct val_neg_cache * neg_cache
Definition validator.h:86
lock_basic_type bogus_lock
Definition validator.h:123
int32_t skew_min
Definition validator.h:93
size_t * nsec3_maxiter
Definition validator.h:120
int nsec3_keyiter_count
Definition validator.h:107
uint32_t bogus_ttl
Definition validator.h:101
struct key_entry_key * key_entry
Definition validator.h:208
size_t rrset_skip
Definition validator.h:190
enum val_classification subtype
Definition validator.h:211
uint8_t * empty_DS_name
Definition validator.h:203
size_t empty_DS_len
Definition validator.h:205
int dlv_checked
Definition validator.h:222
size_t trust_anchor_len
Definition validator.h:197
uint8_t * trust_anchor_name
Definition validator.h:193
uint8_t * dlv_lookup_name
Definition validator.h:226
struct sock_list * chain_blacklist
Definition validator.h:163
enum val_state state
Definition validator.h:151
int trust_anchor_labs
Definition validator.h:195
uint8_t * signer_name
Definition validator.h:214
@ dlv_there_is_no_dlv
Definition validator.h:239
struct query_info qchase
Definition validator.h:168
int restart_count
Definition validator.h:161
int wait_prime_ta
Definition validator.h:219
struct ub_packed_rrset_key * ds_rrset
Definition validator.h:200
uint8_t * dlv_insecure_at
Definition validator.h:231
struct dns_msg * orig_msg
Definition validator.h:156
size_t dlv_insecure_at_len
Definition validator.h:233
size_t signer_len
Definition validator.h:216
size_t dlv_lookup_name_len
Definition validator.h:228
struct reply_info * chase_reply
Definition validator.h:177
val_classification
Definition val_utils.h:61
struct module_func_block * val_get_funcblock(void)
void val_deinit(struct module_env *env, int id)
void val_clear(struct module_qstate *qstate, int id)
const char * val_state_to_string(enum val_state state)
val_state
Definition validator.h:131
@ VAL_INIT_STATE
Definition validator.h:133
@ VAL_FINISHED_STATE
Definition validator.h:139
@ VAL_VALIDATE_STATE
Definition validator.h:137
@ VAL_FINDKEY_STATE
Definition validator.h:135
@ VAL_DLVLOOKUP_STATE
Definition validator.h:141
void val_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
int val_init(struct module_env *env, int id)
size_t val_get_mem(struct module_env *env, int id)
void val_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)