0b7a3d7c257f3493b564c3c23ea4ce97897beb9f
[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 enum _RTL_GENERIC_COMPARE_RESULTS
121 {
122 GenericLessThan,
123 GenericGreaterThan,
124 GenericEqual
125 } RTL_GENERIC_COMPARE_RESULTS;
126
127 typedef struct _SID_IDENTIFIER_AUTHORITY
128 {
129 UCHAR Value[6];
130 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
131
132 typedef struct _SID_AND_ATTRIBUTES
133 {
134 PSID Sid;
135 ULONG Attributes;
136 } SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
137
138 typedef struct _TOKEN_SOURCE
139 {
140 CHAR SourceName[TOKEN_SOURCE_LENGTH];
141 LUID SourceIdentifier;
142 } TOKEN_SOURCE, *PTOKEN_SOURCE;
143
144 typedef struct _TOKEN_CONTROL
145 {
146 LUID TokenId;
147 LUID AuthenticationId;
148 LUID ModifiedId;
149 TOKEN_SOURCE TokenSource;
150 } TOKEN_CONTROL, *PTOKEN_CONTROL;
151
152 typedef struct _SECURITY_CLIENT_CONTEXT
153 {
154 SECURITY_QUALITY_OF_SERVICE SecurityQos;
155 PACCESS_TOKEN ClientToken;
156 BOOLEAN DirectlyAccessClientToken;
157 BOOLEAN DirectAccessEffectiveOnly;
158 BOOLEAN ServerIsRemote;
159 TOKEN_CONTROL ClientTokenControl;
160 } SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
161
162 typedef struct _SECURITY_DESCRIPTOR_RELATIVE
163 {
164 UCHAR Revision;
165 UCHAR Sbz1;
166 SECURITY_DESCRIPTOR_CONTROL Control;
167 ULONG Owner;
168 ULONG Group;
169 ULONG Sacl;
170 ULONG Dacl;
171 } SECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE;
172
173 typedef struct _TOKEN_GROUPS
174 {
175 ULONG GroupCount;
176 SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
177 } TOKEN_GROUPS, *PTOKEN_GROUPS;
178
179 typedef struct _TOKEN_PRIVILEGES
180 {
181 ULONG PrivilegeCount;
182 LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
183 } TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
184
185 typedef struct _TOKEN_USER
186 {
187 SID_AND_ATTRIBUTES User;
188 } TOKEN_USER, *PTOKEN_USER;
189
190 typedef enum _TOKEN_INFORMATION_CLASS
191 {
192 TokenUser = 1,
193 TokenGroups,
194 TokenPrivileges,
195 TokenOwner,
196 TokenPrimaryGroup,
197 TokenDefaultDacl,
198 TokenSource,
199 TokenType,
200 TokenImpersonationLevel,
201 TokenStatistics,
202 TokenRestrictedSids,
203 TokenSessionId,
204 TokenGroupsAndPrivileges,
205 TokenSessionReference,
206 TokenSandBoxInert,
207 TokenAuditPolicy,
208 TokenOrigin,
209 TokenElevationType,
210 TokenLinkedToken,
211 TokenElevation,
212 TokenIsRestricted,
213 TokenAccessInformation,
214 TokenVirtualization,
215 TokenIntegrityLevel,
216 TokenIntegrityLevelDesktop,
217 TokenMandatoryPolicy,
218 MaxTokenInfoClass
219 } TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS;
220
221 typedef struct _TOKEN_OWNER
222 {
223 PSID Owner;
224 } TOKEN_OWNER, *PTOKEN_OWNER;
225
226 typedef struct _TOKEN_PRIMARY_GROUP
227 {
228 PSID PrimaryGroup;
229 } TOKEN_PRIMARY_GROUP, *PTOKEN_PRIMARY_GROUP;
230
231 typedef struct _TOKEN_DEFAULT_DACL
232 {
233 PACL DefaultDacl;
234 } TOKEN_DEFAULT_DACL, *PTOKEN_DEFAULT_DACL;
235
236 #endif // !NTOS_MODE_USER
237 #endif // _NTIFS_