-
Notifications
You must be signed in to change notification settings - Fork 17
/
resolvers.h
55 lines (45 loc) · 1.65 KB
/
resolvers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Copyright 2021 NetFoundry Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <stdbool.h>
#ifndef BUSCTL
#define BUSCTL "/usr/bin/busctl"
#endif
#ifndef RESOLV_CONF_FILE
#define RESOLV_CONF_FILE "/etc/resolv.conf"
#endif
#ifndef RESOLVCONF
#define RESOLVCONF "/usr/sbin/resolvconf"
#endif
#ifndef RESOLVECTL
#define RESOLVECTL "/usr/bin/resolvectl"
#endif
#ifndef SYSTEMD_RESOLVE
#define SYSTEMD_RESOLVE "/usr/bin/systemd-resolve"
#endif
#ifndef RESOLVED_DBUS_NAME
#define RESOLVED_DBUS_NAME "org.freedesktop.resolve1"
#endif
#ifndef RESOLVED_DBUS_PATH
#define RESOLVED_DBUS_PATH "/org/freedesktop/resolve1"
#endif
#ifndef RESOLVED_DBUS_MANAGER_INTERFACE
#define RESOLVED_DBUS_MANAGER_INTERFACE "org.freedesktop.resolve1.Manager"
#endif
#ifndef EXCLUDE_LIBSYSTEMD_RESOLVER
bool try_libsystemd_resolver(const char *tun_name);
#endif
bool is_systemd_resolved_primary_resolver(void);
bool is_resolvconf_systemd_resolved(void);
void dns_update_systemd_resolved(const char* tun, unsigned int ifindex, const char* addr);
void dns_update_resolvconf(const char* tun, unsigned int ifindex, const char* addr);
void dns_update_etc_resolv(const char* tun, unsigned int ifindex, const char* addr);