simple_parser6.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright (C) 2016-2017 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. #ifndef SIMPLE_PARSER6_H
  7. #define SIMPLE_PARSER6_H
  8. #include <cc/simple_parser.h>
  9. namespace isc {
  10. namespace dhcp {
  11. /// @brief SimpleParser specialized for DHCPv6
  12. ///
  13. /// This class is a @ref isc::data::SimpleParser dedicated to DHCPv6 parser.
  14. /// In particular, it contains all the default values and names of the
  15. /// parameters that are to be derived (inherited) between scopes.
  16. /// For the actual values, see @file simple_parser6.cc
  17. class SimpleParser6 : public isc::data::SimpleParser {
  18. public:
  19. /// @brief Sets all defaults for DHCPv6 configuration
  20. ///
  21. /// This method sets global, option data and option definitions defaults.
  22. ///
  23. /// @param global scope to be filled in with defaults.
  24. /// @return number of default values added
  25. static size_t setAllDefaults(isc::data::ElementPtr global);
  26. /// @brief Derives (inherits) all parameters from global to more specific scopes.
  27. ///
  28. /// This method currently does the following:
  29. /// - derives global parameters to subnets (lifetimes for now)
  30. /// @param global scope to be modified if needed (subnet4 will be extracted)
  31. /// @return number of default values derived
  32. static size_t deriveParameters(isc::data::ElementPtr global);
  33. // see simple_parser6.cc for comments for those parameters
  34. static const isc::data::SimpleDefaults OPTION6_DEF_DEFAULTS;
  35. static const isc::data::SimpleDefaults OPTION6_DEFAULTS;
  36. static const isc::data::SimpleDefaults GLOBAL6_DEFAULTS;
  37. static const isc::data::SimpleDefaults SUBNET6_DEFAULTS;
  38. static const isc::data::ParamsList INHERIT_GLOBAL_TO_SUBNET6;
  39. };
  40. };
  41. };
  42. #endif