Kea  1.5.0
isc::dhcp::AllocEngine::RandomAllocator Class Reference

Random allocator that picks address randomly. More...

#include <alloc_engine.h>

+ Inheritance diagram for isc::dhcp::AllocEngine::RandomAllocator:

Public Member Functions

 RandomAllocator (Lease::Type type)
 default constructor (does nothing) More...
 
virtual isc::asiolink::IOAddress pickAddress (const SubnetPtr &subnet, const ClientClasses &client_classes, const DuidPtr &duid, const isc::asiolink::IOAddress &hint)
 returns a random address from pool of specified subnet More...
 
- Public Member Functions inherited from isc::dhcp::AllocEngine::Allocator
 Allocator (Lease::Type pool_type)
 Default constructor. More...
 
virtual ~Allocator ()
 virtual destructor More...
 

Additional Inherited Members

- Protected Attributes inherited from isc::dhcp::AllocEngine::Allocator
Lease::Type pool_type_
 defines pool type allocation More...
 

Detailed Description

Random allocator that picks address randomly.

Todo:
: This is a skeleton class for now and is missing an implementation.

Definition at line 203 of file alloc_engine.h.

Constructor & Destructor Documentation

◆ RandomAllocator()

isc::dhcp::AllocEngine::RandomAllocator::RandomAllocator ( Lease::Type  type)

default constructor (does nothing)

Parameters
type- specifies allocation type

Definition at line 301 of file alloc_engine.cc.

References isc_throw.

Member Function Documentation

◆ pickAddress()

isc::asiolink::IOAddress isc::dhcp::AllocEngine::RandomAllocator::pickAddress ( const SubnetPtr subnet,
const ClientClasses client_classes,
const DuidPtr duid,
const isc::asiolink::IOAddress hint 
)
virtual

returns a random address from pool of specified subnet

Todo:
: Implement this method
Parameters
subnetan address will be picked from pool of that subnet
client_classeslist of classes client belongs to
duidClient's DUID (ignored)
hintthe last address that was picked (ignored)
Returns
a random address from the pool

Implements isc::dhcp::AllocEngine::Allocator.

Definition at line 308 of file alloc_engine.cc.

References isc_throw.


The documentation for this class was generated from the following files: