// those prefixes and remove those that we have already processed. We
// don't want to remove them from the context, so we need to copy them
// into temporary container.
- AllocEngine::ResourceContainer hints = ctx.currentIA().hints_;
+ AllocEngine::HintContainer hints = ctx.currentIA().hints_;
// For all leases we have now, add the IAADDR with non-zero lifetimes.
for (Lease6Collection::const_iterator l = leases.begin(); l != leases.end(); ++l) {
// Finally, if there are any addresses requested that we haven't dealt with
// already, inform the client that he can't have them.
- for (AllocEngine::ResourceContainer::const_iterator hint = hints.begin();
+ for (AllocEngine::HintContainer::const_iterator hint = hints.begin();
hint != hints.end(); ++hint) {
Option6IAAddrPtr iaaddr(new Option6IAAddr(D6O_IAADDR,
hint->first, 0, 0));
// those prefixes and remove those that we have already processed. We
// don't want to remove them from the context, so we need to copy them
// into temporary container.
- AllocEngine::ResourceContainer hints = ctx.currentIA().hints_;
+ AllocEngine::HintContainer hints = ctx.currentIA().hints_;
// For all the leases we have now, add the IAPPREFIX with non-zero lifetimes
for (Lease6Collection::const_iterator l = leases.begin(); l != leases.end(); ++l) {
// zero lifetimes
// Finally, if there are any addresses requested that we haven't dealt with
// already, inform the client that he can't have them.
- for (AllocEngine::ResourceContainer::const_iterator prefix = hints.begin();
+ for (AllocEngine::HintContainer::const_iterator prefix = hints.begin();
prefix != hints.end(); ++prefix) {
// Send the prefix with the zero lifetimes only if the prefix
// contains non-zero value. A zero value indicates that the hint was
#include <list>
#include <map>
+#include <set>
#include <utility>
namespace isc {
typedef std::pair<isc::asiolink::IOAddress, uint8_t> ResourceType;
/// @brief Container for client's hints.
- typedef std::vector<ResourceType> ResourceContainer;
+ typedef std::vector<ResourceType> HintContainer;
/// @brief A tuple holding host identifier type and value.
typedef std::pair<Host::IdentifierType, std::vector<uint8_t> > IdentifierPair;
///
/// There will typically be just one address, but the protocol
/// allows more than one address or prefix for each IA container.
- ResourceContainer hints_;
+ HintContainer hints_;
/// @brief Holds addresses or prefixes allocated for this IA.
- ResourceContainer allocated_resources_;
+ HintContainer allocated_resources_;
/// @brief A pointer to any old leases that the client had before
/// update but are no longer valid after the update/allocation.
AllocEngine engine(AllocEngine::ALLOC_ITERATIVE, 100);
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(IOAddress("2001:db8:1::15"), 128));
// Client should receive a lease.
AllocEngine engine(AllocEngine::ALLOC_ITERATIVE, 100);
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(IOAddress("2001:db8:1::15"), 128));
// Client should receive a lease.
ASSERT_EQ(1, leases.size());
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(leases[0]->addr_, 128));
Lease6Collection renewed = renewTest(engine, pool_, hints, true);
ASSERT_EQ("2001:db8:1::1c", leases[0]->addr_.toText());
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(leases[0]->addr_, 128));
Lease6Collection renewed = renewTest(engine, pool_, hints, true);
ASSERT_NE("2001:db8:1::1c", leases[0]->addr_.toText());
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(leases[0]->addr_, 128));
// Create reservation for the client. This is in-pool reservation,
ASSERT_EQ(1, leases.size());
// This is what the client will send in his renew message.
- AllocEngine::ResourceContainer hints;
+ AllocEngine::HintContainer hints;
hints.push_back(make_pair(leases[0]->addr_, 128));
// Create reservation for this address, but for another client.
Lease6Collection
AllocEngine6Test::renewTest(AllocEngine& engine, const Pool6Ptr& pool,
- AllocEngine::ResourceContainer& hints,
+ AllocEngine::HintContainer& hints,
bool in_pool) {
Lease::Type type = pool->getType();
/// @param in_pool specifies whether the lease is expected to be in pool
/// @return allocated lease(s) (may be empty)
Lease6Collection renewTest(AllocEngine& engine, const Pool6Ptr& pool,
- AllocEngine::ResourceContainer& hints,
+ AllocEngine::HintContainer& hints,
bool in_pool = true);
/// @brief Checks if the address allocation with a hint that is in range,