aboutsummaryrefslogtreecommitdiffstats
path: root/driver/undocumented.h
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-11-06 07:29:25 +0100
committerSimon Rozman <simon@rozman.si>2020-11-06 07:29:47 +0100
commita00c8ca68536a2adf29268e0407958047d3c8bb9 (patch)
treec520fc4204642e38ee9f493a9d0f15f95fe9fcbd /driver/undocumented.h
parentapi: include arm64 in amd64 (diff)
downloadwintun-a00c8ca68536a2adf29268e0407958047d3c8bb9.tar.xz
wintun-a00c8ca68536a2adf29268e0407958047d3c8bb9.zip
driver: move to subfolder
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'driver/undocumented.h')
-rw-r--r--driver/undocumented.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/driver/undocumented.h b/driver/undocumented.h
new file mode 100644
index 0000000..a3b3926
--- /dev/null
+++ b/driver/undocumented.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
+ */
+
+#pragma once
+
+#include <wdm.h>
+
+typedef enum
+{
+ SystemExtendedHandleInformation = 0x40
+} SYSTEM_INFORMATION_CLASS;
+
+typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
+{
+ PVOID Object;
+ HANDLE UniqueProcessId;
+ HANDLE HandleValue;
+ ACCESS_MASK GrantedAccess;
+ USHORT CreatorBackTraceIndex;
+ USHORT ObjectTypeIndex;
+ ULONG HandleAttributes;
+ ULONG Reserved;
+} SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
+
+typedef struct _SYSTEM_HANDLE_INFORMATION_EX
+{
+ ULONG_PTR NumberOfHandles;
+ ULONG_PTR Reserved;
+ SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handles[ANYSIZE_ARRAY];
+} SYSTEM_HANDLE_INFORMATION_EX, *PSYSTEM_HANDLE_INFORMATION_EX;
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+ZwQuerySystemInformation(
+ SYSTEM_INFORMATION_CLASS SystemInformationClass,
+ PVOID SystemInformation,
+ ULONG SystemInformationLength,
+ ULONG *ReturnLength);
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+ZwYieldExecution(VOID);