/usr/include/libkres/ta.h is in knot-resolver 1.0.0~beta3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | /* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "lib/generic/map.h"
#include <libknot/rrset.h>
/**
* Find TA RRSet by name.
* @param trust_anchors trust store
* @param name name of the TA
* @return non-empty RRSet or NULL
*/
KR_EXPORT
knot_rrset_t *kr_ta_get(map_t *trust_anchors, const knot_dname_t *name);
/**
* Add TA to trust store. DS or DNSKEY types are supported.
* @param trust_anchors trust store
* @param name name of the TA
* @param type RR type of the TA (DS or DNSKEY)
* @param ttl
* @param rdata
* @param rdlen
* @return 0 or an error
*/
KR_EXPORT
int kr_ta_add(map_t *trust_anchors, const knot_dname_t *name, uint16_t type,
uint32_t ttl, const uint8_t *rdata, uint16_t rdlen);
/**
* Return true if the name is below/at any TA in the store.
* This can be useful to check if it's possible to validate a name beforehand.
* @param trust_anchors trust store
* @param name name of the TA
* @return boolean
*/
KR_EXPORT KR_PURE
int kr_ta_covers(map_t *trust_anchors, const knot_dname_t *name);
/**
* Remove TA from trust store.
* @param trust_anchors trust store
* @param name name of the TA
* @return 0 or an error
*/
KR_EXPORT
int kr_ta_del(map_t *trust_anchors, const knot_dname_t *name);
/**
* Clear trust store.
* @param trust_anchors trust store
*/
KR_EXPORT
void kr_ta_clear(map_t *trust_anchors);
|