]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-etc-hosts.h
resolved: add missing error code check when initializing DNS-over-TLS
[thirdparty/systemd.git] / src / resolve / resolved-etc-hosts.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
dd0bc0f1
LP
2#pragma once
3
dd0bc0f1
LP
4#include "resolved-manager.h"
5#include "resolved-dns-question.h"
6#include "resolved-dns-answer.h"
7
78fc21a1
ZJS
8typedef struct EtcHostsItem {
9 struct in_addr_data address;
10
11 char **names;
12} EtcHostsItem;
13
14typedef struct EtcHostsItemByName {
15 char *name;
16
17 struct in_addr_data **addresses;
18 size_t n_addresses, n_allocated;
19} EtcHostsItemByName;
20
21int etc_hosts_parse(EtcHosts *hosts, FILE *f);
22void etc_hosts_free(EtcHosts *hosts);
23
dd0bc0f1 24void manager_etc_hosts_flush(Manager *m);
dd0bc0f1 25int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer);