]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/resolve-util.c
Update mailmap and contributor list (#7006)
[thirdparty/systemd.git] / src / shared / resolve-util.c
1 /***
2 This file is part of systemd.
3
4 Copyright 2016 Lennart Poettering
5
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
10
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
18 ***/
19
20 #include "conf-parser.h"
21 #include "resolve-util.h"
22 #include "string-table.h"
23
24 DEFINE_CONFIG_PARSE_ENUM(config_parse_resolve_support, resolve_support, ResolveSupport, "Failed to parse resolve support setting");
25 DEFINE_CONFIG_PARSE_ENUM(config_parse_dnssec_mode, dnssec_mode, DnssecMode, "Failed to parse DNSSEC mode setting");
26
27 static const char* const resolve_support_table[_RESOLVE_SUPPORT_MAX] = {
28 [RESOLVE_SUPPORT_NO] = "no",
29 [RESOLVE_SUPPORT_YES] = "yes",
30 [RESOLVE_SUPPORT_RESOLVE] = "resolve",
31 };
32 DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(resolve_support, ResolveSupport, RESOLVE_SUPPORT_YES);
33
34 static const char* const dnssec_mode_table[_DNSSEC_MODE_MAX] = {
35 [DNSSEC_NO] = "no",
36 [DNSSEC_ALLOW_DOWNGRADE] = "allow-downgrade",
37 [DNSSEC_YES] = "yes",
38 };
39 DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dnssec_mode, DnssecMode, DNSSEC_YES);