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
13namespace isc {
14namespace 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 */
Code used to conduct various sanity checks.
void checkLease(Lease4Ptr &lease, bool current=true)
Sanity checks and possibly corrects an IPv4 lease.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
Definition: lease.h:463
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition: lease.h:248
Defines the logger used by the top-level component of kea-dhcp-ddns.