]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/resolve/resolved-etc-hosts.h
resolve: rename EtcHostsItem -> EtcHostsItemByAddress
[thirdparty/systemd.git] / src / resolve / resolved-etc-hosts.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
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
133eedad 8typedef struct EtcHostsItemByAddress {
78fc21a1
ZJS
9 struct in_addr_data address;
10
11 char **names;
eb164c51 12 size_t n_names;
133eedad 13} EtcHostsItemByAddress;
78fc21a1
ZJS
14
15typedef struct EtcHostsItemByName {
16 char *name;
17
18 struct in_addr_data **addresses;
319a4f4b 19 size_t n_addresses;
78fc21a1
ZJS
20} EtcHostsItemByName;
21
22int etc_hosts_parse(EtcHosts *hosts, FILE *f);
0f7bdf35 23void etc_hosts_clear(EtcHosts *hosts);
78fc21a1 24
dd0bc0f1 25void manager_etc_hosts_flush(Manager *m);
dd0bc0f1 26int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer);