diff options
Diffstat (limited to 'src/bin/dhcp6/parser_context.h')
-rw-r--r-- | src/bin/dhcp6/parser_context.h | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/src/bin/dhcp6/parser_context.h b/src/bin/dhcp6/parser_context.h index 2b840e2a58..1d42567e0e 100644 --- a/src/bin/dhcp6/parser_context.h +++ b/src/bin/dhcp6/parser_context.h @@ -1,4 +1,4 @@ -// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2015-2017 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 @@ -83,7 +83,10 @@ public: PARSER_OPTION_DATA, /// This will parse the input as hooks-library. - PARSER_HOOKS_LIBRARY + PARSER_HOOKS_LIBRARY, + + /// This will parse the input as dhcp-ddns. (D2 client config) + PARSER_DHCP_DDNS } ParserType; /// @brief Default constructor. @@ -126,8 +129,8 @@ public: /// @param str string to be parsed /// @param parser_type specifies expected content (usually DHCP6 or generic JSON) /// @return Element structure representing parsed text. - isc::data::ConstElementPtr parseString(const std::string& str, - ParserType parser_type); + isc::data::ElementPtr parseString(const std::string& str, + ParserType parser_type); /// @brief Run the parser on the file specified. /// @@ -139,8 +142,8 @@ public: /// @param filename file to be parsed /// @param parser_type specifies expected content (usually DHCP6 or generic JSON) /// @return Element structure representing parsed text. - isc::data::ConstElementPtr parseFile(const std::string& filename, - ParserType parser_type); + isc::data::ElementPtr parseFile(const std::string& filename, + ParserType parser_type); /// @brief Error handler /// @@ -187,8 +190,7 @@ public: ///< Used while parsing content of Dhcp6. DHCP6, - // not yet DHCP4, - // not yet DHCP_DDNS, + // not yet Dhcp4, DhcpDdns, ///< Used while parsing content of Logging LOGGING, @@ -202,6 +204,9 @@ public: /// Used while parsing Dhcp6/hosts-database structures. HOSTS_DATABASE, + /// Used while parsing Dhcp6/*-database/type. + DATABASE_TYPE, + /// Used while parsing Dhcp6/mac-sources structures. MAC_SOURCES, @@ -214,6 +219,9 @@ public: /// Used while parsing Dhcp6/Subnet6 structures. SUBNET6, + /// Used while parsing Dhcp6/Subnet6/reservation-mode. + RESERVATION_MODE, + /// Used while parsing Dhcp6/option-def structures. OPTION_DEF, @@ -225,9 +233,15 @@ public: /// Used while parsing Dhcp6/client-classes structures. CLIENT_CLASSES, + /// Used while parsing Dhcp6/expired-leases-processing. + EXPIRED_LEASES_PROCESSING, + /// Used while parsing Dhcp6/server-id structures. SERVER_ID, + /// Used while parsing Dhcp6/server-id/type structures. + DUID_TYPE, + /// Used while parsing Dhcp6/control-socket structures. CONTROL_SOCKET, @@ -250,7 +264,20 @@ public: LOGGERS, /// Used while parsing Logging/loggers/output_options structures. - OUTPUT_OPTIONS + OUTPUT_OPTIONS, + + /// Used while parsing Dhcp6/dhcp-ddns. + DHCP_DDNS, + + /// Used while parsing Dhcp6/dhcp-ddns/ncr-protocol + NCR_PROTOCOL, + + /// Used while parsing Dhcp6/dhcp-ddns/ncr-format + NCR_FORMAT, + + /// Used while parsing Dhcp6/dhcp-ddns/replace-client-name. + REPLACE_CLIENT_NAME + } ParserContext; /// @brief File name @@ -303,7 +330,7 @@ public: /// @throw isc::Unexpected if unbalanced void leave(); - /// @brief Get the syntactix context name + /// @brief Get the syntactic context name /// /// @return printable name of the context. const std::string contextName(); @@ -312,7 +339,7 @@ public: /// @brief Flag determining scanner debugging. bool trace_scanning_; - /// @brief Flag determing parser debugging. + /// @brief Flag determining parser debugging. bool trace_parsing_; /// @brief Syntactic context stack @@ -321,7 +348,7 @@ public: /// @brief Common part of parseXXX /// /// @return Element structure representing parsed text. - isc::data::ConstElementPtr parseCommon(); + isc::data::ElementPtr parseCommon(); }; }; // end of isc::eval namespace |