1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <in-addr-util.h>
5 #include <stdbool.h>
6 #include <sys/types.h>
7 
8 typedef enum ExecutionMode {
9         MODE_RESOLVE_HOST,
10         MODE_RESOLVE_RECORD,
11         MODE_RESOLVE_SERVICE,
12         MODE_RESOLVE_OPENPGP,
13         MODE_RESOLVE_TLSA,
14         MODE_STATISTICS,
15         MODE_RESET_STATISTICS,
16         MODE_FLUSH_CACHES,
17         MODE_RESET_SERVER_FEATURES,
18         MODE_STATUS,
19         MODE_SET_LINK,
20         MODE_REVERT_LINK,
21         _MODE_INVALID = -EINVAL,
22 } ExecutionMode;
23 
24 extern ExecutionMode arg_mode;
25 extern char **arg_set_dns;
26 extern char **arg_set_domain;
27 extern bool arg_ifindex_permissive;
28 
29 int ifname_mangle(const char *s);
30 int ifname_resolvconf_mangle(const char *s);
31