-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// Choose the basic (normal address) lease type
Lease::Type basic_type = ipv6 ? Lease::TYPE_NA : Lease::TYPE_V4;
- // Initalize normal address allocators
+ // Initialize normal address allocators
switch (engine_type) {
case ALLOC_ITERATIVE:
allocators_[basic_type] = AllocatorPtr(new IterativeAllocator(basic_type));
isc_throw(BadValue, "Invalid/unsupported allocation algorithm");
}
- // If this is IPv6 allocation engine, initalize also temporary addrs
+ // If this is IPv6 allocation engine, initialize also temporary addrs
// and prefixes
if (ipv6) {
switch (engine_type) {
// assign new leases
//
// We could implement those checks as nested ifs, but the performance
- // gain would be minimal and the code readibility loss would be substantial.
+ // gain would be minimal and the code readability loss would be substantial.
// Hence independent checks.
// Case 1: There are no leases and there's a reservation for this host.
if (!skipped) {
// Generate removal name change request for D2, if required.
- // This will return immediatelly if the DNS wasn't updated
+ // This will return immediately if the DNS wasn't updated
// when the lease was created.
queueNCR(CHG_REMOVE, lease);
-// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
bool isAllocated(const asiolink::IOAddress& prefix,
const uint8_t prefix_len = 128) const;
- /// @brief Conveniece function adding host identifier into
+ /// @brief Convenience function adding host identifier into
/// @ref host_identifiers_ list.
///
/// @param id_type Identifier type.
/// @brief Allocates IPv6 leases for a given IA container
///
- /// This method uses the currently selected allocator to pick allocatable
+ /// This method uses the currently selected allocator to pick allocable
/// resources (i.e. addresses or prefixes) from specified subnet, creates
/// a lease (one or more, if needed) for that resources and then inserts
/// it into LeaseMgr (if this allocation is not fake, i.e. this is not a
/// - executing "lease_expire6" hook,
/// - removing DNS record for a lease,
/// - reclaiming a lease in the database, i.e. setting its state to
- /// "expired-reclaimed" or removing it from the lease databse,
+ /// "expired-reclaimed" or removing it from the lease database,
/// - updating statistics of assigned and reclaimed leases
///
- /// Note: declined leases fall under the same expiration/reclaimation
+ /// Note: declined leases fall under the same expiration/reclamation
/// processing as normal leases. In principle, it would be more elegant
- /// to have a separate processing for declined leases reclaimation. However,
+ /// to have a separate processing for declined leases reclamation. However,
/// due to performance reasons we decided to use them together. Several
/// aspects were taken into consideration. First, normal leases are expected
/// to expire frequently, so in a typical deployment this method will have
/// entry, stats dump, hooks).
///
/// @param max_leases Maximum number of leases to be reclaimed.
- /// @param timeout Maximum amount of time that the reclaimation routine
+ /// @param timeout Maximum amount of time that the reclamation routine
/// may be processing expired leases, expressed in milliseconds.
/// @param remove_lease A boolean value indicating if the lease should
/// be removed when it is reclaimed (if true) or it should be left in the
/// - executing "lease_expire4" hook,
/// - removing DNS record for a lease,
/// - reclaiming a lease in the database, i.e. setting its state to
- /// "expired-reclaimed" or removing it from the lease databse,
+ /// "expired-reclaimed" or removing it from the lease database,
/// - updating statistics of assigned and reclaimed leases
///
- /// Note: declined leases fall under the same expiration/reclaimation
+ /// Note: declined leases fall under the same expiration/reclamation
/// processing as normal leases. In principle, it would be more elegant
- /// to have a separate processing for declined leases reclaimation. However,
+ /// to have a separate processing for declined leases reclamation. However,
/// due to performance reasons we decided to use them together. Several
/// aspects were taken into consideration. First, normal leases are expected
/// to expire frequently, so in a typical deployment this method will have
/// declined leases. They are always removed.
///
/// Also, for declined leases @ref reclaimDeclinedLease4 is
- /// called. It conductsseveral declined specific operation (extra log
+ /// called. It conducts several declined specific operation (extra log
/// entry, stats dump, hooks).
///
/// @param max_leases Maximum number of leases to be reclaimed.
- /// @param timeout Maximum amount of time that the reclaimation routine
+ /// @param timeout Maximum amount of time that the reclamation routine
/// may be processing expired leases, expressed in milliseconds.
/// @param remove_lease A boolean value indicating if the lease should
/// be removed when it is reclaimed (if true) or it should be left in the
ClientContext6& ctx,
uint8_t prefix_len);
- /// @brief Updates FQDN and Client's Last Tranmission Time for a collection
- /// of leases.
+ /// @brief Updates FQDN and Client's Last Transmission Time
+ /// for a collection of leases.
///
/// This method is executed when the server finds existing leases for a
/// client and updates some date for these leases if needed:
/// @brief Marks lease as reclaimed in the database.
///
- /// This method is called internally by the leases reclaimation routines.
+ /// This method is called internally by the leases reclamation routines.
/// Depending on the value of the @c remove_lease parameter this method
/// will delete the reclaimed lease from the database or set its sate
/// to "expired-reclaimed". In the latter case it will also clear the
/// @anchor reclaimDeclinedLease4
/// @brief Conducts steps necessary for reclaiming declined IPv4 lease.
///
- /// These are the additional steps required when recoving a declined lease:
+ /// These are the additional steps required when recovering a declined lease:
/// - bump decline recovered stat
/// - log lease recovery
/// - call lease4_recover hook
/// @anchor reclaimDeclinedLease6
/// @brief Conducts steps necessary for reclaiming declined IPv6 lease.
///
- /// These are the additional steps required when recoving a declined lease:
+ /// These are the additional steps required when recovering a declined lease:
/// - bump decline recovered stat
/// - log lease recovery
/// - call lease6_recover hook
/// received by the server.
IdentifierList host_identifiers_;
- /// @brief Conveniece function adding host identifier into
+ /// @brief Convenience function adding host identifier into
/// @ref host_identifiers_ list.
///
/// @param id_type Identifier type.
/// or just picking an address for DISCOVER that is not really
/// allocated (true)
/// @return allocated lease (or NULL in the unlikely case of the lease just
- /// becomed unavailable)
+ /// become unavailable)
Lease4Ptr createLease4(const ClientContext4& ctx,
const isc::asiolink::IOAddress& addr);
/// the new lease.
///
/// @param address Requested address for which the lease should be
- /// allocted.
+ /// allocated.
/// @param ctx Client context holding the data extracted from the
/// client's message.
///