 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef CONFIG_BACKEND_DHCP4_H
8 #define CONFIG_BACKEND_DHCP4_H
18 #include <boost/shared_ptr.hpp>
19 #include <boost/date_time/posix_time/ptime.hpp>
39 const std::string& subnet_prefix)
const = 0;
63 const boost::posix_time::ptime& modification_time)
const = 0;
72 const std::string& name)
const = 0;
90 const boost::posix_time::ptime& modification_time)
const = 0;
100 const std::string& space)
const = 0;
119 const boost::posix_time::ptime& modification_time)
const = 0;
130 const std::string& space)
const = 0;
148 const boost::posix_time::ptime& modification_time)
const = 0;
158 const std::string& name)
const = 0;
171 const boost::posix_time::ptime& modification_time)
const = 0;
213 const std::string& shared_network_name,
255 const std::string& subnet_prefix) = 0;
279 const std::string& name) = 0;
296 const std::string& space) = 0;
313 const std::string& space) = 0;
324 const std::string& shared_network_name,
326 const std::string& space) = 0;
338 const uint16_t code,
const std::string& space) = 0;
355 const std::string& space) = 0;
364 const std::string& name) = 0;
380 #endif // CONFIG_BACKEND_DHCP4_H
Interface implemented by DHCPv4 configuration backends.
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
virtual uint64_t deleteOptionDef4(const db::ServerSelector &server_selector, const uint16_t code, const std::string &space)=0
Deletes option definition.
virtual void createUpdateSharedNetwork4(const db::ServerSelector &server_selector, const SharedNetwork4Ptr &shared_network)=0
Creates or updates a shared network.
The IOAddress class represents an IP addresses (version agnostic)
boost::multi_index_container< SharedNetwork4Ptr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< SharedNetworkRandomAccessIndexTag > >, 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 > > >> SharedNetwork4Collection
Multi index container holding shared networks.
virtual Subnet4Ptr getSubnet4(const db::ServerSelector &server_selector, const std::string &subnet_prefix) const =0
Retrieves a single subnet by subnet_prefix.
virtual uint64_t deleteOption4(const db::ServerSelector &server_selector, const uint16_t code, const std::string &space)=0
Deletes global option.
virtual void createUpdateOption4(const db::ServerSelector &server_selector, const SubnetID &subnet_id, const OptionDescriptorPtr &option)=0
Creates or updates subnet level option.
virtual Subnet4Collection getAllSubnets4(const db::ServerSelector &server_selector) const =0
Retrieves all subnets.
boost::shared_ptr< ConfigBackendDHCPv4 > ConfigBackendDHCPv4Ptr
Shared pointer to the ConfigBackendDHCPv4 instance.
virtual Subnet4Ptr getSubnet4(const db::ServerSelector &server_selector, const SubnetID &subnet_id) const =0
Retrieves a single subnet by subnet identifier.
virtual uint64_t deleteOption4(const db::ServerSelector &selector, const std::string &shared_network_name, const uint16_t code, const std::string &space)=0
Deletes shared network level option.
virtual uint64_t deleteOption4(const db::ServerSelector &server_selector, const SubnetID &subnet_id, const uint16_t code, const std::string &space)=0
Deletes subnet level option.
virtual uint64_t deleteSubnet4(const db::ServerSelector &server_selector, const SubnetID &subnet_id)=0
Deletes subnet by identifier.
virtual uint64_t deleteAllGlobalParameters4(const db::ServerSelector &server_selector)=0
Deletes all global parameters.
virtual SharedNetwork4Ptr getSharedNetwork4(const db::ServerSelector &server_selector, const std::string &name) const =0
Retrieves shared network by name.
boost::shared_ptr< SharedNetwork4 > SharedNetwork4Ptr
Pointer to SharedNetwork4 object.
virtual void createUpdateOptionDef4(const db::ServerSelector &server_selector, const OptionDefinitionPtr &option_def)=0
Creates or updates an option definition.
virtual OptionDefContainer getModifiedOptionDefs4(const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const =0
Retrieves option definitions modified after specified time.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual void createUpdateOption4(const db::ServerSelector &server_selector, const asiolink::IOAddress &pool_start_address, const asiolink::IOAddress &pool_end_address, const OptionDescriptorPtr &option)=0
Creates or updates pool level option.
virtual uint64_t deleteOption4(const db::ServerSelector &server_selector, const asiolink::IOAddress &pool_start_address, const asiolink::IOAddress &pool_end_address, const uint16_t code, const std::string &space)=0
Deletes pool level option.
virtual Subnet4Collection getModifiedSubnets4(const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const =0
Retrieves subnets modified after specified time.
virtual OptionDefContainer getAllOptionDefs4(const db::ServerSelector &server_selector) const =0
Retrieves all option definitions.
Server selector for associating objects in a database with specific servers.
virtual SharedNetwork4Collection getModifiedSharedNetworks4(const db::ServerSelector &server_selector, const boost::posix_time::ptime &modification_time) const =0
Retrieves shared networks modified after specified time.
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_ > > >> OptionContainer
Multi index container for DHCP option descriptors.
virtual OptionContainer getModifiedOptions4(const db::ServerSelector &selector, const boost::posix_time::ptime &modification_time) const =0
Retrieves option modified after specified time.
virtual uint64_t deleteSharedNetwork4(const db::ServerSelector &server_selector, const std::string &name)=0
Deletes shared network by name.
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
virtual ~ConfigBackendDHCPv4()
Virtual destructor.
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 > > >> OptionDefContainer
Multi index container for DHCP option definitions.
virtual OptionContainer getAllOptions4(const db::ServerSelector &server_selector) const =0
Retrieves all global options.
virtual uint64_t deleteSubnet4(const db::ServerSelector &server_selector, const std::string &subnet_prefix)=0
Deletes subnet by prefix.
virtual void createUpdateOption4(const db::ServerSelector &selector, const std::string &shared_network_name, const OptionDescriptorPtr &option)=0
Creates or updates shared network level option.
virtual SharedNetwork4Collection getAllSharedNetworks4(const db::ServerSelector &server_selector) const =0
Retrieves all shared networks.
std::vector< StampedValuePtr > StampedValueCollection
Collection of pointers to values.
virtual data::StampedValueCollection getAllGlobalParameters4(const db::ServerSelector &selector) const =0
virtual uint64_t deleteAllSubnets4(const db::ServerSelector &server_selector)=0
Deletes all subnets.
virtual uint64_t deleteAllOptionDefs4(const db::ServerSelector &server_selector)=0
Deletes all option definitions.
virtual void createUpdateOption4(const db::ServerSelector &server_selector, const OptionDescriptorPtr &option)=0
Creates or updates global option.
virtual void createUpdateSubnet4(const db::ServerSelector &server_selector, const Subnet4Ptr &subnet)=0
Creates or updates a subnet.
virtual data::StampedValuePtr getGlobalParameter4(const db::ServerSelector &selector, const std::string &name) const =0
Retrieves global parameter value.
virtual uint64_t deleteAllSharedNetworks4(const db::ServerSelector &server_selector)=0
Deletes all shared networks.
boost::shared_ptr< StampedValue > StampedValuePtr
Pointer to the stamped value.
boost::shared_ptr< OptionDescriptor > OptionDescriptorPtr
A pointer to option descriptor.
virtual OptionDefinitionPtr getOptionDef4(const db::ServerSelector &server_selector, const uint16_t code, const std::string &space) const =0
Retrieves single option definition by code and space.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
virtual data::StampedValueCollection getModifiedGlobalParameters4(const db::ServerSelector &selector, const boost::posix_time::ptime &modification_time) const =0
Retrieves global parameters modified after specified time.
virtual OptionDescriptorPtr getOption4(const db::ServerSelector &server_selector, const uint16_t code, const std::string &space) const =0
Retrieves single option by code and space.
virtual void createUpdateGlobalParameter4(const db::ServerSelector &server_selector, const data::StampedValuePtr &value)=0
Creates or updates global parameter.
virtual uint64_t deleteGlobalParameter4(const db::ServerSelector &server_selector, const std::string &name)=0
Deletes global parameter.
Interface for Kea server specific configuration backend implementations.
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< SubnetRandomAccessIndexTag > >, 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 > > >> Subnet4Collection
A collection of Subnet4 objects.