aboutsummaryrefslogtreecommitdiffstats
path: root/api/driver.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-30 09:53:09 +0100
committerSimon Rozman <simon@rozman.si>2020-10-31 10:41:48 +0100
commitabf6962144969a3821063ccb68707c17508747cc (patch)
treed3b2429428ce07b8661c1a7ef0a4ef4c521ac7e5 /api/driver.h
parentapi: make #ifdef-s more descriptive (diff)
downloadwintun-abf6962144969a3821063ccb68707c17508747cc.tar.xz
wintun-abf6962144969a3821063ccb68707c17508747cc.zip
api: simplify driver removal
When we install the Wintun driver to the store, we get exact oem<nn>.inf filename of the driver in the store we just installed. Since the installation should be only temporarily, we should uninstall only the driver we installed. This also eliminates the need for iterating driver store speeding up things. The code we removed was inherited from the installer.dll, where it made perfect sense to remove all installed Wintun drivers in the update process. Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/driver.h')
-rw-r--r--api/driver.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/api/driver.h b/api/driver.h
deleted file mode 100644
index e4835df..0000000
--- a/api/driver.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0
- *
- * Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
- */
-
-#pragma once
-
-#include "wintun.h"
-#include <Windows.h>
-
-#define WINTUN_HWID L"Wintun"
-
-/**
- * Tests if any of the hardware IDs match ours.
- *
- * @param Hwids Multi-string containing a list of hardware IDs.
- *
- * @return TRUE on match; FALSE otherwise.
- */
-BOOL
-DriverIsOurHardwareID(_In_z_ const WCHAR *Hwids);
-
-/**
- * Tests if hardware ID or any of the compatible IDs match ours.
- *
- * @param DrvInfoDetailData Detailed information about a particular driver information structure.
- *
- * @return TRUE on match; FALSE otherwise.
- */
-BOOL
-DriverIsOurDrvInfoDetail(_In_ const SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData);
-
-/**
- * Removes all Wintun drivers from the driver store.
- *
- * @return ERROR_SUCCESS on success or the adapter was not found; Win32 error code otherwise.
- */
-WINTUN_STATUS DriverRemoveAllOurs(void);