Kea  1.5.0
sanity_checker.h
Go to the documentation of this file.
1 // Copyright (C) 2018 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 SANITY_CHECKER_H
8 #define SANITY_CHECKER_H
9 
10 #include <dhcpsrv/lease.h>
12 
13 namespace isc {
14 namespace dhcp {
15 
22  public:
23 
33  void checkLease(Lease4Ptr& lease, bool current = true);
34 
44  void checkLease(Lease6Ptr& lease, bool current = true);
45 
46  private:
47 
57  template<typename LeaseType, typename SubnetsType>
58  void checkLeaseInternal(LeaseType& lease, const CfgConsistencyPtr& checks,
59  const SubnetsType& subnets);
60 
68  template<typename LeaseType, typename SubnetsType>
69  SubnetID findSubnetId(const LeaseType& lease, const SubnetsType& subnets);
70 };
71 
72 
73 };
74 };
75 
76 
77 #endif /* SANITY_CHECKER_H */
isc::dhcp::Lease4Ptr
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition: lease.h:245
isc::dhcp::Lease6Ptr
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
Definition: lease.h:460
cfg_consistency.h
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::dhcp::CfgConsistencyPtr
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
Definition: cfg_consistency.h:72
isc::dhcp::SanityChecker
Code used to conduct various sanity checks.
Definition: sanity_checker.h:21
isc::dhcp::SanityChecker::checkLease
void checkLease(Lease4Ptr &lease, bool current=true)
Sanity checks and possibly corrects an IPv4 lease.
Definition: sanity_checker.cc:16
isc::dhcp::SubnetID
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24
lease.h