2 This file is part of systemd.
4 Copyright 2016 Lennart Poettering
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.
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.
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/>.
20 #include "conf-parser.h"
21 #include "resolve-util.h"
22 #include "string-table.h"
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");
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",
32 DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(resolve_support
, ResolveSupport
, RESOLVE_SUPPORT_YES
);
34 static const char* const dnssec_mode_table
[_DNSSEC_MODE_MAX
] = {
36 [DNSSEC_ALLOW_DOWNGRADE
] = "allow-downgrade",
39 DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dnssec_mode
, DnssecMode
, DNSSEC_YES
);