resolved-dns-answer.h revision 57f5ad3149b604d07816da61e6aa7dcf1cc56b64
3853N/A/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
3853N/A
3853N/A#pragma once
3853N/A
3853N/A/***
3853N/A This file is part of systemd.
3853N/A
3853N/A Copyright 2014 Lennart Poettering
3853N/A
3853N/A systemd is free software; you can redistribute it and/or modify it
3853N/A under the terms of the GNU Lesser General Public License as published by
3853N/A the Free Software Foundation; either version 2.1 of the License, or
3853N/A (at your option) any later version.
3853N/A
3853N/A systemd is distributed in the hope that it will be useful, but
3853N/A WITHOUT ANY WARRANTY; without even the implied warranty of
3853N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3853N/A Lesser General Public License for more details.
3853N/A
3853N/A You should have received a copy of the GNU Lesser General Public License
3853N/A along with systemd; If not, see <http://www.gnu.org/licenses/>.
3853N/A***/
3853N/A
3853N/Atypedef struct DnsAnswer DnsAnswer;
5035N/A
3853N/A#include "resolved-dns-rr.h"
3853N/A
3853N/A/* A simple array of resource records */
3853N/A
3853N/Astruct DnsAnswer {
4803N/A unsigned n_ref;
3853N/A unsigned n_rrs, n_allocated;
3853N/A DnsResourceRecord* rrs[0];
3853N/A};
4141N/A
3853N/ADnsAnswer *dns_answer_new(unsigned n);
3853N/ADnsAnswer *dns_answer_ref(DnsAnswer *a);
3853N/ADnsAnswer *dns_answer_unref(DnsAnswer *a);
3853N/A
3853N/Aint dns_answer_add(DnsAnswer *a, DnsResourceRecord *rr);
4141N/Aint dns_answer_add_soa(DnsAnswer *a, const char *name, uint32_t ttl);
3898N/Aint dns_answer_contains(DnsAnswer *a, DnsResourceKey *key);
3898N/Aint dns_answer_find_soa(DnsAnswer *a, DnsResourceKey *key, DnsResourceRecord **ret);
4920N/A
4518N/ADnsAnswer *dns_answer_merge(DnsAnswer *a, DnsAnswer *b);
3853N/Avoid dns_answer_order_by_scope(DnsAnswer *a, bool prefer_link_local);
3853N/A
3853N/ADEFINE_TRIVIAL_CLEANUP_FUNC(DnsAnswer*, dns_answer_unref);
3853N/A