2020-10-13 19:40:52 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "api.h"
|
|
|
|
#include <Windows.h>
|
|
|
|
|
2020-10-13 19:55:41 +02:00
|
|
|
#define WINTUN_HWID L"Wintun"
|
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2020-10-13 19:40:52 +02:00
|
|
|
BOOL
|
2020-10-15 11:32:06 +02:00
|
|
|
DriverIsOurHardwareID(_In_z_ const WCHAR *Hwids);
|
2020-10-13 19:40:52 +02:00
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2020-10-15 11:32:06 +02:00
|
|
|
BOOL
|
|
|
|
DriverIsOurDrvInfoDetail(_In_ const SP_DRVINFO_DETAIL_DATA_W *DrvInfoDetailData);
|
2020-10-13 19:42:30 +02:00
|
|
|
|
2020-10-15 12:52:01 +02:00
|
|
|
/**
|
2020-10-15 15:54:37 +02:00
|
|
|
* Removes all Wintun drivers from the driver store.
|
2020-10-15 12:52:01 +02:00
|
|
|
*
|
2020-10-15 15:54:37 +02:00
|
|
|
* @return ERROR_SUCCESS on success or the adapter was not found; Win32 error code otherwise.
|
2020-10-15 12:52:01 +02:00
|
|
|
*/
|
2020-10-15 15:54:37 +02:00
|
|
|
WINTUN_STATUS DriverRemoveAllOurs(VOID);
|