api: pass around NET_LUID instead of LUID
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
f0f18ea4fb
commit
ddacb5491a
@ -774,10 +774,11 @@ WintunGetAdapterGUID(_In_ const WINTUN_ADAPTER *Adapter, _Out_ GUID *Guid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WINAPI
|
void WINAPI
|
||||||
WintunGetAdapterLUID(_In_ const WINTUN_ADAPTER *Adapter, _Out_ LUID *Luid)
|
WintunGetAdapterLUID(_In_ const WINTUN_ADAPTER *Adapter, _Out_ NET_LUID *Luid)
|
||||||
{
|
{
|
||||||
*(LONGLONG *)Luid = (((LONGLONG)Adapter->LuidIndex & ((1 << 24) - 1)) << 24) |
|
Luid->Info.Reserved = 0;
|
||||||
(((LONGLONG)Adapter->IfType & ((1 << 16) - 1)) << 48);
|
Luid->Info.NetLuidIndex = Adapter->LuidIndex;
|
||||||
|
Luid->Info.IfType = Adapter->IfType;
|
||||||
}
|
}
|
||||||
|
|
||||||
WINTUN_STATUS WINAPI
|
WINTUN_STATUS WINAPI
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <IPExport.h>
|
#include <IPExport.h>
|
||||||
|
#include <ifdef.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -157,7 +158,7 @@ typedef void(WINAPI *WINTUN_GET_ADAPTER_GUID_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Ad
|
|||||||
*
|
*
|
||||||
* @param Luid Pointer to LUID to receive adapter LUID.
|
* @param Luid Pointer to LUID to receive adapter LUID.
|
||||||
*/
|
*/
|
||||||
typedef void(WINAPI *WINTUN_GET_ADAPTER_LUID_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Adapter, _Out_ LUID *Luid);
|
typedef void(WINAPI *WINTUN_GET_ADAPTER_LUID_FUNC)(_In_ WINTUN_ADAPTER_HANDLE Adapter, _Out_ NET_LUID *Luid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the Wintun adapter.
|
* Returns the name of the Wintun adapter.
|
||||||
|
Loading…
Reference in New Issue
Block a user