From dd37bc54dae219e4d1975f014ec36c221ec4db20 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Mon, 22 Dec 2008 01:38:19 +0000 Subject: new routing system supports ipv4 and ipv6 routing with subnetting --- src/networkAddress.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/networkAddress.h') diff --git a/src/networkAddress.h b/src/networkAddress.h index 3eb0b51..f866cca 100644 --- a/src/networkAddress.h +++ b/src/networkAddress.h @@ -39,6 +39,11 @@ #include #include +#include + +typedef boost::array ethernet_bytes_type; +typedef boost::asio::ip::address_v4::bytes_type ipv4_bytes_type; +typedef boost::asio::ip::address_v6::bytes_type ipv6_bytes_type; enum network_address_type_t { @@ -62,6 +67,9 @@ public: network_address_type_t getNetworkAddressType() const; std::string toString() const; bool operator<(const NetworkAddress &s) const; + ipv4_bytes_type to_bytes_v4() const; + ipv6_bytes_type to_bytes_v6() const; + ethernet_bytes_type to_bytes_ethernet() const; protected: Mutex mutex_; boost::asio::ip::address_v4 ipv4_address_; -- cgit v1.2.3