summaryrefslogtreecommitdiff
path: root/src/deviceConfig.hpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-05-09 20:27:25 +0000
committerChristian Pointner <equinox@anytun.org>2008-05-09 20:27:25 +0000
commitc8406ea5512784dbdc96636e1fd36ba4d81cd1c5 (patch)
treea0b2ad2740b1ed39200e88fa3ced672fd7c9e72b /src/deviceConfig.hpp
parentsmall cleanup (diff)
small cleanup
Diffstat (limited to 'src/deviceConfig.hpp')
-rw-r--r--src/deviceConfig.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/deviceConfig.hpp b/src/deviceConfig.hpp
index efec0bb..caa6913 100644
--- a/src/deviceConfig.hpp
+++ b/src/deviceConfig.hpp
@@ -31,6 +31,7 @@
#ifndef _DEVICE_CONFIG_HPP_
#define _DEVICE_CONFIG_HPP_
+#include "networkAddress.h"
class TunDevice;
enum device_type_t { TYPE_UNDEF, TYPE_TUN, TYPE_TAP };
@@ -38,13 +39,9 @@ enum device_type_t { TYPE_UNDEF, TYPE_TUN, TYPE_TAP };
class DeviceConfig
{
public:
- DeviceConfig(const char* dev_name ,const char* dev_type, const char* ifcfg_lp, const char* ifcfg_rnmp)
- {
- guess_type(dev_name, dev_type);
- }
-
-private:
- void guess_type(const char* dev_name, const char* dev_type)
+ DeviceConfig(const char* dev_name ,const char* dev_type,
+ const char* ifcfg_lp, const char* ifcfg_rnmp) : local_(ipv4, ifcfg_lp),
+ remote_netmask_(ipv4, ifcfg_rnmp)
{
type_ = TYPE_UNDEF;
if(dev_type) {
@@ -61,7 +58,9 @@ private:
}
}
+private:
device_type_t type_;
+ NetworkAddress local_, remote_netmask_;
friend class TunDevice;
};