summaryrefslogtreecommitdiff
path: root/tunDevice.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2007-06-20 22:38:51 +0000
committerChristian Pointner <equinox@anytun.org>2007-06-20 22:38:51 +0000
commit55decc856579b7beffb75d71940b27fe6768e83e (patch)
tree0da7ac25a05cd71b4d47b486a4ab25f95bb56c92 /tunDevice.cpp
parentadded syslog class (diff)
first test of whole system
Diffstat (limited to 'tunDevice.cpp')
-rw-r--r--tunDevice.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tunDevice.cpp b/tunDevice.cpp
index e4cc5af..8898c7f 100644
--- a/tunDevice.cpp
+++ b/tunDevice.cpp
@@ -140,7 +140,20 @@ char* TunDevice::getActualName()
return dev_->actual_name;
}
-char* TunDevice::getType()
+u_int32_t TunDevice::getType()
+{
+ if(!dev_)
+ return TYPE_UNDEF;
+
+ switch(dev_->type)
+ {
+ case DEV_TYPE_TUN: return TYPE_TUN;
+ case DEV_TYPE_TAP: return TYPE_TAP;
+ }
+ return TYPE_UNDEF;
+}
+
+char* TunDevice::getTypeString()
{
if(!dev_)
return NULL;