summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/drsuapi.idl
blob: d49f3d294aa4a2ce2ff0b0a2587214616e968915 (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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#include "idl_types.h"

[ 
  uuid(e3514235-4b06-11d1-ab04-00c04fc2dcd2),
  version(4.0),
  endpoints(lsass,protected_storage,TCP-0),
  helpstring("Active Directory Replication"),
  pointer_default(unique)
] 
interface drsuapi
{
	/*****************/
        /* Function 0x00 */

	typedef [flag(NDR_PAHEX)] struct {
		uint32 length;
		[size_is(length)] uint8 data[];
	} drsuapi_BindInfo;

	NTSTATUS drsuapi_DsBind(
		[in]	    GUID *server_guid,
		[in]	    uint32 unknown,
		[out]       drsuapi_BindInfo *info,
		[out,ref]   policy_handle *bind_handle
		);

	/*****************/
        /* Function 0x01 */
	NTSTATUS drsuapi_DsUnbind(
		[in,out,ref] policy_handle *bind_handle
		);

	/*****************/
        /* Function 0x02 */
	NTSTATUS DRSUAPI_REPLICA_SYNC();

	/*****************/
        /* Function 0x03 */
	NTSTATUS DRSUAPI_GET_NC_CHANGES();

	/*****************/
        /* Function 0x04 */
	NTSTATUS DRSUAPI_UPDATE_REFS();

	/*****************/
        /* Function 0x05 */
	NTSTATUS DRSUAPI_REPLICA_ADD();

	/*****************/
        /* Function 0x06 */
	NTSTATUS DRSUAPI_REPLICA_DEL();

	/*****************/
        /* Function 0x07 */
	NTSTATUS DRSUAPI_REPLICA_MODIFY();

	/*****************/
        /* Function 0x08 */
	NTSTATUS DRSUAPI_VERIFY_NAMES();

	/*****************/
        /* Function 0x09 */
	NTSTATUS DRSUAPI_GET_MEMBERSHIPS();

	/*****************/
        /* Function 0x0a */
	NTSTATUS DRSUAPI_INTER_DOMAIN_MOVE();

	/*****************/
        /* Function 0x0b */
	NTSTATUS DRSUAPI_GET_NT4_CHANGELOG();

	/*****************/
	/* Function 0x0c */
	typedef enum {
		DRSUAPI_DS_NAME_STATUS_OK			= 0,
		DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR		= 1,
		DRSUAPI_DS_NAME_STATUS_NOT_FOUND		= 2,
		DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE		= 3,
		DRSUAPI_DS_NAME_STATUS_NO_MAPPING		= 4,
		DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY		= 5,
		DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING	= 6,
		DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL		= 7
	} drsuapi_DsNameStatus;

	typedef enum {
		DRSUAPI_DS_NAME_FLAG_NO_FLAGS			= 0x0,
		DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY		= 0x1,
		DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC			= 0x2,
		DRSUAPI_DS_NAME_FLAG_GCVERIFY			= 0x4,
		DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL		= 0x8
	} drsuapi_DsNameFlags;

	typedef enum {
		DRSUAPI_DS_NAME_FORMAT_UKNOWN			= 0,
		DRSUAPI_DS_NAME_FORMAT_FQDN_1779		= 1,
		DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT		= 2,
		DRSUAPI_DS_NAME_FORMAT_DISPLAY			= 3,
		DRSUAPI_DS_NAME_FORMAT_GUID 			= 6,
		DRSUAPI_DS_NAME_FORMAT_CANONICAL		= 7,
		DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL		= 8,
		DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX		= 9,
		DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL	= 10,
		DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY	= 11,
		DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN		= 12
	} drsuapi_DsNameFormat;

	typedef struct {
		unistr *str;
	} drsuapi_DsNameString;

	typedef struct {
		uint32 unknown1; /* 0x000004e4 */
		uint32 unknown2; /* 0x00000407 */
		uint32 format_flags;
		uint32 format_offered;
		uint32 format_desired;
		[range(1,10000)] uint32 count;
		[size_is(count)] drsuapi_DsNameString *names;
	} drsuapi_DsNameRequest1;

	typedef union {
		[case(1)] drsuapi_DsNameRequest1 req1;
	} drsuapi_DsNameRequest;

	typedef struct {
		uint32 status;
		unistr *dns_domain_name;
		unistr *result_name;
	} drsuapi_DsNameInfo1;

	typedef struct {
		uint32 count;
		[size_is(count)] drsuapi_DsNameInfo1 *array;
	} drsuapi_DsNameCtr1;

	typedef union {
		[case(1)] drsuapi_DsNameCtr1 *ctr1;
	} drsuapi_DsNameCtr;

	NTSTATUS drsuapi_DsCrackNames(
		[in,ref] policy_handle *bind_handle,
		[in, out] uint32 level,
		[in,switch_is(level)] drsuapi_DsNameRequest req,
		[out,switch_is(level)] drsuapi_DsNameCtr ctr
		);

	/*****************/
        /* Function 0x0d */
	NTSTATUS DRSUAPI_WRITE_SPN();

	/*****************/
        /* Function 0x0e */
	NTSTATUS DRSUAPI_REMOVE_DS_SERVER();

	/*****************/
        /* Function 0x0f */
	NTSTATUS DRSUAPI_REMOVE_DS_DOMAIN();

	/*****************/
        /* Function 0x10 */
	NTSTATUS DRSUAPI_DOMAIN_CONTROLLER_INFO();

	/*****************/
        /* Function 0x11 */
	NTSTATUS DRSUAPI_ADD_ENTRY();

	/*****************/
        /* Function 0x12 */
	NTSTATUS DRSUAPI_EXECUTE_KCC();

	/*****************/
        /* Function 0x13 */
	NTSTATUS DRSUAPI_GET_REPL_INFO();

	/*****************/
        /* Function 0x14 */
	NTSTATUS DRSUAPI_ADD_SID_HISTORY();

	/*****************/
        /* Function 0x15 */
	NTSTATUS DRSUAPI_GET_MEMBERSHIPS2();

	/*****************/
        /* Function 0x16 */
	NTSTATUS DRSUAPI_REPLICA_VERIFY_OBJECTS();

	/*****************/
        /* Function 0x17 */
	NTSTATUS DRSUAPI_GET_OBJECT_EXISTENCE();

	/*****************/
        /* Function 0x18 */
	NTSTATUS DRSUAPI_QUERY_SITES_BY_COST();
}