summaryrefslogtreecommitdiff
path: root/src/tunDevice.h
diff options
context:
space:
mode:
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