aboutsummaryrefslogtreecommitdiffstats
path: root/api/driver.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-15 12:52:01 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:51:00 +0100
commitac6db7788a8dfd6e7658427be6d034cadb50081c (patch)
treee5830e0426b4e30905299f8c1345f4570d3543a2 /api/driver.h
parentapi: log out-of-memory errors too (diff)
downloadwintun-ac6db7788a8dfd6e7658427be6d034cadb50081c.tar.xz
wintun-ac6db7788a8dfd6e7658427be6d034cadb50081c.zip
api: move documentation to .h and discontinue on static functions
While Doxygen correctly locates the function documentation when it is written directly preceding the function body, Microsoft Visual Studio IDE does not. The former requires the documentation to precede the function declaration. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/driver.h')
-rw-r--r--api/driver.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/api/driver.h b/api/driver.h
index d7906b3..967d862 100644
--- a/api/driver.h
+++ b/api/driver.h
@@ -10,18 +10,52 @@
#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);
#if defined(HAVE_EV) || defined(HAVE_WHQL)
-WINTUN_STATUS DriverGetVersion(_Out_ FILETIME *DriverDate, _Out_ DWORDLONG *DriverVersion);
+/**
+ * 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.
+ *
+ * @return ERROR_SUCCESS on success; Win32 error code otherwise.
+ */
WINTUN_STATUS DriverUninstall(VOID);
-#endif \ No newline at end of file
+#endif