Kea
1.9.9-git
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
cfg_consistency.h
Go to the documentation of this file.
1
// Copyright (C) 2018-2019 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_CONSISTENCY_H
8
#define CFG_CONSISTENCY_H
9
10
#include <
cc/cfg_to_element.h
>
11
#include <
cc/user_context.h
>
12
13
namespace
isc
{
14
namespace
dhcp {
15
16
19
class
CfgConsistency
:
public
isc::data::UserContext
,
public
isc::data::CfgToElement
{
20
21
public
:
22
24
enum
LeaseSanity
{
25
LEASE_CHECK_NONE
,
// Skip sanity checks
26
LEASE_CHECK_WARN
,
// Print a warning if subnet-id is incorrect.
27
LEASE_CHECK_FIX
,
// If subnet-id is incorrect, try to fix it (try to pick
28
// appropriate subnet, but if it fails, keep the lease,
29
// despite its broken subnet-id.
30
LEASE_CHECK_FIX_DEL
,
// If subnet-id is incorrect, try to fix it (try to pick
31
// appropriate subnet. If it fails, delete broken lease.
32
LEASE_CHECK_DEL
// Delete leases with invalid subnet-id.
33
};
34
36
CfgConsistency
()
37
: lease_sanity_check_(
LEASE_CHECK_NONE
) {
38
39
}
40
44
virtual
isc::data::ElementPtr
toElement
()
const
;
45
49
void
setLeaseSanityCheck
(
LeaseSanity
l) {
50
lease_sanity_check_ = l;
51
}
52
56
LeaseSanity
getLeaseSanityCheck
()
const
{
57
return
(lease_sanity_check_);
58
}
59
63
static
std::string
sanityCheckToText
(
LeaseSanity
check_type);
64
65
private
:
66
68
LeaseSanity
lease_sanity_check_;
69
};
70
72
typedef
boost::shared_ptr<CfgConsistency>
CfgConsistencyPtr
;
73
74
};
// namespace isc::dhcp
75
};
// namespace isc
76
77
#endif
/* CFG_CONSISTENCY_H */
isc::dhcp::CfgConsistency::LEASE_CHECK_FIX_DEL
Definition:
cfg_consistency.h:30
isc::data::UserContext
Base class for user context.
Definition:
user_context.h:22
cfg_to_element.h
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition:
data.h:20
isc::dhcp::CfgConsistency::LEASE_CHECK_NONE
Definition:
cfg_consistency.h:25
isc::dhcp::CfgConsistencyPtr
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
Definition:
cfg_consistency.h:72
isc::dhcp::CfgConsistency::setLeaseSanityCheck
void setLeaseSanityCheck(LeaseSanity l)
Sets specific sanity checks mode for leases.
Definition:
cfg_consistency.h:49
isc::dhcp::CfgConsistency::LeaseSanity
LeaseSanity
Values for subnet-id sanity checks done for leases.
Definition:
cfg_consistency.h:24
isc::dhcp::CfgConsistency
Parameters for various consistency checks.
Definition:
cfg_consistency.h:19
isc::dhcp::CfgConsistency::LEASE_CHECK_DEL
Definition:
cfg_consistency.h:32
isc::dhcp::CfgConsistency::toElement
virtual isc::data::ElementPtr toElement() const
Returns JSON representation.
Definition:
cfg_consistency.cc:17
isc::data::CfgToElement
Abstract class for configuration Cfg_* classes.
Definition:
cfg_to_element.h:29
isc::dhcp::CfgConsistency::LEASE_CHECK_FIX
Definition:
cfg_consistency.h:27
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:143
isc::dhcp::CfgConsistency::getLeaseSanityCheck
LeaseSanity getLeaseSanityCheck() const
Returns specific sanity checks mode for leases.
Definition:
cfg_consistency.h:56
isc::dhcp::CfgConsistency::sanityCheckToText
static std::string sanityCheckToText(LeaseSanity check_type)
Converts sanity check value to printable text.
Definition:
cfg_consistency.cc:25
user_context.h
isc::dhcp::CfgConsistency::CfgConsistency
CfgConsistency()
Constructor.
Definition:
cfg_consistency.h:36
isc::dhcp::CfgConsistency::LEASE_CHECK_WARN
Definition:
cfg_consistency.h:26
src
lib
dhcpsrv
cfg_consistency.h
Generated on Wed Sep 15 2021 10:48:28 for Kea by
1.8.9.1