summaryrefslogtreecommitdiff
path: root/source/include/rpc_reg.h
blob: 28d11710cdfabc1b4b41fe8480b4f4723a90d731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/* 
   Unix SMB/Netbios implementation.
   Version 1.9.
   SMB parameters and setup
   Copyright (C) Andrew Tridgell 1992-1997
   Copyright (C) Luke Kenneth Casson Leighton 1996-1997
   Copyright (C) Paul Ashton 1997
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef _RPC_REG_H /* _RPC_REG_H */
#define _RPC_REG_H 


/* winreg pipe defines */
#define REG_OPEN_POLICY     0x02
#define REG_OPEN_ENTRY      0x0f
#define REG_INFO            0x11
#define REG_CLOSE           0x05

/* REG_Q_OPEN_POLICY */
typedef struct q_reg_open_policy_info
{
	uint32 ptr;
	uint16 unknown_0; /* 0x5da0      - 16 bit unknown */
	uint32 level;     /* 0x0000 0001 - 32 bit unknown */
	uint16 unknown_1; /* 0x0200      - 16 bit unknown */

} REG_Q_OPEN_POLICY;

/* REG_R_OPEN_POLICY */
typedef struct r_reg_open_policy_info
{
    POLICY_HND pol;       /* policy handle */
	uint32 status;         /* return status */

} REG_R_OPEN_POLICY;


/* REG_Q_CLOSE */
typedef struct reg_q_close_info
{
	POLICY_HND pol; /* policy handle */

} REG_Q_CLOSE;

/* REG_R_CLOSE */
typedef struct reg_r_close_info
{
	POLICY_HND pol; /* policy handle.  should be all zeros. */

	uint32 status; /* return code */

} REG_R_CLOSE;


/* REG_Q_INFO */
typedef struct q_reg_info_info
{
    POLICY_HND pol;        /* policy handle */

	UNIHDR  hdr_type;       /* unicode product type header */
	UNISTR2 uni_type;       /* unicode product type - "ProductType" */

	uint32 ptr1;            /* pointer */
	NTTIME time;            /* current time? */
	uint8  major_version1;  /* 0x4 - os major version? */
	uint8  minor_version1;  /* 0x1 - os minor version? */
	uint8  pad1[10];        /* padding - zeros */

	uint32 ptr2;            /* pointer */
	uint8  major_version2;  /* 0x4 - os major version? */
	uint8  minor_version2;  /* 0x1 - os minor version? */
	uint8  pad2[2];         /* padding - zeros */

	uint32 ptr3;            /* pointer */
	uint32 unknown;         /* 0x0000 0000 */

} REG_Q_INFO;

/* REG_R_INFO */
typedef struct r_reg_info_info
{ 
	uint32 ptr1;            /* buffer pointer */
	uint32 level;          /* 0x1 - info level? */

	uint32     ptr_type;       /* pointer to o/s type */
	UNINOTSTR2 uni_type;      /* unicode string o/s type - "LanmanNT" */

	uint32 ptr2;           /* pointer to unknown_0 */
	uint32 unknown_0;      /* 0x12 */

	uint32 ptr3;           /* pointer to unknown_1 */
	uint32 unknown_1;      /* 0x12 */

	uint32 status;         /* return status */

} REG_R_INFO;


/* REG_Q_OPEN_ENTRY */
typedef struct q_reg_open_entry_info
{
    POLICY_HND pol;        /* policy handle */

	UNIHDR  hdr_name;       /* unicode registry string header */
	UNISTR2 uni_name;       /* unicode registry string name */

	uint32 unknown_0;       /* 32 bit unknown - 0x0000 0000 */
	uint16 unknown_1;       /* 16 bit unknown - 0x0000 */
	uint16 unknown_2;       /* 16 bit unknown - 0x0200 */

} REG_Q_OPEN_ENTRY;



/* REG_R_OPEN_ENTRY */
typedef struct r_reg_open_entry_info
{
    POLICY_HND pol;       /* policy handle */
	uint32 status;         /* return status */

} REG_R_OPEN_ENTRY;



#endif /* _RPC_REG_H */