summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/shared_network.h
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2017-08-31 13:57:10 +0200
committerMarcin Siodelski <marcin@isc.org>2017-08-31 13:57:10 +0200
commit47215e3743c0bc3c96f834e90f45f9ed0da1ad2a (patch)
tree6c38ab2f8eef2095cceb4e9b6fb37b3d1da8d83c /src/lib/dhcpsrv/shared_network.h
parent[5305] Added names to shared networks. (diff)
downloadkea-47215e3743c0bc3c96f834e90f45f9ed0da1ad2a.tar.xz
kea-47215e3743c0bc3c96f834e90f45f9ed0da1ad2a.zip
[5305] Basic toElement() data dump for shared network implemented.
Diffstat (limited to 'src/lib/dhcpsrv/shared_network.h')
-rw-r--r--src/lib/dhcpsrv/shared_network.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/dhcpsrv/shared_network.h b/src/lib/dhcpsrv/shared_network.h
index 854e615245..3fab2fc4f9 100644
--- a/src/lib/dhcpsrv/shared_network.h
+++ b/src/lib/dhcpsrv/shared_network.h
@@ -7,6 +7,7 @@
#ifndef SHARED_NETWORK_H
#define SHARED_NETWORK_H
+#include <cc/data.h>
#include <exceptions/exceptions.h>
#include <dhcpsrv/assignable_network.h>
#include <dhcpsrv/subnet.h>
@@ -245,7 +246,10 @@ protected:
return (*subnet_it);
}
-protected:
+ /// @brief Unparses shared network object.
+ ///
+ /// @return A pointer to unparsed shared network configuration.
+ virtual data::ElementPtr toElement() const;
/// @brief Holds a name of a shared network.
std::string name_;
@@ -322,6 +326,11 @@ public:
Subnet4Ptr getNextSubnet(const Subnet4Ptr& first_subnet,
const Subnet4Ptr& current_subnet) const;
+ /// @brief Unparses shared network object.
+ ///
+ /// @return A pointer to unparsed shared network configuration.
+ virtual data::ElementPtr toElement() const;
+
private:
/// @brief Collection of IPv4 subnets within shared network.
@@ -402,6 +411,11 @@ public:
Subnet6Ptr getNextSubnet(const Subnet6Ptr& first_subnet,
const Subnet6Ptr& current_subnet) const;
+ /// @brief Unparses shared network object.
+ ///
+ /// @return A pointer to unparsed shared network configuration.
+ virtual data::ElementPtr toElement() const;
+
private:
/// @brief Collection of IPv6 subnets within shared network.