summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-20 19:16:45 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-20 19:16:45 +0000
commit39338281d465b1457d89ed7991471d74f98be331 (patch)
treea16432e5efd44c5056d2c98120039d06067c9f76 /src/win32
parentlog cleanup (diff)
windows tunDevice reads mtu size now
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/tunDevice.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/win32/tunDevice.cpp b/src/win32/tunDevice.cpp
index 4986381..538269e 100644
--- a/src/win32/tunDevice.cpp
+++ b/src/win32/tunDevice.cpp
@@ -275,4 +275,14 @@ void TunDevice::do_ifconfig()
msg << "Unable to set device dhcp masq mode: " << LogErrno(err);
throw std::runtime_error(msg.str());
}
+
+ u_long mtu;
+ err = performIoControl(TAP_IOCTL_CONFIG_DHCP_MASQ, &mtu, sizeof(mtu), &mtu, sizeof(mtu));
+ if(err != ERROR_SUCCESS) {
+ CloseHandle(handle_);
+ std::stringstream msg;
+ msg << "Unable to get device mtu: " << LogErrno(err);
+ throw std::runtime_error(msg.str());
+ }
+ conf_.mtu_ = static_cast<u_int16_t>(mtu);
}