- Make the NDK compatible with the MSDDK again.
[reactos.git] / reactos / include / ndk / ifssupp.h
1 /*++ NDK Version: 0095
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 ifssupp.h
8
9 Abstract:
10
11 NDK Support for usage without the IFS. Will be deprecated at WDK Release.
12
13 Author:
14
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
16
17 --*/
18 #ifndef _NTIFS_
19 #ifndef NTOS_MODE_USER
20 #define _NTIFS_
21
22 #define TOKEN_SOURCE_LENGTH 8
23
24 typedef enum _TOKEN_TYPE
25 {
26 TokenPrimary = 1,
27 TokenImpersonation
28 } TOKEN_TYPE, *PTOKEN_TYPE;
29
30 typedef PVOID PRTL_HEAP_PARAMETERS;
31 typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
32
33 typedef struct _RTL_SPLAY_LINKS
34 {
35 struct _RTL_SPLAY_LINKS *Parent;
36 struct _RTL_SPLAY_LINKS *LeftChild;
37 struct _RTL_SPLAY_LINKS *RightChild;
38 } RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
39
40 #if defined(USE_LPC6432)
41 #define LPC_CLIENT_ID CLIENT_ID64
42 #define LPC_SIZE_T ULONGLONG
43 #define LPC_PVOID ULONGLONG
44 #define LPC_HANDLE ULONGLONG
45 #else
46 #define LPC_CLIENT_ID CLIENT_ID
47 #define LPC_SIZE_T SIZE_T
48 #define LPC_PVOID PVOID
49 #define LPC_HANDLE HANDLE
50 #endif
51
52 typedef struct _PORT_MESSAGE
53 {
54 union
55 {
56 struct
57 {
58 CSHORT DataLength;
59 CSHORT TotalLength;
60 } s1;
61 ULONG Length;
62 } u1;
63 union
64 {
65 struct
66 {
67 CSHORT Type;
68 CSHORT DataInfoOffset;
69 } s2;
70 ULONG ZeroInit;
71 } u2;
72 union
73 {
74 LPC_CLIENT_ID ClientId;
75 double DoNotUseThisField;
76 };
77 ULONG MessageId;
78 union
79 {
80 LPC_SIZE_T ClientViewSize;
81 ULONG CallbackId;
82 };
83 } PORT_MESSAGE, *PPORT_MESSAGE;
84
85 typedef struct _PORT_VIEW
86 {
87 ULONG Length;
88 LPC_HANDLE SectionHandle;
89 ULONG SectionOffset;
90 LPC_SIZE_T ViewSize;
91 LPC_PVOID ViewBase;
92 LPC_PVOID ViewRemoteBase;
93 } PORT_VIEW, *PPORT_VIEW;
94
95 typedef struct _REMOTE_PORT_VIEW
96 {
97 ULONG Length;
98 LPC_SIZE_T ViewSize;
99 LPC_PVOID ViewBase;
100 } REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
101
102 typedef struct _KAPC_STATE
103 {
104 LIST_ENTRY ApcListHead[2];
105 struct _KPROCESS *Process;
106 BOOLEAN KernelApcInProgress;
107 BOOLEAN KernelApcPending;
108 BOOLEAN UserApcPending;
109 } KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
110
111 typedef struct _KQUEUE
112 {
113 DISPATCHER_HEADER Header;
114 LIST_ENTRY EntryListHead;
115 ULONG CurrentCount;
116 ULONG MaximumCount;
117 LIST_ENTRY ThreadListHead;
118 } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;
119
120 typedef PVOID EX_PUSH_LOCK;
121
122 typedef enum _RTL_GENERIC_COMPARE_RESULTS
123 {
124 GenericLessThan,
125 GenericGreaterThan,
126 GenericEqual
127 } RTL_GENERIC_COMPARE_RESULTS;
128
129 typedef struct _SID_IDENTIFIER_AUTHORITY
130 {
131 UCHAR Value[6];
132 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
133
134 typedef struct _SID_AND_ATTRIBUTES
135 {
136 PSID Sid;
137 ULONG Attributes;
138 } SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
139
140 typedef struct _TOKEN_SOURCE
141 {
142 CHAR SourceName[TOKEN_SOURCE_LENGTH];
143 LUID SourceIdentifier;
144 } TOKEN_SOURCE, *PTOKEN_SOURCE;
145
146 typedef struct _TOKEN_CONTROL
147 {
148 LUID TokenId;
149 LUID AuthenticationId;
150 LUID ModifiedId;
151 TOKEN_SOURCE TokenSource;
152 } TOKEN_CONTROL, *PTOKEN_CONTROL;
153
154 typedef struct _SECURITY_CLIENT_CONTEXT
155 {
156 SECURITY_QUALITY_OF_SERVICE SecurityQos;
157 PACCESS_TOKEN ClientToken;
158 BOOLEAN DirectlyAccessClientToken;
159 BOOLEAN DirectAccessEffectiveOnly;
160 BOOLEAN ServerIsRemote;
161 TOKEN_CONTROL ClientTokenControl;
162 } SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
163
164 typedef struct _SECURITY_DESCRIPTOR_RELATIVE
165 {
166 UCHAR Revision;
167 UCHAR Sbz1;
168 SECURITY_DESCRIPTOR_CONTROL Control;
169 ULONG Owner;
170 ULONG Group;
171 ULONG Sacl;
172 ULONG Dacl;
173 } SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
174
175 typedef struct _TOKEN_GROUPS
176 {
177 ULONG GroupCount;
178 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
179 } TOKEN_GROUPS, *PTOKEN_GROUPS;
180
181 typedef struct _TOKEN_PRIVILEGES
182 {
183 ULONG PrivilegeCount;
184 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
185 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
186
187 typedef struct _TOKEN_USER
188 {
189 SID_AND_ATTRIBUTES User;
190 } TOKEN_USER, *PTOKEN_USER;
191
192 typedef enum _TOKEN_INFORMATION_CLASS
193 {
194 TokenUser = 1,
195 TokenGroups,
196 TokenPrivileges,
197 TokenOwner,
198 TokenPrimaryGroup,
199 TokenDefaultDacl,
200 TokenSource,
201 TokenType,
202 TokenImpersonationLevel,
203 TokenStatistics,
204 TokenRestrictedSids,
205 TokenSessionId,
206 TokenGroupsAndPrivileges,
207 TokenSessionReference,
208 TokenSandBoxInert,
209 TokenAuditPolicy,
210 TokenOrigin,
211 TokenElevationType,
212 TokenLinkedToken,
213 TokenElevation,
214 TokenIsRestricted,
215 TokenAccessInformation,
216 TokenVirtualization,
217 TokenIntegrityLevel,
218 TokenIntegrityLevelDesktop,
219 TokenMandatoryPolicy,
220 MaxTokenInfoClass
221 } TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
222
223 typedef struct _TOKEN_OWNER
224 {
225 PSID Owner;
226 } TOKEN_OWNER, *PTOKEN_OWNER;
227
228 typedef struct _TOKEN_PRIMARY_GROUP
229 {
230 PSID PrimaryGroup;
231 } TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
232
233 typedef struct _TOKEN_DEFAULT_DACL
234 {
235 PACL DefaultDacl;
236 } TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
237
238 #endif // !NTOS_MODE_USER
239 #endif // _NTIFS_