aboutsummaryrefslogtreecommitdiffstats
path: root/api/driver.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-15 15:54:37 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:51:00 +0100
commitd04721dee692ea5ad481419e9104111084d3431c (patch)
tree79d7dcc370d34d3a9984a6c95a8d9eb85eb3cdcc /api/driver.h
parentapi: unify security descriptors and disable for _DEBUG (diff)
downloadwintun-d04721dee692ea5ad481419e9104111084d3431c.tar.xz
wintun-d04721dee692ea5ad481419e9104111084d3431c.zip
api: test the temporary driver idea
1. Add driver to the store: SetupCopyOEMInfW() 2. Create the adapter using explicit path to .inf file: DI_ENUMSINGLEINF 3. Delete all Wintun drivers from the store. This is a subject of further research: - It appears those adapters survive a reboot. So, Windows must store the driver somewhere on the disk and the driver removal is not completed. If the driver removal is not completed until there are existing adapters, this is excellent, as it will provide a self-cleanup. - Test multiple adapters with different driver versions. Which driver wins? - Are other Wintun adapters interrupted when adding a new one? - Test Windows 7 behaviour. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/driver.h')
-rw-r--r--api/driver.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/api/driver.h b/api/driver.h
index 967d862..686b3d4 100644
--- a/api/driver.h
+++ b/api/driver.h
@@ -30,32 +30,9 @@ DriverIsOurHardwareID(_In_z_ const WCHAR *Hwids);
BOOL
DriverIsOurDrvInfoDetail(_In_ const SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData);
-#if defined(HAVE_EV) || defined(HAVE_WHQL)
-
-/**
- * Queries the version of the driver this wintun.dll is packing.
- *
- * DriverDate Pointer to a variable to receive the driver date.
- *
- * DriverVersion Pointer to a variable to receive the driver version.
- *
- * @return ERROR_SUCCESS on success; Win32 error code otherwise.
- */
-WINTUN_STATUS
-DriverGetVersion(_Out_ FILETIME *DriverDate, _Out_ DWORDLONG *DriverVersion);
-
-/**
- * Installs or updates Wintun driver.
- *
- * @return ERROR_SUCCESS on success; Win32 error code otherwise.
- */
-WINTUN_STATUS DriverInstallOrUpdate(VOID);
-
/**
- * Uninstalls Wintun driver.
+ * Removes all Wintun drivers from the driver store.
*
- * @return ERROR_SUCCESS on success; Win32 error code otherwise.
+ * @return ERROR_SUCCESS on success or the adapter was not found; Win32 error code otherwise.
*/
-WINTUN_STATUS DriverUninstall(VOID);
-
-#endif
+WINTUN_STATUS DriverRemoveAllOurs(VOID);