summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-29 15:18:31 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-29 15:18:31 +0000
commit234fcf00f9cf9c0c959516e8e3379b43bde03d88 (patch)
tree4c1f1bcaf2cbd3da1a17d8ed5e1905c3316210f7
parentpretty anytun-showtables.cpp (diff)
networp prefix
-rw-r--r--networkPrefix.cpp4
-rw-r--r--networkPrefix.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/networkPrefix.cpp b/networkPrefix.cpp
index 5070dec..15b2af6 100644
--- a/networkPrefix.cpp
+++ b/networkPrefix.cpp
@@ -42,6 +42,10 @@ NetworkPrefix::NetworkPrefix(const NetworkAddress & src): NetworkAddress(src),le
{
}
+NetworkPrefix::NetworkPrefix(const NetworkPrefix & src): NetworkAddress(src),length_(src.length_)
+{
+}
+
void NetworkPrefix::setNetworkPrefixLength(uint8_t length )
{
length_ = length;
diff --git a/networkPrefix.h b/networkPrefix.h
index c4b589c..fac1b08 100644
--- a/networkPrefix.h
+++ b/networkPrefix.h
@@ -43,11 +43,14 @@ class NetworkPrefix : public NetworkAddress
public:
NetworkPrefix();
NetworkPrefix(const NetworkAddress &);
+ NetworkPrefix(const NetworkPrefix &);
void setNetworkPrefixLength(uint8_t length );
uint8_t getNetworkPrefixLength();
bool operator<(const NetworkPrefix &s) const;
private:
+ operator NetworkAddress();
+ void operator=(const NetworkPrefix &s);
uint8_t length_;
friend class boost::serialization::access;
template<class Archive>