resolved-dns-rr.h revision 7778dffff3d8bd7438fe19a248c16203668324c9
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen This file is part of systemd.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen Copyright 2014 Lennart Poettering
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen systemd is free software; you can redistribute it and/or modify it
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen under the terms of the GNU Lesser General Public License as published by
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen the Free Software Foundation; either version 2.1 of the License, or
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen (at your option) any later version.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen systemd is distributed in the hope that it will be useful, but
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen WITHOUT ANY WARRANTY; without even the implied warranty of
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen Lesser General Public License for more details.
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen You should have received a copy of the GNU Lesser General Public License
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
a2ba62c719224a4b47751623ca5e8b0333f49721Lennart Poetteringtypedef struct DnsResourceKey DnsResourceKey;
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersentypedef struct DnsResourceRecord DnsResourceRecord;
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen/* DNS record classes, see RFC 1035 */
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen/* DNSKEY RR flags */
a2ba62c719224a4b47751623ca5e8b0333f49721Lennart Poettering#define DNSKEY_FLAG_ZONE_KEY (UINT16_C(1) << 8)
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen/* mDNS RR flags */
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen#define MDNS_RR_CACHE_FLUSH (UINT16_C(1) << 15)
a2ba62c719224a4b47751623ca5e8b0333f49721Lennart Poettering/* DNSSEC algorithm identifiers, see
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen * http://tools.ietf.org/html/rfc4034#appendix-A.1 and
09bee74d7a5f266b175baa19892fa84a9da51d7fTom Gundersen * https://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich DNSSEC_ALGORITHM_RSASHA256 = 8, /* RFC 5702 */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich DNSSEC_ALGORITHM_RSASHA512 = 10, /* RFC 5702 */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich/* DNSSEC digest identifiers, see
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich * https://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich char *_name; /* don't access directy, use DNS_RESOURCE_KEY_NAME()! */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich/* Creates a temporary resource key. This is only useful to quickly
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich * look up something, without allocating a full DnsResourceKey object
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich * for it. Note that it is not OK to take references to this kind of
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich * resource key object. */
e1ea665edac17d75fce01b72dadfa3211b60df2cEugene Yakubovich ._name = (char*) n, \
9505d3c6deda0452c22ab2ed47bca74b98d87a17Tom Gundersen /* https://tools.ietf.org/html/rfc4255#section-3.1 */
9505d3c6deda0452c22ab2ed47bca74b98d87a17Tom Gundersen /* http://tools.ietf.org/html/rfc4034#section-2.1 */
9505d3c6deda0452c22ab2ed47bca74b98d87a17Tom Gundersen /* http://tools.ietf.org/html/rfc4034#section-3.1 */
f579559b3a14c1f1ef96c372e7626c4733e6ef7dTom Gundersen /* https://tools.ietf.org/html/rfc4034#section-4.1 */
void *salt;
void *next_hashed_name;
} nsec3;
return NULL;
DnsResourceKey* dns_resource_key_new_redirect(const DnsResourceKey *key, const DnsResourceRecord *cname);
int dns_resource_key_match_rr(const DnsResourceKey *key, const DnsResourceRecord *rr, const char *search_domain);
int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResourceRecord *rr, const char *search_domain);
int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, const union in_addr_union *address, const char *name);
int dns_resource_record_new_address(DnsResourceRecord **ret, int family, const union in_addr_union *address, const char *name);