2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2016-01-22 12:24:20 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "resolved-manager.h"
|
|
|
|
#include "resolved-dns-question.h"
|
|
|
|
#include "resolved-dns-answer.h"
|
|
|
|
|
2018-07-31 11:01:21 +02:00
|
|
|
typedef struct EtcHostsItem {
|
|
|
|
struct in_addr_data address;
|
|
|
|
|
|
|
|
char **names;
|
|
|
|
} EtcHostsItem;
|
|
|
|
|
|
|
|
typedef struct EtcHostsItemByName {
|
|
|
|
char *name;
|
|
|
|
|
|
|
|
struct in_addr_data **addresses;
|
|
|
|
size_t n_addresses, n_allocated;
|
|
|
|
} EtcHostsItemByName;
|
|
|
|
|
|
|
|
int etc_hosts_parse(EtcHosts *hosts, FILE *f);
|
|
|
|
void etc_hosts_free(EtcHosts *hosts);
|
|
|
|
|
2016-01-22 12:24:20 +01:00
|
|
|
void manager_etc_hosts_flush(Manager *m);
|
|
|
|
int manager_etc_hosts_lookup(Manager *m, DnsQuestion* q, DnsAnswer **answer);
|