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