| Kea 3.0.2-git

cfg_host_operations.h
Go to the documentation of this file.
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
7#ifndef CFG_HOST_OPERATIONS_H
8#define CFG_HOST_OPERATIONS_H
9
10#include <cc/cfg_to_element.h>
11#include <dhcpsrv/host.h>
12#include <boost/shared_ptr.hpp>
13#include <list>
14#include <string>
15
16 namespace isc {
17 namespace dhcp {
18
20 class CfgHostOperations;
21
23
24
25 typedef boost::shared_ptr<CfgHostOperations> CfgHostOperationsPtr;
26
28 typedef boost::shared_ptr<const CfgHostOperations>
29 ConstCfgHostOperationsPtr;
30
32
43 class CfgHostOperations : public isc::data::CfgToElement {
44 public:
45
47 typedef std::list<Host::IdentifierType> IdentifierTypes;
48
53 CfgHostOperations();
54
56
57
58 static CfgHostOperationsPtr createConfig4();
59
61 static CfgHostOperationsPtr createConfig6();
63
70 void addIdentifierType(const std::string& identifier_name);
71
74 const IdentifierTypes& getIdentifierTypes() const {
75 return (identifier_types_);
76 }
77
79 void clearIdentifierTypes();
80
84 virtual isc::data::ElementPtr toElement() const;
85
86 private:
87
90 IdentifierTypes identifier_types_;
91
92};
93
94}
95}
96
97#endif // CFG_HOST_OPERATIONS_H
cfg_to_element.h
isc::dhcp::CfgHostOperations
Represents global configuration for host reservations.
Definition cfg_host_operations.h:43
isc::dhcp::CfgHostOperations::createConfig6
static CfgHostOperationsPtr createConfig6()
Factory function for DHCPv6.
Definition cfg_host_operations.cc:36
isc::dhcp::CfgHostOperations::addIdentifierType
void addIdentifierType(const std::string &identifier_name)
Adds new identifier type to a collection of identifiers to be used by the server to search for host r...
Definition cfg_host_operations.cc:46
isc::dhcp::CfgHostOperations::clearIdentifierTypes
void clearIdentifierTypes()
Removes existing identifier types.
Definition cfg_host_operations.cc:57
isc::dhcp::CfgHostOperations::getIdentifierTypes
const IdentifierTypes & getIdentifierTypes() const
Returns const reference to ordered collection of identifiers to be used by the server to search for h...
Definition cfg_host_operations.h:74
isc::dhcp::CfgHostOperations::toElement
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Definition cfg_host_operations.cc:62
isc::dhcp::CfgHostOperations::CfgHostOperations
CfgHostOperations()
Constructor.
Definition cfg_host_operations.cc:19
isc::dhcp::CfgHostOperations::IdentifierTypes
std::list< Host::IdentifierType > IdentifierTypes
Type of the container holding ordered list of identifiers.
Definition cfg_host_operations.h:47
isc::dhcp::CfgHostOperations::createConfig4
static CfgHostOperationsPtr createConfig4()
Factory function for DHCPv4.
Definition cfg_host_operations.cc:24
host.h
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::dhcp::CfgHostOperationsPtr
boost::shared_ptr< CfgHostOperations > CfgHostOperationsPtr
Pointer to the Non-const object.
Definition cfg_host_operations.h:25
isc::dhcp::ConstCfgHostOperationsPtr
boost::shared_ptr< const CfgHostOperations > ConstCfgHostOperationsPtr
Pointer to the const object.
Definition cfg_host_operations.h:29
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
isc::data::CfgToElement
Abstract class for configuration Cfg_* classes.
Definition cfg_to_element.h:29