aboutsummaryrefslogtreecommitdiffstats
path: root/api/wintun.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-11-02 16:28:51 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-02 23:33:20 +0100
commit283f6c8e6315f8811c056df40a7e40270fed822e (patch)
treefa9f68ca06340e65b5a2d83b815bcfda66fb2c01 /api/wintun.h
parentapi: separate read-wait handle into other function (diff)
downloadwintun-283f6c8e6315f8811c056df40a7e40270fed822e.tar.xz
wintun-283f6c8e6315f8811c056df40a7e40270fed822e.zip
api: install driver on demand
...and add API for uninstalling it. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/wintun.h')
-rw-r--r--api/wintun.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/api/wintun.h b/api/wintun.h
index 3cd4a47..7c72ead 100644
--- a/api/wintun.h
+++ b/api/wintun.h
@@ -71,6 +71,13 @@ typedef WINTUN_STATUS(WINAPI *WINTUN_DELETE_ADAPTER_FUNC)(
_Out_opt_ BOOL *RebootRequired);
/**
+ * Deletes all Wintun drivers from the driver store
+ *
+ * @return ERROR_SUCCESS on success; Win32 error code otherwise.
+ */
+typedef WINTUN_STATUS(WINAPI *WINTUN_DELETE_DRIVER_FUNC)(void);
+
+/**
* Called by WintunEnumAdapters for each adapter in the pool.
*
* @param Adapter Adapter handle.
@@ -93,8 +100,10 @@ typedef BOOL(CALLBACK *WINTUN_ENUM_CALLBACK_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Ada
*
* @return ERROR_SUCCESS on success; Win32 error code otherwise.
*/
-typedef WINTUN_STATUS(
- WINAPI *WINTUN_ENUM_ADAPTERS_FUNC)(_In_z_ const WCHAR *Pool, _In_ WINTUN_ENUM_CALLBACK_FUNC Callback, _In_ LPARAM Param);
+typedef WINTUN_STATUS(WINAPI *WINTUN_ENUM_ADAPTERS_FUNC)(
+ _In_z_ const WCHAR *Pool,
+ _In_ WINTUN_ENUM_CALLBACK_FUNC Callback,
+ _In_ LPARAM Param);
/**
* Releases Wintun adapter resources.
@@ -166,7 +175,7 @@ typedef WINTUN_STATUS(WINAPI *WINTUN_GET_ADAPTER_NAME_FUNC)(
/**
* Determines the version of the Wintun driver currently loaded.
*
- * @return The version number on success, or 0 if failure.
+ * @return The version number on success, or 0 if failure or Wintun not loaded.
*/
typedef DWORDLONG(WINAPI *WINTUN_GET_VERSION_FUNC)(void);