added new IPv4Address class
[libasyncio] / utils / asyncio_system_tools.hpp
index 5a4fb81..69c4a04 100644 (file)
@@ -22,7 +22,9 @@ on this file might be covered by the GNU General Public License.
  * @brief some functions to wrap some system functions
  *
  * @author Reinhard Pfau \<Reinhard.Pfau@gmx.de\>
+ *
  * @copyright &copy; Copyright 2009 by Intra2net AG
+ * @contact Intra2net Opensource Team \<opensource@intra2net.com\>
  */
 
 
@@ -100,6 +102,29 @@ class FileStat
 }; // end of FileStat
 
 
+/*
+ * IPv4 support
+ */
+
+class IPv4Address
+{
+    public:
+        IPv4Address();
+        IPv4Address( uint32_t _address );
+
+        bool is_valid() const {return m_valid;}
+
+        uint32_t get_address() const { return m_address; }
+
+        uint32_t get_address_nbo() const;
+
+    private:
+
+        uint32_t m_address;
+        bool m_valid;
+}; // end of IPv4Address
+
+
 } // end of namespace Utils
 } // end of namespace AsyncIo