/
usr
/
include
/
bind9
/
dns
/
/usr/include/bind9/dns
mkdir
upload
Name
Size
Mode
Actions
acl.h
6477
0644
edit
dl
rm
adb.h
22267
0644
edit
dl
rm
badcache.h
3387
0644
edit
dl
rm
bit.h
798
0644
edit
dl
rm
byaddr.h
3598
0644
edit
dl
rm
cache.h
8730
0644
edit
dl
rm
callbacks.h
2280
0644
edit
dl
rm
catz.h
11881
0644
edit
dl
rm
cert.h
1465
0644
edit
dl
rm
client.h
14527
0644
edit
dl
rm
clientinfo.h
2015
0644
edit
dl
rm
compress.h
7047
0644
edit
dl
rm
db.h
50446
0644
edit
dl
rm
dbiterator.h
7385
0644
edit
dl
rm
dbtable.h
3167
0644
edit
dl
rm
diff.h
7039
0644
edit
dl
rm
dispatch.h
15538
0644
edit
dl
rm
dlz.h
10876
0644
edit
dl
rm
dlz_dlopen.h
4394
0644
edit
dl
rm
dns64.h
5720
0644
edit
dl
rm
dnsrps.h
2572
0644
edit
dl
rm
dnssec.h
12841
0644
edit
dl
rm
dnstap.h
10193
0644
edit
dl
rm
ds.h
1665
0644
edit
dl
rm
dsdigest.h
1713
0644
edit
dl
rm
dyndb.h
4869
0644
edit
dl
rm
ecdb.h
806
0644
edit
dl
rm
ecs.h
1250
0644
edit
dl
rm
edns.h
783
0644
edit
dl
rm
enumclass.h
1220
0644
edit
dl
rm
enumtype.h
8485
0644
edit
dl
rm
events.h
4451
0644
edit
dl
rm
fixedname.h
1652
0644
edit
dl
rm
forward.h
3060
0644
edit
dl
rm
geoip.h
2340
0644
edit
dl
rm
ipkeylist.h
2219
0644
edit
dl
rm
iptable.h
1521
0644
edit
dl
rm
journal.h
9712
0644
edit
dl
rm
kasp.h
12124
0644
edit
dl
rm
keydata.h
1047
0644
edit
dl
rm
keyflags.h
1277
0644
edit
dl
rm
keymgr.h
4107
0644
edit
dl
rm
keytable.h
7871
0644
edit
dl
rm
keyvalues.h
4083
0644
edit
dl
rm
lib.h
993
0644
edit
dl
rm
librpz.h
31401
0644
edit
dl
rm
lmdb.h
779
0644
edit
dl
rm
log.h
4029
0644
edit
dl
rm
lookup.h
2921
0644
edit
dl
rm
master.h
8786
0644
edit
dl
rm
masterdump.h
10133
0644
edit
dl
rm
message.h
39567
0644
edit
dl
rm
name.h
37781
0644
edit
dl
rm
ncache.h
4960
0644
edit
dl
rm
nsec.h
3065
0644
edit
dl
rm
nsec3.h
8258
0644
edit
dl
rm
nta.h
4846
0644
edit
dl
rm
opcode.h
1006
0644
edit
dl
rm
order.h
2010
0644
edit
dl
rm
peer.h
6475
0644
edit
dl
rm
portlist.h
2101
0644
edit
dl
rm
private.h
1962
0644
edit
dl
rm
rbt.h
37484
0644
edit
dl
rm
rcode.h
2472
0644
edit
dl
rm
rdata.h
22564
0644
edit
dl
rm
rdataclass.h
2248
0644
edit
dl
rm
rdatalist.h
2557
0644
edit
dl
rm
rdataset.h
18714
0644
edit
dl
rm
rdatasetiter.h
3912
0644
edit
dl
rm
rdataslab.h
4267
0644
edit
dl
rm
rdatastruct.h
62703
0644
edit
dl
rm
rdatatype.h
2290
0644
edit
dl
rm
request.h
9187
0644
edit
dl
rm
resolver.h
20152
0644
edit
dl
rm
result.h
9196
0644
edit
dl
rm
rootns.h
891
0644
edit
dl
rm
rpz.h
12156
0644
edit
dl
rm
rriterator.h
4214
0644
edit
dl
rm
rrl.h
6959
0644
edit
dl
rm
sdb.h
7350
0644
edit
dl
rm
sdlz.h
14090
0644
edit
dl
rm
secalg.h
1705
0644
edit
dl
rm
secproto.h
1556
0644
edit
dl
rm
soa.h
2179
0644
edit
dl
rm
ssu.h
7182
0644
edit
dl
rm
stats.h
24689
0644
edit
dl
rm
tcpmsg.h
3128
0644
edit
dl
rm
time.h
1693
0644
edit
dl
rm
timer.h
1050
0644
edit
dl
rm
tkey.h
7655
0644
edit
dl
rm
tsec.h
2946
0644
edit
dl
rm
tsig.h
8497
0644
edit
dl
rm
ttl.h
1876
0644
edit
dl
rm
types.h
14584
0644
edit
dl
rm
update.h
2004
0644
edit
dl
rm
validator.h
6679
0644
edit
dl
rm
version.h
679
0644
edit
dl
rm
view.h
35341
0644
edit
dl
rm
xfrin.h
2314
0644
edit
dl
rm
zone.h
65543
0644
edit
dl
rm
zonekey.h
776
0644
edit
dl
rm
zoneverify.h
1393
0644
edit
dl
rm
zt.h
5241
0644
edit
dl
rm
Edit:
/usr/include/bind9/dns/validator.h
(6679B)
/* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #ifndef DNS_VALIDATOR_H #define DNS_VALIDATOR_H 1 /***** ***** Module Info *****/ /*! \file dns/validator.h * * \brief * DNS Validator * This is the BIND 9 validator, the module responsible for validating the * rdatasets and negative responses (messages). It makes use of zones in * the view and may fetch RRset to complete trust chains. It implements * DNSSEC as specified in RFC 4033, 4034 and 4035. * * Correct operation is critical to preventing spoofed answers from secure * zones being accepted. * * MP: *\li The module ensures appropriate synchronization of data structures it * creates and manipulates. * * Reliability: *\li No anticipated impact. * * Resources: *\li TBS * * Security: *\li No anticipated impact. * * Standards: *\li RFCs: 1034, 1035, 2181, 4033, 4034, 4035. */ #include <stdbool.h> #include <isc/event.h> #include <isc/lang.h> #include <isc/mutex.h> #include <dns/fixedname.h> #include <dns/rdataset.h> #include <dns/rdatastruct.h> /* for dns_rdata_rrsig_t */ #include <dns/types.h> #include <dst/dst.h> /*% * A dns_validatorevent_t is sent when a 'validation' completes. * \brief * 'name', 'rdataset', 'sigrdataset', and 'message' are the values that were * supplied when dns_validator_create() was called. They are returned to the * caller so that they may be freed. * * If the RESULT is ISC_R_SUCCESS and the answer is secure then * proofs[] will contain the names of the NSEC records that hold the * various proofs. Note the same name may appear multiple times. */ typedef struct dns_validatorevent { ISC_EVENT_COMMON(struct dns_validatorevent); dns_validator_t *validator; isc_result_t result; /* * Name and type of the response to be validated. */ dns_name_t *name; dns_rdatatype_t type; /* * Rdata and RRSIG (if any) for positive responses. */ dns_rdataset_t *rdataset; dns_rdataset_t *sigrdataset; /* * The full response. Required for negative responses. * Also required for positive wildcard responses. */ dns_message_t *message; /* * Proofs to be cached. */ dns_name_t *proofs[4]; /* * Optout proof seen. */ bool optout; /* * Answer is secure. */ bool secure; } dns_validatorevent_t; #define DNS_VALIDATOR_NOQNAMEPROOF 0 #define DNS_VALIDATOR_NODATAPROOF 1 #define DNS_VALIDATOR_NOWILDCARDPROOF 2 #define DNS_VALIDATOR_CLOSESTENCLOSER 3 /*% * A validator object represents a validation in progress. * \brief * Clients are strongly discouraged from using this type directly, with * the exception of the 'link' field, which may be used directly for * whatever purpose the client desires. */ struct dns_validator { /* Unlocked. */ unsigned int magic; isc_mutex_t lock; dns_view_t *view; /* Locked by lock. */ unsigned int options; unsigned int attributes; dns_validatorevent_t *event; dns_fetch_t *fetch; dns_validator_t *subvalidator; dns_validator_t *parent; dns_keytable_t *keytable; dst_key_t *key; dns_rdata_rrsig_t *siginfo; isc_task_t *task; isc_taskaction_t action; void *arg; unsigned int labels; dns_rdataset_t *currentset; dns_rdataset_t *keyset; dns_rdataset_t *dsset; dns_rdataset_t fdsset; dns_rdataset_t frdataset; dns_rdataset_t fsigrdataset; dns_fixedname_t fname; dns_fixedname_t wild; dns_fixedname_t closest; ISC_LINK(dns_validator_t) link; bool mustbesecure; unsigned int depth; unsigned int authcount; unsigned int authfail; isc_stdtime_t start; bool failed; }; /*% * dns_validator_create() options. */ /* obsolete: #define DNS_VALIDATOR_DLV 0x0001U */ #define DNS_VALIDATOR_DEFER 0x0002U #define DNS_VALIDATOR_NOCDFLAG 0x0004U #define DNS_VALIDATOR_NONTA 0x0008U /*% Ignore NTA table */ ISC_LANG_BEGINDECLS isc_result_t dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset, dns_message_t *message, unsigned int options, isc_task_t *task, isc_taskaction_t action, void *arg, dns_validator_t **validatorp); /*%< * Start a DNSSEC validation. * * This validates a response to the question given by * 'name' and 'type'. * * To validate a positive response, the response data is * given by 'rdataset' and 'sigrdataset'. If 'sigrdataset' * is NULL, the data is presumed insecure and an attempt * is made to prove its insecurity by finding the appropriate * null key. * * The complete response message may be given in 'message', * to make available any authority section NSECs that may be * needed for validation of a response resulting from a * wildcard expansion (though no such wildcard validation * is implemented yet). If the complete response message * is not available, 'message' is NULL. * * To validate a negative response, the complete negative response * message is given in 'message'. The 'rdataset', and * 'sigrdataset' arguments must be NULL, but the 'name' and 'type' * arguments must be provided. * * The validation is performed in the context of 'view'. * * When the validation finishes, a dns_validatorevent_t with * the given 'action' and 'arg' are sent to 'task'. * Its 'result' field will be ISC_R_SUCCESS iff the * response was successfully proven to be either secure or * part of a known insecure domain. */ void dns_validator_send(dns_validator_t *validator); /*%< * Send a deferred validation request * * Requires: * 'validator' to points to a valid DNSSEC validator. */ void dns_validator_cancel(dns_validator_t *validator); /*%< * Cancel a DNSSEC validation in progress. * * Requires: *\li 'validator' points to a valid DNSSEC validator, which * may or may not already have completed. * * Ensures: *\li It the validator has not already sent its completion * event, it will send it with result code ISC_R_CANCELED. */ void dns_validator_destroy(dns_validator_t **validatorp); /*%< * Destroy a DNSSEC validator. * * Requires: *\li '*validatorp' points to a valid DNSSEC validator. * \li The validator must have completed and sent its completion * event. * * Ensures: *\li All resources used by the validator are freed. */ ISC_LANG_ENDDECLS #endif /* DNS_VALIDATOR_H */
Save
cmd:
run