]>
Commit | Line | Data |
---|---|---|
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 | 8 | typedef 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 | |
15 | typedef struct EtcHostsItemByName { | |
16 | char *name; | |
17 | ||
18 | struct in_addr_data **addresses; | |
319a4f4b | 19 | size_t n_addresses; |
78fc21a1 ZJS |
20 | } EtcHostsItemByName; |
21 | ||
22 | int etc_hosts_parse(EtcHosts *hosts, FILE *f); | |
0f7bdf35 | 23 | void etc_hosts_clear(EtcHosts *hosts); |
78fc21a1 | 24 | |
dd0bc0f1 | 25 | void manager_etc_hosts_flush(Manager *m); |
dd0bc0f1 | 26 | int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer); |