summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/parsers/sanity_checks_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dhcpsrv/parsers/sanity_checks_parser.h')
-rw-r--r--src/lib/dhcpsrv/parsers/sanity_checks_parser.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/parsers/sanity_checks_parser.h b/src/lib/dhcpsrv/parsers/sanity_checks_parser.h
new file mode 100644
index 0000000..a9dab5e
--- /dev/null
+++ b/src/lib/dhcpsrv/parsers/sanity_checks_parser.h
@@ -0,0 +1,32 @@
+// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef SANITY_CHECKS_PARSER_H
+#define SANITY_CHECKS_PARSER_H
+
+#include <cc/simple_parser.h>
+#include <dhcpsrv/srv_config.h>
+
+namespace isc {
+namespace dhcp {
+
+/// @brief Simple parser for sanity-checks structure
+///
+/// Currently parses only one parameter:
+/// - lease-checks. Allowed values: none, warn, fix, fix-del, del
+class SanityChecksParser : public isc::data::SimpleParser {
+ public:
+ /// @brief parses JSON structure
+ ///
+ /// @param srv_cfg parsed value will be stored here
+ /// @param value a JSON map that contains lease-checks parameter.
+ void parse(SrvConfig& srv_cfg, const isc::data::ConstElementPtr& value);
+};
+
+};
+};
+
+#endif /* SANITY_CHECKS_PARSER_H */