cc25ad3c2f0e14388fb541a5c3526a6e11aa9ee6
[sfrench/samba-autobuild/.git] / source4 / librpc / idl / wkssvc.idl
1 /*
2   wkssvc interface definitions
3 */
4
5 import "srvsvc.idl";
6
7 [ uuid("6bffd098-a112-3610-9833-46c3f87e345a"),
8   version(1.0),
9   pointer_default(unique),
10   pointer_default_top(unique),
11   helpstring("Workstation Service"),
12   endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:")
13 ] interface wkssvc
14 {
15         declare [v1_enum] enum srvsvc_PlatformId;
16
17 #define BOOL uint32
18
19         /******************/
20         /* Function: 0x00 */
21
22         typedef struct {
23                 srvsvc_PlatformId platform_id;
24                 [string,charset(UTF16)] uint16 *server_name;
25                 [string,charset(UTF16)] uint16 *domain_name;
26                 uint32 version_major;
27                 uint32 version_minor;
28         } wkssvc_NetWkstaInfo100;
29
30         typedef struct {
31                 srvsvc_PlatformId platform_id;
32                 [string,charset(UTF16)] uint16 *server_name;
33                 [string,charset(UTF16)] uint16 *domain_name;
34                 uint32 version_major;
35                 uint32 version_minor;
36                 [string,charset(UTF16)] uint16 *lan_root;
37         } wkssvc_NetWkstaInfo101;
38
39         typedef struct {
40                 srvsvc_PlatformId platform_id;
41                 [string,charset(UTF16)] uint16 *server_name;
42                 [string,charset(UTF16)] uint16 *domain_name;
43                 uint32 version_major;
44                 uint32 version_minor;
45                 [string,charset(UTF16)] uint16 *lan_root;
46                 uint32 logged_on_users;
47         } wkssvc_NetWkstaInfo102;
48
49         typedef struct {
50                 uint32 char_wait;
51                 uint32 collection_time;
52                 uint32 maximum_collection_count;
53                 uint32 keep_connection;
54                 uint32 max_commands;
55                 uint32 session_timeout;
56                 uint32 size_char_buf;
57                 uint32 max_threads;
58                 uint32 lock_quota;
59                 uint32 lock_increment;
60                 uint32 lock_maximum;
61                 uint32 pipe_increment;
62                 uint32 pipe_maximum;
63                 uint32 cache_file_timeout;
64                 uint32 dormant_file_limit;
65                 uint32 read_ahead_throughput;
66                 uint32 num_mailslot_buffers;
67                 uint32 num_srv_announce_buffers;
68                 uint32 max_illegal_dgram_events;
69                 uint32 dgram_event_reset_freq;
70                 BOOL log_election_packets;
71                 BOOL use_opportunistic_locking;
72                 BOOL use_unlock_behind;
73                 BOOL use_close_behind;
74                 BOOL buf_named_pipes;
75                 BOOL use_lock_read_unlock;
76                 BOOL utilize_nt_caching;
77                 BOOL use_raw_read;
78                 BOOL use_raw_write;
79                 BOOL use_write_raw_data;
80                 BOOL use_encryption;
81                 BOOL buf_files_deny_write;
82                 BOOL buf_read_only_files;
83                 BOOL force_core_create_mode;
84                 BOOL use_512_byte_max_transfer;
85         } wkssvc_NetWkstaInfo502;
86
87         typedef struct {
88                 uint32 char_wait;
89         } wkssvc_NetWkstaInfo1010;
90
91         typedef struct {
92                 uint32 collection_time;
93         } wkssvc_NetWkstaInfo1011;
94
95         typedef struct {
96                 uint32 maximum_collection_count;
97         } wkssvc_NetWkstaInfo1012;
98
99         typedef struct {
100                 uint32 keep_connection;
101         } wkssvc_NetWkstaInfo1013;
102
103         typedef struct {
104                 uint32 session_timeout;
105         } wkssvc_NetWkstaInfo1018;
106
107         typedef struct {
108                 uint32 size_char_buf;
109         } wkssvc_NetWkstaInfo1023;
110
111         typedef struct {
112                 uint32 errorlog_sz;
113         } wkssvc_NetWkstaInfo1027;
114
115         typedef struct {
116                 uint32 max_threads;
117         } wkssvc_NetWkstaInfo1033;
118
119         typedef union {
120                 [case(100)] wkssvc_NetWkstaInfo100 *info100;
121                 [case(101)] wkssvc_NetWkstaInfo101 *info101;
122                 [case(102)] wkssvc_NetWkstaInfo102 *info102;
123                 [case(502)] wkssvc_NetWkstaInfo502 *info502;
124                 [case(1010)] wkssvc_NetWkstaInfo1010 *info1010;
125                 [case(1011)] wkssvc_NetWkstaInfo1011 *info1011;
126                 [case(1012)] wkssvc_NetWkstaInfo1012 *info1012;
127                 [case(1013)] wkssvc_NetWkstaInfo1013 *info1013;
128                 [case(1018)] wkssvc_NetWkstaInfo1018 *info1018;
129                 [case(1023)] wkssvc_NetWkstaInfo1023 *info1023;
130                 [case(1027)] wkssvc_NetWkstaInfo1027 *info1027;
131                 [case(1033)] wkssvc_NetWkstaInfo1033 *info1033;
132                 [default] ;
133         } wkssvc_NetWkstaInfo;
134
135         WERROR wkssvc_NetWkstaGetInfo(
136                 [in]   [string,charset(UTF16)] uint16 *server_name,
137                 [in]   uint32 level,
138                 [out,switch_is(level),ref]  wkssvc_NetWkstaInfo *info
139                 );
140
141
142         /******************/
143         /* Function: 0x01 */
144         WERROR wkssvc_NetWkstaSetInfo(
145                 [in]   [string,charset(UTF16)] uint16 *server_name,
146                 [in]   uint32 level,
147                 [in,switch_is(level),ref]  wkssvc_NetWkstaInfo *info,
148                 [in,out,ref]   uint32 *parm_error
149                 );
150
151
152         /*****************************/
153         /* Function        0x02      */
154         typedef struct {
155                 [string,charset(UTF16)] uint16 *user_name;
156         } wkssvc_NetrWkstaUserInfo0;
157
158         typedef struct {
159                 uint32 entries_read;
160                 [size_is(entries_read)] wkssvc_NetrWkstaUserInfo0 *user0;
161         } wkssvc_NetWkstaEnumUsersCtr0;
162
163         typedef struct {
164                 [string,charset(UTF16)] uint16 *user_name;
165                 [string,charset(UTF16)] uint16 *logon_domain;
166                 [string,charset(UTF16)] uint16 *other_domains;
167                 [string,charset(UTF16)] uint16 *logon_server;
168         } wkssvc_NetrWkstaUserInfo1;
169
170         typedef struct {
171                 uint32 entries_read;
172                 [size_is(entries_read)] wkssvc_NetrWkstaUserInfo1 *user1;
173         } wkssvc_NetWkstaEnumUsersCtr1;
174
175         typedef [switch_type(uint32)] union {
176                 [case(0)] wkssvc_NetWkstaEnumUsersCtr0 *user0;
177                 [case(1)] wkssvc_NetWkstaEnumUsersCtr1 *user1;
178         } wkssvc_NetWkstaEnumUsersCtr;
179
180         typedef struct {
181                 uint32 level;
182                 [switch_is(level)] wkssvc_NetWkstaEnumUsersCtr ctr;
183         } wkssvc_NetWkstaEnumUsersInfo;
184
185         WERROR wkssvc_NetWkstaEnumUsers(
186                 [in] [string,charset(UTF16)] uint16 *server_name,
187                 [in,out,ref] wkssvc_NetWkstaEnumUsersInfo *info,
188                 [in] uint32 prefmaxlen,
189                 [out,ref] uint32 *entries_read,
190                 [in,out] uint32 *resume_handle
191                 );
192
193         /*****************************/
194         /* Function        0x03      */
195         typedef struct {
196                 [string,charset(UTF16)] uint16 *other_domains;
197         } wkssvc_NetrWkstaUserInfo1101;
198
199         typedef [switch_type(uint32)] union {
200                 [case(0)] wkssvc_NetrWkstaUserInfo0 *info0;
201                 [case(1)] wkssvc_NetrWkstaUserInfo1 *info1;
202                 [case(1101)] wkssvc_NetrWkstaUserInfo1101 *info1101;
203         } wkssvc_NetrWkstaUserInfo;
204
205         WERROR wkssvc_NetrWkstaUserGetInfo(
206                 [in] [string,charset(UTF16)] uint16 *unknown,
207                 [in] uint32 level,
208                 [out] [switch_is(level)] [ref] wkssvc_NetrWkstaUserInfo *info
209                 );
210
211
212         /*****************************/
213         /* Function        0x04      */
214         WERROR WKSSVC_NETRWKSTAUSERSETINFO ();
215
216
217         /*****************************/
218         /* Function        0x05      */
219
220         typedef struct {
221                 uint32 quality_of_service;
222                 uint32 vc_count;
223                 [string,charset(UTF16)] uint16 *name;
224                 [string,charset(UTF16)] uint16 *address;
225                 uint32 wan_link;
226         } wkssvc_NetWkstaTransportInfo0;
227
228         typedef struct {
229                 uint32 count;
230                 [size_is(count)] wkssvc_NetWkstaTransportInfo0 *array;
231         } wkssvc_NetWkstaTransportCtr0;
232
233         typedef union {
234                 [case(0)] wkssvc_NetWkstaTransportCtr0 *ctr0;
235         } wkssvc_NetWkstaTransportCtr;
236
237         typedef struct {
238                 uint32 level;
239                 [switch_is(level)] wkssvc_NetWkstaTransportCtr ctr;
240         } wkssvc_NetWkstaTransportInfo;
241
242         WERROR wkssvc_NetWkstaTransportEnum (
243                 [in]         [string,charset(UTF16)] uint16 *server_name,
244                 [in,out,ref] wkssvc_NetWkstaTransportInfo *info,
245                 [in]         uint32 max_buffer,
246                 [out,ref]    uint32 *total_entries,
247                 [in,out]     uint32 *resume_handle
248                 );
249
250         /*****************************/
251         /* Function        0x06      */
252         /* only supported on NT */
253         WERROR wkssvc_NetrWkstaTransportAdd(
254                 [in] [string,charset(UTF16)] uint16 *server_name,
255                 [in] uint32 level, /* must be 0 */
256                 [in] [ref] wkssvc_NetWkstaTransportInfo0 *info0,
257                 [in,out] uint32 *parm_err
258                 );
259
260         /*****************************/
261         /* Function        0x07      */
262         /* only supported on NT */
263         WERROR wkssvc_NetrWkstaTransportDel(
264                 [in] [string,charset(UTF16)] uint16 *server_name,
265                 [in] [string,charset(UTF16)] uint16 *transport_name,
266                 [in] uint32 unknown3
267                 );
268
269         /*****************************/
270         /* Function        0x08      */
271         typedef struct {
272                 [string,charset(UTF16)] uint16 *unknown1;
273                 [string,charset(UTF16)] uint16 *unknown2;
274         } wkssvc_NetrUseInfo3;
275
276         typedef struct {
277                 [string,charset(UTF16)] uint16 *local;
278                 [string,charset(UTF16)] uint16 *remote;
279                 [string,charset(UTF16)] uint16 *password;
280                 uint32 status;
281                 uint32 asg_type;
282                 uint32 ref_count;
283                 uint32 use_count;
284                 [string,charset(UTF16)] uint16 *user_name;
285                 [string,charset(UTF16)] uint16 *domain_name;
286         } wkssvc_NetrUseInfo2;
287
288         typedef struct {
289                 [string,charset(UTF16)] uint16 *local;
290                 [string,charset(UTF16)] uint16 *remote;
291                 [string,charset(UTF16)] uint16 *password;
292                 uint32 status;
293                 uint32 asg_type;
294                 uint32 ref_count;
295                 uint32 use_count;
296         } wkssvc_NetrUseInfo1;
297
298         typedef struct {
299                 [string,charset(UTF16)] uint16 *local;
300                 [string,charset(UTF16)] uint16 *remote;
301         } wkssvc_NetrUseInfo0;
302
303         typedef [switch_type(uint32)] union {
304                 [case(0)] wkssvc_NetrUseInfo0 *info0;
305                 [case(1)] wkssvc_NetrUseInfo1 *info1;
306                 [case(2)] wkssvc_NetrUseInfo2 *info2;
307                 [case(3)] wkssvc_NetrUseInfo3 *info3;
308         } wkssvc_NetrUseGetInfoCtr;
309
310         WERROR wkssvc_NetrUseAdd(
311                 [in] [string,charset(UTF16)] uint16 *server_name,
312                 [in] uint32 level,
313                 [in] [switch_is(level)] [ref] wkssvc_NetrUseGetInfoCtr *ctr,
314                 [in,out] uint32 *parm_err
315                 );
316
317         /*****************************/
318         /* Function        0x09      */
319         WERROR WKSSVC_NETRUSEGETINFO ();
320
321         /*****************************/
322         /* Function        0x0a      */
323         WERROR wkssvc_NetrUseDel(
324                 [in] [string,charset(UTF16)] uint16 *server_name,
325                 [in,ref] [string,charset(UTF16)] uint16 *use_name,
326                 [in] uint32 force_cond
327                 );
328
329         /*****************************/
330         /* Function        0x0b      */
331         typedef struct {
332                 uint32 count;
333                 [size_is(count)] wkssvc_NetrUseInfo2 *array;
334         } wkssvc_NetrUseEnumCtr2;
335
336         typedef struct {
337                 uint32 count;
338                 [size_is(count)] wkssvc_NetrUseInfo1 *array;
339         } wkssvc_NetrUseEnumCtr1;
340
341         typedef struct {
342                 uint32 count;
343                 [size_is(count)] wkssvc_NetrUseInfo0 *array;
344         } wkssvc_NetrUseEnumCtr0;
345
346         typedef [switch_type(uint32)] union {
347                 [case(0)] wkssvc_NetrUseEnumCtr0 *ctr0;
348                 [case(1)] wkssvc_NetrUseEnumCtr1 *ctr1;
349                 [case(2)] wkssvc_NetrUseEnumCtr2 *ctr2;
350         } wkssvc_NetrUseEnumCtr;
351
352         typedef struct {
353                 uint32 level;
354                 [switch_is(level)] wkssvc_NetrUseEnumCtr ctr;
355         } wkssvc_NetrUseEnumInfo;
356
357         WERROR wkssvc_NetrUseEnum(
358                 [in] [string,charset(UTF16)] uint16 *server_name,
359                 [in,out] [ref] wkssvc_NetrUseEnumInfo *info,
360                 [in] uint32 prefmaxlen,
361                 [out,ref] uint32 *entries_read,
362                 [in,out] uint32 *resume_handle
363                 );
364
365         /*****************************/
366         /* Function        0x0c      */
367         WERROR WKSSVC_NETRMESSAGEBUFFERSEND ();
368
369         /*****************************/
370         /* Function        0x0d      */
371         WERROR WKSSVC_NETRWORKSTATIONSTATISTICSGET ();
372
373         /*****************************/
374         /* Function        0x0e      */
375         WERROR WKSSVC_NETRLOGONDOMAINNAMEADD ();
376
377         /*****************************/
378         /* Function        0x0f      */
379         WERROR WKSSVC_NETRLOGONDOMAINNAMEDEL ();
380
381         /*****************************/
382         /* Function        0x10      */
383         WERROR WKSSVC_NETRJOINDOMAIN ();
384
385         /*****************************/
386         /* Function        0x11      */
387         WERROR WKSSVC_NETRUNJOINDOMAIN ();
388
389         /*****************************/
390         /* Function        0x12      */
391         WERROR WKSSVC_NETRRENAMEMACHINEINDOMAIN ();
392
393         /*****************************/
394         /* Function        0x13      */
395         WERROR WKSSVC_NETRVALIDATENAME ();
396
397         /*****************************/
398         /* Function        0x14      */
399         WERROR WKSSVC_NETRGETJOININFORMATION ();
400
401         /*****************************/
402         /* Function        0x15      */
403         WERROR WKSSVC_NETRGETJOINABLEOUS ();
404
405         typedef struct {
406                 uint8 data[524];
407         } wkssvc_PasswordBuffer;
408
409         typedef [bitmap32bit] bitmap {
410                 /* TRUE: defer setting the SPN and dNSHostName until a rename operation */
411                 WKSSVC_JOIN_FLAGS_DEFER_SPN             = 0x00000100,
412
413                 /* TRUE: set the machine password to the provided one after the join completes */
414                 WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED    = 0x00000080,
415
416                 /* TRUE: perform an unsecured join */
417                 WKSSVC_JOIN_FLAGS_JOIN_UNSECURE         = 0x00000040,
418
419                 /* TRUE: allow the join to complete even if the account already exists */
420                 WKSSVC_JOIN_FLAGS_DOMAIN_JOIN_IF_JOINED = 0x00000020,
421         
422                 /* TRUE: this join is part of a w9x upgrade */
423                 WKSSVC_JOIN_FLAGS_WIN9X_UPGRADE         = 0x00000010,
424
425                 /* TRUE: delete the account when the domain is left */
426                 WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE        = 0x00000004,
427
428                 /* TRUE: create the account in the domain */
429                 WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE        = 0x00000002,
430
431                 /* TRUE: join domain    FALSE: join workgroup */
432                 WKSSVC_JOIN_FLAGS_JOIN_TYPE             = 0x00000001
433                 
434         } wkssvc_joinflags;
435
436         /*****************************/
437         /* Function        0x16      */
438         WERROR wkssvc_NetrJoinDomain2 (
439                 [in]         [string,charset(UTF16)] uint16 *server_name,
440                 [in]         [string,charset(UTF16),ref] uint16 *domain_name,
441                 [in]         [string,charset(UTF16)] uint16 *account_name,
442                 [in]         [string,charset(UTF16)] uint16 *admin_account,
443                 [in]         wkssvc_PasswordBuffer *encrypted_password,
444                 [in]         wkssvc_joinflags join_flags
445                 );
446
447         /*****************************/
448         /* Function        0x17      */
449         WERROR wkssvc_NetrUnjoinDomain2 (
450                 [in] [string,charset(UTF16)] uint16 *server_name,
451                 [in] [string,charset(UTF16)] uint16 *account,
452                 [in] wkssvc_PasswordBuffer *encrypted_password,
453                 [in] wkssvc_joinflags unjoin_flags
454                 );
455
456         typedef [bitmap32bit] bitmap {
457                 /* TRUE: create the account in the domain */
458                 WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE        = 0x00000002
459         } wkssvc_renameflags;
460
461         /*****************************/
462         /* Function        0x18      */
463         WERROR wkssvc_NetrRenameMachineInDomain2(
464                 [in] [string,charset(UTF16)] uint16 *server_name,
465                 [in] [string,charset(UTF16)] uint16 *NewMachineName,
466                 [in] [string,charset(UTF16)] uint16 *Account,
467                 [in] wkssvc_PasswordBuffer *EncryptedPassword,
468                 [in] wkssvc_renameflags RenameOptions
469                 );
470
471         /*****************************/
472         /* Function        0x19      */
473         WERROR WKSSVC_NETRVALIDATENAME2 ();
474
475         /*****************************/
476         /* Function        0x1a      */
477         WERROR WKSSVC_NETRGETJOINABLEOUS2 ();
478
479         /*****************************/
480         /* Function        0x1b      */
481         WERROR wkssvc_NetrAddAlternateComputerName(
482                 [in] [string,charset(UTF16)] uint16 *server_name,
483                 [in] [string,charset(UTF16)] uint16 *NewAlternateMachineName,
484                 [in] [string,charset(UTF16)] uint16 *Account,
485                 [in] wkssvc_PasswordBuffer *EncryptedPassword,
486                 [in] uint32 Reserved
487                 );
488
489         /*****************************/
490         /* Function        0x1c      */
491         WERROR wkssvc_NetrRemoveAlternateComputerName(
492                 [in] [string,charset(UTF16)] uint16 *server_name,
493                 [in] [string,charset(UTF16)] uint16 *AlternateMachineNameToRemove,
494                 [in] [string,charset(UTF16)] uint16 *Account,
495                 [in] wkssvc_PasswordBuffer *EncryptedPassword,
496                 [in] uint32 Reserved
497                 );
498
499         /*****************************/
500         /* Function        0x1d      */
501         WERROR WKSSVC_NETRSETPRIMARYCOMPUTERNAME ();
502
503         /*****************************/
504         /* Function        0x1e      */
505         WERROR WKSSVC_NETRENUMERATECOMPUTERNAMES ();
506 }