summaryrefslogtreecommitdiff
path: root/src/tunDevice.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-19 23:21:30 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-19 23:21:30 +0000
commitcf44e028d076399177619d8bc523fa13521e0b5e (patch)
treefdf5577e32b1ad656f32101e530fe255b3089ee6 /src/tunDevice.h
parentfixed overlapped handling of read and write at windows tundevice (diff)
fixed silly bug at new tundevice
Diffstat (limited to 'src/tunDevice.h')
-rw-r--r--src/tunDevice.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tunDevice.h b/src/tunDevice.h
index c07f813..7fb1355 100644
--- a/src/tunDevice.h
+++ b/src/tunDevice.h
@@ -49,11 +49,15 @@ public:
int read(u_int8_t* buf, u_int32_t len);
int write(u_int8_t* buf, u_int32_t len);
- std::string getActualName() { return actual_name_.c_str(); }
+ std::string getActualName() { return actual_name_; }
device_type_t getType() { return conf_.type_; }
std::string getTypeString()
{
+#ifndef _MSC_VER
if(fd_ < 0)
+#else
+ if(handle_ == INVALID_HANDLE_VALUE)
+#endif
return "";
switch(conf_.type_)
@@ -74,8 +78,9 @@ private:
void do_ifconfig();
int fix_return(int ret, size_t pi_length);
+#ifndef _MSC_VER
int fd_;
-#ifdef _MSC_VER
+#else
HANDLE handle_;
#endif