7 #ifndef CONFIG_BACKEND_POOL_DHCP4_H
8 #define CONFIG_BACKEND_POOL_DHCP4_H
22 #include <boost/date_time/posix_time/ptime.hpp>
44 const std::string& subnet_prefix)
const;
75 const boost::posix_time::ptime& modification_time)
const;
87 const std::string& shared_network_name)
const;
98 const std::string& name)
const;
120 const boost::posix_time::ptime& modification_time)
const;
133 const std::string& space)
const;
156 const boost::posix_time::ptime& modification_time)
const;
170 const std::string& space)
const;
192 const boost::posix_time::ptime& modification_time)
const;
203 const std::string& name)
const;
222 const boost::posix_time::ptime& modification_time)
const;
237 const boost::posix_time::ptime& modification_time,
238 const uint64_t& modification_id)
const;
310 const std::string& shared_network_name,
368 const std::string& subnet_prefix);
400 const std::string& shared_network_name);
411 const std::string& name);
433 const std::string& space);
455 const std::string& space);
468 const std::string& shared_network_name,
470 const std::string& space);
485 const uint16_t code,
const std::string& space);
504 const std::string& space);
515 const std::string& name);
548 #endif // CONFIG_BACKEND_POOL_DHCP4_H
virtual uint64_t deleteAllSharedNetworks4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector)
Deletes all shared networks.
virtual OptionDescriptorPtr getOption4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const uint16_t code, const std::string &space) const
Retrieves single option by code and space.
virtual data::StampedValuePtr getGlobalParameter4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &name) const
Retrieves global parameter value.
boost::shared_ptr< OptionDescriptor > OptionDescriptorPtr
A pointer to option descriptor.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
virtual Subnet4Collection getAllSubnets4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector) const
Retrieves all subnets.
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
virtual SharedNetwork4Collection getAllSharedNetworks4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector) const
Retrieves all shared networks.
virtual uint64_t deleteAllServers4(const db::BackendSelector &backend_selector)
Deletes all servers from the backend except the logical server 'all'.
virtual uint64_t deleteAllGlobalParameters4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector)
Deletes all global parameters.
virtual Subnet4Ptr getSubnet4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &subnet_prefix) const
Retrieves a single subnet by subnet_prefix.
boost::multi_index_container< ServerPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ServerTagIndexTag >, boost::multi_index::const_mem_fun< Server, std::string,&Server::getServerTagAsText > > >> ServerCollection
Multi index container for Server.
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
virtual uint64_t deleteSharedNetwork4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &name)
Deletes shared network by name.
virtual db::AuditEntryCollection getRecentAuditEntries(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time, const uint64_t &modification_id) const
Retrieves the most recent audit entries.
virtual db::ServerCollection getAllServers4(const db::BackendSelector &backend_selector) const
Retrieves all servers from the particular backend.
virtual uint64_t deleteOptionDef4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const uint16_t code, const std::string &space)
Deletes option definition.
virtual uint64_t deleteAllOptionDefs4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector)
Deletes all option definitions.
virtual Subnet4Collection getModifiedSubnets4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const
Retrieves subnets modified after specified time.
boost::multi_index_container< OptionDefinitionPtr, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, uint16_t,&OptionDefinition::getCode > >, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, std::string,&OptionDefinition::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::StampedElement::getModificationTime > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< OptionIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t,&data::BaseStampedElement::getId > > >> OptionDefContainer
Multi index container for DHCP option definitions.
virtual uint64_t deleteSharedNetworkSubnets4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &shared_network_name)
Deletes all subnets belonging to a specified shared network.
virtual SharedNetwork4Collection getModifiedSharedNetworks4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const
Retrieves shared networks modified after specified time.
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID,&Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string,&Subnet::toText > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetServerIdIndexTag >, boost::multi_index::const_mem_fun< Network4, asiolink::IOAddress,&Network4::getServerId > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::BaseStampedElement::getModificationTime > > >> Subnet4Collection
A collection of Subnet4 objects.
virtual Subnet4Collection getSharedNetworkSubnets4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &shared_network_name) const
Retrieves all subnets belonging to a specified shared network.
virtual data::StampedValueCollection getModifiedGlobalParameters4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const
Retrieves global parameters modified after specified time.
virtual OptionDefContainer getModifiedOptionDefs4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const
Retrieves option definitions modified after specified time.
virtual uint64_t deleteServer4(const db::BackendSelector &backend_selector, const data::ServerTag &server_tag)
Deletes a server from the backend.
virtual uint64_t deleteGlobalParameter4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &name)
Deletes global parameter.
Server selector for associating objects in a database with specific servers.
virtual void createUpdateSubnet4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const Subnet4Ptr &subnet)
Creates or updates a subnet.
Base class for configuration backend pools.
boost::shared_ptr< SharedNetwork4 > SharedNetwork4Ptr
Pointer to SharedNetwork4 object.
virtual db::ServerPtr getServer4(const db::BackendSelector &backend_selector, const data::ServerTag &server_tag) const
Retrieves a server from the particular backend.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual OptionContainer getAllOptions4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector) const
Retrieves all global options.
virtual void createUpdateSharedNetwork4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const SharedNetwork4Ptr &shared_network)
Creates or updates a shared network.
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.
virtual OptionDefContainer getAllOptionDefs4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector) const
Retrieves all option definitions.
boost::multi_index_container< SharedNetwork4Ptr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< SharedNetworkRandomAccessIndexTag > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< SharedNetworkIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t,&data::BaseStampedElement::getId > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SharedNetworkNameIndexTag >, boost::multi_index::const_mem_fun< SharedNetwork4, std::string,&SharedNetwork4::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SharedNetworkServerIdIndexTag >, boost::multi_index::const_mem_fun< Network4, asiolink::IOAddress,&Network4::getServerId > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SharedNetworkModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::BaseStampedElement::getModificationTime > > >> SharedNetwork4Collection
Multi index container holding shared networks.
virtual void createUpdateOption4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const OptionDescriptorPtr &option)
Creates or updates global option.
boost::multi_index_container< OptionDescriptor, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_non_unique< KeyFromKeyExtractor< boost::multi_index::const_mem_fun< Option, uint16_t,&Option::getType >, boost::multi_index::member< OptionDescriptor, OptionPtr,&OptionDescriptor::option_ > > >, boost::multi_index::hashed_non_unique< boost::multi_index::member< OptionDescriptor, bool,&OptionDescriptor::persistent_ > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::BaseStampedElement::getModificationTime > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< OptionIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t,&data::BaseStampedElement::getId > > >> OptionContainer
Multi index container for DHCP option descriptors.
virtual SharedNetwork4Ptr getSharedNetwork4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &name) const
Retrieves shared network by name.
Implementation of the Configuration Backend Pool for DHCPv4.
virtual void createUpdateServer4(const db::BackendSelector &backend_selector, const db::ServerPtr &server)
Creates or updates a server.
virtual void createUpdateGlobalParameter4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const data::StampedValuePtr &value)
Creates or updates global string parameter.
virtual uint64_t deleteAllSubnets4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector)
Deletes all subnets.
virtual uint64_t deleteOption4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const uint16_t code, const std::string &space)
Deletes global option.
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
The IOAddress class represents an IP addresses (version agnostic)
virtual data::StampedValueCollection getAllGlobalParameters4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector) const
Retrieves all global parameters.
virtual OptionDefinitionPtr getOptionDef4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const uint16_t code, const std::string &space) const
Retrieves single option definition by code and space.
virtual OptionContainer getModifiedOptions4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const
Retrieves option modified after specified time.
virtual void createUpdateOptionDef4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const OptionDefinitionPtr &option_def)
Creates or updates an option definition.
boost::multi_index_container< AuditEntryPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryObjectTypeTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, std::string,&AuditEntry::getObjectType >, boost::multi_index::const_mem_fun< AuditEntry, AuditEntry::ModificationType,&AuditEntry::getModificationType > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< AuditEntryModificationTimeIdTag >, boost::multi_index::composite_key< AuditEntry, boost::multi_index::const_mem_fun< AuditEntry, boost::posix_time::ptime,&AuditEntry::getModificationTime >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t,&AuditEntry::getRevisionId > > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< AuditEntryObjectIdTag >, boost::multi_index::const_mem_fun< AuditEntry, uint64_t,&AuditEntry::getObjectId > > >> AuditEntryCollection
Multi index container holding AuditEntry instances.
virtual uint64_t deleteSubnet4(const db::BackendSelector &backend_selector, const db::ServerSelector &server_selector, const std::string &subnet_prefix)
Deletes subnet by prefix.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)