Swat now uses the auto-generated smb.conf.5.html.
[Samba/gebeck_regimport.git] / source / include / rpc_reg.h
blob9166134c2741993c00113fe400fe0b005e664186
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7 Copyright (C) Paul Ashton 1997
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_REG_H /* _RPC_REG_H */
25 #define _RPC_REG_H
28 /* winreg pipe defines */
29 #define REG_OPEN_HKLM 0x02
30 #define REG_OPEN_HKU 0x04
31 #define REG_FLUSH_KEY 0x0B
32 #define REG_UNK_1A 0x1a
33 #define REG_QUERY_KEY 0x10
34 #define REG_ENUM_KEY 0x09
35 #define REG_CREATE_KEY 0x06
36 #define REG_DELETE_KEY 0x07
37 #define REG_DELETE_VALUE 0x08
38 #define REG_CREATE_VALUE 0x16
39 #define REG_GET_KEY_SEC 0x0c
40 #define REG_ENUM_VALUE 0x0a
41 #define REG_OPEN_ENTRY 0x0f
42 #define REG_INFO 0x11
43 #define REG_CLOSE 0x05
46 /* REG_Q_OPEN_HKLM */
47 typedef struct q_reg_open_policy_info
49 uint32 ptr;
50 uint16 unknown_0; /* 0xE084 - 16 bit unknown */
51 uint16 unknown_1; /* random. changes */
52 uint32 level; /* 0x0000 0002 - 32 bit unknown */
54 } REG_Q_OPEN_HKLM ;
56 /* REG_R_OPEN_HKLM */
57 typedef struct r_reg_open_policy_info
59 POLICY_HND pol; /* policy handle */
60 uint32 status; /* return status */
62 } REG_R_OPEN_HKLM;
65 /* REG_Q_OPEN_HKU */
66 typedef struct q_reg_open_unk4_info
68 uint32 ptr;
69 uint16 unknown_0; /* 0xE084 - 16 bit unknown */
70 uint16 unknown_1; /* random. changes */
71 uint32 level; /* 0x0000 0002 - 32 bit unknown */
73 } REG_Q_OPEN_HKU;
75 /* REG_R_OPEN_HKU */
76 typedef struct r_reg_open_unk4_info
78 POLICY_HND pol; /* policy handle */
79 uint32 status; /* return status */
81 } REG_R_OPEN_HKU;
84 /* REG_Q_FLUSH_KEY */
85 typedef struct q_reg_open_flush_key_info
87 POLICY_HND pol; /* policy handle */
89 } REG_Q_FLUSH_KEY;
91 /* REG_R_FLUSH_KEY */
92 typedef struct r_reg_open_flush_key_info
94 uint32 status; /* return status */
96 } REG_R_FLUSH_KEY;
99 /* REG_Q_GET_KEY_SEC */
100 typedef struct q_reg_get_key_sec_info
102 POLICY_HND pol; /* policy handle */
104 uint32 unknown; /* 0x0000 0007 */
106 uint32 ptr; /* pointer */
107 BUFHDR hdr_sec; /* header for security data */
108 SEC_DESC_BUF *data; /* security data */
110 } REG_Q_GET_KEY_SEC;
112 /* REG_R_GET_KEY_SEC */
113 typedef struct r_reg_get_key_sec_info
115 uint32 unknown; /* 0x0000 0007 */
117 uint32 ptr; /* pointer */
118 BUFHDR hdr_sec; /* header for security data */
119 SEC_DESC_BUF *data; /* security data */
121 uint32 status;
123 } REG_R_GET_KEY_SEC;
125 /* REG_Q_CREATE_VALUE */
126 typedef struct q_reg_create_value_info
128 POLICY_HND pol; /* policy handle */
130 UNIHDR hdr_name; /* name of value */
131 UNISTR2 uni_name;
133 uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
135 BUFFER3 *buf_value; /* value, in byte buffer */
137 } REG_Q_CREATE_VALUE;
139 /* REG_R_CREATE_VALUE */
140 typedef struct r_reg_create_value_info
142 uint32 status; /* return status */
144 } REG_R_CREATE_VALUE;
146 /* REG_Q_ENUM_VALUE */
147 typedef struct q_reg_query_value_info
149 POLICY_HND pol; /* policy handle */
151 uint32 val_index; /* index */
153 UNIHDR hdr_name; /* name of value */
154 UNISTR2 uni_name;
156 uint32 ptr_type; /* pointer */
157 uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
159 uint32 ptr_value; /* pointer */
160 BUFFER2 buf_value; /* value, in byte buffer */
162 uint32 ptr1; /* pointer */
163 uint32 len_value1; /* */
165 uint32 ptr2; /* pointer */
166 uint32 len_value2; /* */
168 } REG_Q_ENUM_VALUE;
170 /* REG_R_ENUM_VALUE */
171 typedef struct r_reg_enum_value_info
173 UNIHDR hdr_name; /* name of value */
174 UNISTR2 uni_name;
176 uint32 ptr_type; /* pointer */
177 uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */
179 uint32 ptr_value; /* pointer */
180 BUFFER2 *buf_value; /* value, in byte buffer */
182 uint32 ptr1; /* pointer */
183 uint32 len_value1; /* */
185 uint32 ptr2; /* pointer */
186 uint32 len_value2; /* */
188 uint32 status; /* return status */
190 } REG_R_ENUM_VALUE;
192 /* REG_Q_CREATE_KEY */
193 typedef struct q_reg_create_key_info
195 POLICY_HND pnt_pol; /* parent key policy handle */
197 UNIHDR hdr_name;
198 UNISTR2 uni_name;
200 UNIHDR hdr_class;
201 UNISTR2 uni_class;
203 uint32 reserved; /* 0x0000 0000 */
204 SEC_INFO sam_access; /* access rights flags, see rpc_secdes.h */
206 uint32 ptr1;
207 uint32 unknown_0; /* 0x0000 000C */
209 uint32 ptr2;
210 uint32 sec_len1; /* 0x14 - length of security descriptor, bytes */
211 uint32 sec_len2; /* 0x14 - length of security descriptor, bytes */
212 uint32 sec_len3; /* 0x0 - length of security descriptor, bytes */
213 uint32 sec_len4; /* 0x14 - length of security descriptor, bytes */
214 uint32 sec_len5; /* 0x0 - length of security descriptor, bytes */
215 uint32 sec_len6; /* 0x14 - length of security descriptor, bytes */
216 #if 0
217 SEC_DES sec_desc;
218 #else
219 uint8 buf_unk[20]; /* 01 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
220 #endif
222 uint32 unknown_2; /* 0x0000 0000 */
224 } REG_Q_CREATE_KEY;
226 /* REG_R_CREATE_KEY */
227 typedef struct r_reg_create_key_info
229 POLICY_HND key_pol; /* policy handle */
230 uint32 unknown; /* 0x0000 0000 */
232 uint32 status; /* return status */
234 } REG_R_CREATE_KEY;
236 /* REG_Q_DELETE_KEY */
237 typedef struct q_reg_delete_key_info
239 POLICY_HND pnt_pol; /* parent key policy handle */
241 UNIHDR hdr_name;
242 UNISTR2 uni_name;
243 } REG_Q_DELETE_KEY;
245 /* REG_R_DELETE_KEY */
246 typedef struct r_reg_delete_key_info
248 POLICY_HND key_pol; /* policy handle */
250 uint32 status; /* return status */
252 } REG_R_DELETE_KEY;
254 /* REG_Q_DELETE_VALUE */
255 typedef struct q_reg_delete_val_info
257 POLICY_HND pnt_pol; /* parent key policy handle */
259 UNIHDR hdr_name;
260 UNISTR2 uni_name;
262 } REG_Q_DELETE_VALUE;
264 /* REG_R_DELETE_VALUE */
265 typedef struct r_reg_delete_val_info
267 POLICY_HND key_pol; /* policy handle */
269 uint32 status; /* return status */
271 } REG_R_DELETE_VALUE;
273 /* REG_Q_QUERY_KEY */
274 typedef struct q_reg_query_info
276 POLICY_HND pol; /* policy handle */
277 UNIHDR hdr_class;
278 UNISTR2 uni_class;
280 } REG_Q_QUERY_KEY;
282 /* REG_R_QUERY_KEY */
283 typedef struct r_reg_query_key_info
285 UNIHDR hdr_class;
286 UNISTR2 uni_class;
288 uint32 num_subkeys;
289 uint32 max_subkeylen;
290 uint32 max_subkeysize; /* 0x0000 0000 */
291 uint32 num_values;
292 uint32 max_valnamelen;
293 uint32 max_valbufsize;
294 uint32 sec_desc; /* 0x0000 0078 */
295 NTTIME mod_time; /* modified time */
297 uint32 status; /* return status */
299 } REG_R_QUERY_KEY;
302 /* REG_Q_UNK_1A */
303 typedef struct q_reg_unk_1a_info
305 POLICY_HND pol; /* policy handle */
307 } REG_Q_UNK_1A;
309 /* REG_R_UNK_1A */
310 typedef struct r_reg_unk_1a_info
312 uint32 unknown; /* 0x0500 0000 */
313 uint32 status; /* return status */
315 } REG_R_UNK_1A;
318 /* REG_Q_CLOSE */
319 typedef struct reg_q_close_info
321 POLICY_HND pol; /* policy handle */
323 } REG_Q_CLOSE;
325 /* REG_R_CLOSE */
326 typedef struct reg_r_close_info
328 POLICY_HND pol; /* policy handle. should be all zeros. */
330 uint32 status; /* return code */
332 } REG_R_CLOSE;
335 /* REG_Q_ENUM_KEY */
336 typedef struct q_reg_enum_value_info
338 POLICY_HND pol; /* policy handle */
340 uint32 key_index;
342 uint16 key_name_len; /* 0x0000 */
343 uint16 unknown_1; /* 0x0414 */
345 uint32 ptr1; /* pointer */
346 uint32 unknown_2; /* 0x0000 020A */
347 uint8 pad1[8]; /* padding - zeros */
349 uint32 ptr2; /* pointer */
350 uint8 pad2[8]; /* padding - zeros */
352 uint32 ptr3; /* pointer */
353 NTTIME time; /* current time? */
355 } REG_Q_ENUM_KEY;
357 /* REG_R_ENUM_KEY */
358 typedef struct r_reg_enum_key_info
360 uint16 key_name_len; /* number of bytes in key name */
361 uint16 unknown_1; /* 0x0414 - matches with query unknown_1 */
363 uint32 ptr1; /* pointer */
364 uint32 unknown_2; /* 0x0000 020A */
365 uint32 unknown_3; /* 0x0000 0000 */
367 UNISTR3 key_name;
369 uint32 ptr2; /* pointer */
370 uint8 pad2[8]; /* padding - zeros */
372 uint32 ptr3; /* pointer */
373 NTTIME time; /* current time? */
375 uint32 status; /* return status */
377 } REG_R_ENUM_KEY;
380 /* REG_Q_INFO */
381 typedef struct q_reg_info_info
383 POLICY_HND pol; /* policy handle */
385 UNIHDR hdr_type; /* unicode product type header */
386 UNISTR2 uni_type; /* unicode product type - "ProductType" */
388 uint32 ptr1; /* pointer */
389 NTTIME time; /* current time? */
390 uint8 major_version1; /* 0x4 - os major version? */
391 uint8 minor_version1; /* 0x1 - os minor version? */
392 uint8 pad1[10]; /* padding - zeros */
394 uint32 ptr2; /* pointer */
395 uint8 major_version2; /* 0x4 - os major version? */
396 uint8 minor_version2; /* 0x1 - os minor version? */
397 uint8 pad2[2]; /* padding - zeros */
399 uint32 ptr3; /* pointer */
400 uint32 unknown; /* 0x0000 0000 */
402 } REG_Q_INFO;
404 /* REG_R_INFO */
405 typedef struct r_reg_info_info
407 uint32 ptr1; /* buffer pointer */
408 uint32 level; /* 0x1 - info level? */
410 uint32 ptr_type; /* pointer to o/s type */
411 BUFFER2 uni_type; /* unicode string o/s type - "LanmanNT" */
413 uint32 ptr2; /* pointer to unknown_0 */
414 uint32 unknown_0; /* 0x12 */
416 uint32 ptr3; /* pointer to unknown_1 */
417 uint32 unknown_1; /* 0x12 */
419 uint32 status; /* return status */
421 } REG_R_INFO;
424 /* REG_Q_OPEN_ENTRY */
425 typedef struct q_reg_open_entry_info
427 POLICY_HND pol; /* policy handle */
429 UNIHDR hdr_name; /* unicode registry string header */
430 UNISTR2 uni_name; /* unicode registry string name */
432 uint32 unknown_0; /* 32 bit unknown - 0x0000 0000 */
433 uint32 unknown_1; /* 32 bit unknown - 0x0200 0000 */
435 } REG_Q_OPEN_ENTRY;
439 /* REG_R_OPEN_ENTRY */
440 typedef struct r_reg_open_entry_info
442 POLICY_HND pol; /* policy handle */
443 uint32 status; /* return status */
445 } REG_R_OPEN_ENTRY;
449 #endif /* _RPC_REG_H */