X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmingw%2Fdevice.c;h=253b95d1b8ec8062cb0e6845651c624dc92018a2;hb=0f328d9d2853ca723ff3205f39bb22207d21a932;hp=19719a7a0b4fc808d4924b6a5cfc8b66c5308132;hpb=6568cffd52d4803effaf52a9bb9c98d69cf7922a;p=tinc diff --git a/src/mingw/device.c b/src/mingw/device.c index 19719a7a..253b95d1 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -175,6 +175,17 @@ static bool setup_device(void) { return false; } + /* Get version information from tap device */ + + { + ULONG info[3] = {0}; + DWORD len; + if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_VERSION, &info, sizeof info, &info, sizeof info, &len, NULL)) + logger(DEBUG_ALWAYS, LOG_WARNING, "Could not get version information from Windows tap device %s (%s): %s", device, iface, winerror(GetLastError())); + else + logger(DEBUG_ALWAYS, LOG_INFO, "TAP-Windows driver version: %lu.%lu%s", info[0], info[1], info[2] ? " (DEBUG)" : ""); + } + /* Get MAC address from tap device */ if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_MAC, mymac.x, sizeof mymac.x, mymac.x, sizeof mymac.x, &len, 0)) {