|
@@ -58,10 +58,6 @@ public:
|
|
class AllocEngine : public boost::noncopyable {
|
|
class AllocEngine : public boost::noncopyable {
|
|
protected:
|
|
protected:
|
|
|
|
|
|
- /// @name Declaration of the allocator classes.
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief base class for all address/prefix allocation algorithms
|
|
/// @brief base class for all address/prefix allocation algorithms
|
|
///
|
|
///
|
|
/// This is an abstract class that should not be used directly, but rather
|
|
/// This is an abstract class that should not be used directly, but rather
|
|
@@ -211,12 +207,6 @@ public:
|
|
ALLOC_RANDOM // random - an address is randomly selected
|
|
ALLOC_RANDOM // random - an address is randomly selected
|
|
} AllocType;
|
|
} AllocType;
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
- /// @name Construction, destruction and allocator.
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief Constructor.
|
|
/// @brief Constructor.
|
|
///
|
|
///
|
|
/// Instantiates necessary services, required to run DHCP server.
|
|
/// Instantiates necessary services, required to run DHCP server.
|
|
@@ -240,14 +230,8 @@ public:
|
|
/// @return pointer to allocator handling a given resource types
|
|
/// @return pointer to allocator handling a given resource types
|
|
AllocatorPtr getAllocator(Lease::Type type);
|
|
AllocatorPtr getAllocator(Lease::Type type);
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
private:
|
|
private:
|
|
|
|
|
|
- /// @name Private members, common for DHCPv4 and DHCPv6 service.
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief a pointer to currently used allocator
|
|
/// @brief a pointer to currently used allocator
|
|
///
|
|
///
|
|
/// For IPv4, there will be only one allocator: TYPE_V4
|
|
/// For IPv4, there will be only one allocator: TYPE_V4
|
|
@@ -261,14 +245,8 @@ private:
|
|
int hook_index_lease4_select_; ///< index for lease4_select hook
|
|
int hook_index_lease4_select_; ///< index for lease4_select hook
|
|
int hook_index_lease6_select_; ///< index for lease6_select hook
|
|
int hook_index_lease6_select_; ///< index for lease6_select hook
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
public:
|
|
public:
|
|
|
|
|
|
- /// @name Public method, structure and types for DHCPv6 leass allocation.
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief Defines a single hint (an address + prefix-length).
|
|
/// @brief Defines a single hint (an address + prefix-length).
|
|
///
|
|
///
|
|
/// This is an entry that represents what the client had requested,
|
|
/// This is an entry that represents what the client had requested,
|
|
@@ -524,14 +502,8 @@ public:
|
|
Lease6Collection
|
|
Lease6Collection
|
|
renewLeases6(ClientContext6& ctx);
|
|
renewLeases6(ClientContext6& ctx);
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
private:
|
|
private:
|
|
|
|
|
|
- /// @name Private methods for DHCPv6 leases allocation
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief creates a lease and inserts it in LeaseMgr if necessary
|
|
/// @brief creates a lease and inserts it in LeaseMgr if necessary
|
|
///
|
|
///
|
|
/// Creates a lease based on specified parameters and tries to insert it
|
|
/// Creates a lease based on specified parameters and tries to insert it
|
|
@@ -689,14 +661,8 @@ private:
|
|
/// @param lease IPv6 lease to be extended.
|
|
/// @param lease IPv6 lease to be extended.
|
|
void extendLease6(ClientContext6& ctx, Lease6Ptr lease);
|
|
void extendLease6(ClientContext6& ctx, Lease6Ptr lease);
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
public:
|
|
public:
|
|
|
|
|
|
- /// @name Public method and structure for DHCPv4 lease allocation.
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief Context information for the DHCPv4 lease allocation.
|
|
/// @brief Context information for the DHCPv4 lease allocation.
|
|
///
|
|
///
|
|
/// This structure holds a set of information provided by the DHCPv4
|
|
/// This structure holds a set of information provided by the DHCPv4
|
|
@@ -890,14 +856,8 @@ public:
|
|
const isc::hooks::CalloutHandlePtr& callout_handle,
|
|
const isc::hooks::CalloutHandlePtr& callout_handle,
|
|
Lease4Ptr& old_lease);
|
|
Lease4Ptr& old_lease);
|
|
|
|
|
|
- //@}
|
|
|
|
-
|
|
|
|
private:
|
|
private:
|
|
|
|
|
|
- /// @name Private methods for DHCPv4 lease allocation
|
|
|
|
- ///
|
|
|
|
- //@{
|
|
|
|
-
|
|
|
|
/// @brief Offers the lease.
|
|
/// @brief Offers the lease.
|
|
///
|
|
///
|
|
/// This method is called by the @c AllocEngine::allocateLease4 when
|
|
/// This method is called by the @c AllocEngine::allocateLease4 when
|
|
@@ -1090,8 +1050,6 @@ private:
|
|
/// client and its message.
|
|
/// client and its message.
|
|
void updateLease4Information(const Lease4Ptr& lease,
|
|
void updateLease4Information(const Lease4Ptr& lease,
|
|
ClientContext4& ctx) const;
|
|
ClientContext4& ctx) const;
|
|
-
|
|
|
|
- //@}
|
|
|
|
};
|
|
};
|
|
|
|
|
|
}; // namespace isc::dhcp
|
|
}; // namespace isc::dhcp
|