summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/pool.h
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2013-09-10 20:39:04 +0200
committerTomek Mrugalski <tomasz@isc.org>2013-09-10 20:39:04 +0200
commit154fbc8f1d2a8de45de50799228a52585726d823 (patch)
tree8f88f3ad1cd9a759e0fc00fc314df6cae83e9a0d /src/lib/dhcpsrv/pool.h
parent[3150] PD support added to Pool6 (diff)
downloadkea-154fbc8f1d2a8de45de50799228a52585726d823.tar.xz
kea-154fbc8f1d2a8de45de50799228a52585726d823.zip
[3150] First part of prefix pool support
Diffstat (limited to 'src/lib/dhcpsrv/pool.h')
-rw-r--r--src/lib/dhcpsrv/pool.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/lib/dhcpsrv/pool.h b/src/lib/dhcpsrv/pool.h
index 6b587285cc..e63541d9f6 100644
--- a/src/lib/dhcpsrv/pool.h
+++ b/src/lib/dhcpsrv/pool.h
@@ -32,6 +32,25 @@ class Pool {
public:
+ /// @brief specifies Pool type
+ ///
+ /// Currently there are 3 pool types defined in DHCPv6:
+ /// - Non-temporary addresses (conveyed in IA_NA)
+ /// - Temporary addresses (conveyed in IA_TA)
+ /// - Delegated Prefixes (conveyed in IA_PD)
+ ///
+ /// The fourth one (TYPE_V4) is used in DHCPv4 use cases when getPool()
+ /// code is shared between v4 and v6 code.
+ ///
+ /// There is a new one being worked on (IA_PA, see draft-ietf-dhc-host-gen-id), but
+ /// support for it is not planned for now.
+ typedef enum {
+ TYPE_IA = 0,
+ TYPE_TA = 1,
+ TYPE_PD = 2,
+ TYPE_V4 = 3
+ } PoolType;
+
/// @brief returns Pool-id
///
/// @return pool-id value
@@ -127,20 +146,6 @@ typedef std::vector<Pool4Ptr> Pool4Collection;
class Pool6 : public Pool {
public:
- /// @brief specifies Pool type
- ///
- /// Currently there are 3 pool types defined in DHCPv6:
- /// - Non-temporary addresses (conveyed in IA_NA)
- /// - Temporary addresses (conveyed in IA_TA)
- /// - Delegated Prefixes (conveyed in IA_PD)
- /// There is a new one being worked on (IA_PA, see draft-ietf-dhc-host-gen-id), but
- /// support for it is not planned for now.
- typedef enum {
- TYPE_IA,
- TYPE_TA,
- TYPE_PD
- } Pool6Type;
-
/// @brief the constructor for Pool6 "min-max" style definition
///
/// @throw BadValue if PD is define (PD can be only prefix/len)
@@ -148,7 +153,7 @@ public:
/// @param type type of the pool (IA or TA)
/// @param first the first address in a pool
/// @param last the last address in a pool
- Pool6(Pool6Type type, const isc::asiolink::IOAddress& first,
+ Pool6(PoolType type, const isc::asiolink::IOAddress& first,
const isc::asiolink::IOAddress& last);
/// @brief the constructor for Pool6 "prefix/len" style definition
@@ -172,13 +177,13 @@ public:
/// @param prefix specifies prefix of the pool
/// @param prefix_len specifies prefix length of the pool
/// @param delegated_len specifies lenght of the delegated prefixes
- Pool6(Pool6Type type, const isc::asiolink::IOAddress& prefix,
+ Pool6(PoolType type, const isc::asiolink::IOAddress& prefix,
uint8_t prefix_len, uint8_t delegated_len = 128);
/// @brief returns pool type
///
/// @return pool type
- Pool6Type getType() const {
+ PoolType getType() const {
return (type_);
}
@@ -193,7 +198,7 @@ public:
private:
/// @brief defines a pool type
- Pool6Type type_;
+ PoolType type_;
/// @brief Defines prefix length (for TYPE_PD only)
uint8_t prefix_len_;