20#include <boost/make_shared.hpp>
21#include <boost/shared_ptr.hpp>
41 : keywords_(keywords) {
68 : keywords_(keywords), list_keywords_(list_keywords) {
100 : address_family_(address_family) {
114 uint16_t address_family_;
134 : address_family_(address_family) {
156 bool skip_keywords =
false);
160 uint16_t address_family_;
328 virtual boost::shared_ptr<OptionDataParser>
356 : address_family_(address_family) {
366 std::pair<asiolink::IOAddress, asiolink::IOAddress>
371 uint16_t address_family_;
379template<
typename PoolParser>
406 virtual boost::shared_ptr<OptionDataListParser>
408 auto parser = boost::make_shared<CBOptionDataListParser>(address_family,
437template<
typename PoolsListParser,
typename PoolParser>
501 virtual boost::shared_ptr<OptionDataListParser>
533 virtual boost::shared_ptr<PdPoolParser>
562 std::pair<asiolink::IOAddress, uint8_t>
608 : address_family_(address_family) {
627 uint16_t address_family_;
665 virtual boost::shared_ptr<OptionDataListParser>
671 virtual boost::shared_ptr<dhcp::PoolsListParser>
718 virtual boost::shared_ptr<OptionDataListParser>
724 virtual boost::shared_ptr<dhcp::PoolsListParser>
730 virtual boost::shared_ptr<dhcp::PdPoolsListParser>
764 virtual boost::shared_ptr<Subnet4ConfigParser>
798 virtual boost::shared_ptr<Subnet6ConfigParser>
869 virtual boost::shared_ptr<OptionDataListParser>
876 virtual boost::shared_ptr<Subnets4ListConfigParser>
916 virtual boost::shared_ptr<OptionDataListParser>
923 virtual boost::shared_ptr<Subnets6ListConfigParser>
956 virtual boost::shared_ptr<OptionDataListParser>
1002 std::pair<dhcp::ClientClassDefPtr, std::string>
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser(const uint16_t address_family, CfgOptionDefPtr cfg_option_def) const
Returns an instance of the CBOptionDataListParser.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
CBClientClassDefParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
Implements a parser for a client class name.
std::string parse(data::ConstElementPtr client_class)
Parses a client class name.
CBClientClassParser(uint16_t family, CfgOptionDefPtr cfg_option_def, db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
std::pair< dhcp::ClientClassDefPtr, std::string > parse(data::ConstElementPtr client_class)
Parses a client class.
virtual boost::shared_ptr< OptionDataParser > createOptionDataParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing options.
CBOptionDataListParser(const uint16_t address_family, CfgOptionDefPtr cfg_option_def, db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
virtual dhcp::OptionDefinitionPtr findOptionDefinition(const std::string &option_space, const util::Optional< uint32_t > &option_code, const util::Optional< std::string > &option_name) const
Finds an option definition within an option space.
db::BackendSelector & backend_selector_
Backend selector to be used to fetch option definitions during option data parsing.
db::ServerSelector & server_selector_
Server selector to be used to fetch option definitions during option data parsing.
CBOptionDataParser(const uint16_t address_family, dhcp::CfgOptionDefPtr cfg_option_def, db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
CBOptionDefDeleteParser(const uint16_t address_family)
Constructor.
CBOptionDefDelete parse(data::ConstElementPtr option)
Parses an option into code + space pair.
CBOptionDefParser(const uint16_t address_family)
Constructor.
dhcp::OptionDefinitionPtr parse(data::ConstElementPtr option_def)
Parses an option definition.
virtual ~CBOptionPairParser()
Destructor.
CBOptionPairParser(const uint16_t address_family)
Constructor.
std::pair< uint16_t, std::string > parse(data::ConstElementPtr option, bool skip_keywords=false)
Parses an option into code + space pair.
CBOptionTuple parse(data::ConstElementPtr option)
Parses an option into code + space pair.
CBOptionTupleParser(const uint16_t address_family)
Constructor.
CBPdPoolParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing the option-data structure.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
Implements a parser for a prefix delegation pool prefix.
std::pair< asiolink::IOAddress, uint8_t > parse(data::ConstElementPtr pd_pool)
Parses a prefix delegation pool prefix.
virtual boost::shared_ptr< PdPoolParser > createPdPoolConfigParser() const
Returns an instance of the CBPdPoolParser to be used in parsing the prefix delegation pools.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
CBPdPoolsListParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
Overrides the default address pool parsers to use CB specific option data parsers.
db::BackendSelector & backend_selector_
db::ServerSelector & server_selector_
CBPoolParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser(const uint16_t address_family) const
Returns an instance of the OptionDataListParser to be used in parsing the option-data structure.
CBPoolRangeParser(const uint16_t address_family)
Constructor.
std::pair< asiolink::IOAddress, asiolink::IOAddress > parse(data::ConstElementPtr pool)
Parses an address pool range.
Overrides the default address pool list parsers to use CB specific option data parsers.
db::ServerSelector & server_selector_
db::BackendSelector & backend_selector_
virtual boost::shared_ptr< dhcp::PoolParser > createPoolConfigParser() const
Returns an instance of the CBPool4Parser to be used in parsing the address pools.
CBPoolsListParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
CBSharedNetwork4Parser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
dhcp::SharedNetwork4Ptr parse(data::ConstElementPtr shared_network)
Parses a single IPv4 shared network configuration.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing the option-data structure.
virtual boost::shared_ptr< Subnets4ListConfigParser > createSubnetsListParser() const
Returns an instance of the CBSubnets4ListConfigParser to be used for parsing the subnets within the s...
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing the option-data structure.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
CBSharedNetwork6Parser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
dhcp::SharedNetwork6Ptr parse(data::ConstElementPtr shared_network)
Parses a single IPv6 shared network configuration.
virtual boost::shared_ptr< Subnets6ListConfigParser > createSubnetsListParser() const
Returns an instance of the CBSubnets6ListConfigParser to be used for parsing the subnets within the s...
Implements a parser for a shared network name.
std::string parse(data::ConstElementPtr shared_network)
Parses a shared network name.
dhcp::Subnet4Ptr parse(data::ConstElementPtr subnet)
Parses a single subnet configuration.
db::BackendSelector & backend_selector_
Backend selector used for fetching option definitions during option data parsing.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing the option-data structure.
virtual boost::shared_ptr< dhcp::PoolsListParser > createPoolsListParser() const
Returns an instance of the CBPools4ListParser.
db::ServerSelector & server_selector_
Server selector used for fetching option definitions during option data parsing.
CBSubnet4ConfigParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
dhcp::Subnet6Ptr parse(data::ConstElementPtr subnet)
Parses a single subnet configuration.
virtual boost::shared_ptr< OptionDataListParser > createOptionDataListParser() const
Returns an instance of the CBOptionDataListParser to be used in parsing the option-data structure.
virtual boost::shared_ptr< dhcp::PoolsListParser > createPoolsListParser() const
Returns an instance of the CBPools6ListParser.
CBSubnet6ConfigParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::ServerSelector & server_selector_
Server selector used for fetching option definitions during option data parsing.
db::BackendSelector & backend_selector_
Backend selector used for fetching option definitions during option data parsing.
virtual boost::shared_ptr< dhcp::PdPoolsListParser > createPdPoolsListParser() const
Returns an instance of the CBPdPoolsListParser.
Implements a parser for a subnet id.
dhcp::SubnetID parse(data::ConstElementPtr subnet)
Parses a subnet id.
CBSubnetPrefixParser(const uint16_t address_family)
Constructor.
std::string parse(data::ConstElementPtr subnet)
Parses a subnet prefix.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
CBSubnets4ListConfigParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
virtual boost::shared_ptr< Subnet4ConfigParser > createSubnetConfigParser() const
Returns an instance of the CBSubnet4ConfigParser to be used in parsing the subnets.
db::ServerSelector & server_selector_
Server selector used to fetch option definitions during option data parsing.
db::BackendSelector & backend_selector_
Backend selector used to fetch option definitions during option data parsing.
virtual boost::shared_ptr< Subnet6ConfigParser > createSubnetConfigParser() const
Returns an instance of the CBSubnet6ConfigParser to be used in parsing the subnets.
CBSubnets6ListConfigParser(db::BackendSelector &backend_selector, db::ServerSelector &server_selector)
Constructor.
GlobalParameterNameParser(const data::SimpleKeywords &keywords)
Constructor.
std::string parse(data::ConstElementPtr global_parameter)
Parses global parameter name.
GlobalParameterParser(const data::SimpleKeywords &keywords, const data::SimpleKeywords &list_keywords)
Constructor.
data::StampedValueCollection parse(const data::ConstElementPtr &global_parameter_data)
Parses global parameters information.
Implements parser for a server configuration.
db::ServerPtr parse(data::ConstElementPtr server)
Parses a single server configuration.
Implements parser for a server tag.
data::ServerTag parse(data::ConstElementPtr server)
Parses server tag.
Server selector for associating objects in a database with specific servers.
Parser for a single client class definition.
Parser for option data values within a subnet.
Parser for option data value.
PdPoolParser()
Constructor.
Parser for a list of prefix delegation pools.
parser for a single pool definition
Parser for a list of pools.
Implements parser for IPv4 shared networks.
Implements parser for IPv6 shared networks.
Subnet4ConfigParser(bool check_iface=true)
Constructor.
Subnet6ConfigParser(bool check_iface=true)
Constructor.
this class parses list of DHCP4 subnets
this class parses a list of DHCP6 subnets
A template representing an optional value.
Defines classes for storing client class definitions.
Parsers for client class definitions.
CBPoolParser< dhcp::Pool4Parser > CBPool4Parser
Specialization of the CBPoolParser class for DHCPv4.
CBPoolParser< dhcp::Pool6Parser > CBPool6Parser
Specialization of the CBPoolParser class for DHCPv6.
std::tuple< uint16_t, std::string, ClientClassesPtr > CBOptionTuple
Defines a tuple for the three values that may be used as a key for an option.
CBPoolsListParser< dhcp::Pools4ListParser, CBPool4Parser > CBPools4ListParser
Specialization of the CBPoolsListParser class for DHCPv4.
std::tuple< uint16_t, std::string, bool > CBOptionDefDelete
Defines a tuple of values for deleting an option definition: the option code, option space,...
CBPoolsListParser< dhcp::Pools6ListParser, CBPool6Parser > CBPools6ListParser
Specialization of the CBPoolsListParser class for DHCPv6.
std::vector< std::string > SimpleRequiredKeywords
This specifies all required keywords.
boost::multi_index_container< StampedValuePtr, boost::multi_index::indexed_by< boost::multi_index::hashed_non_unique< boost::multi_index::tag< StampedValueNameIndexTag >, boost::multi_index::const_mem_fun< StampedValue, std::string, &StampedValue::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StampedValueModificationTimeIndexTag >, boost::multi_index::const_mem_fun< BaseStampedElement, boost::posix_time::ptime, &BaseStampedElement::getModificationTime > > > > StampedValueCollection
Multi index container for StampedValue.
boost::shared_ptr< const Element > ConstElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
boost::shared_ptr< SharedNetwork6 > SharedNetwork6Ptr
Pointer to SharedNetwork6 object.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
boost::shared_ptr< SharedNetwork4 > SharedNetwork4Ptr
Pointer to SharedNetwork4 object.
Defines the logger used by the top-level component of kea-lfc.