VERSION: Disable git snapshot for the 4.1.8 release.
[Samba.git] / librpc / idl / rap.idl
blob780951c7503489ccfd5770d646aa3f63d3ef572c
1 #include "idl_types.h"
3 /*
4 rap interface definition
5 */
8 pointer_default(unique),
9 helper("../librpc/ndr/ndr_rap.h")
11 interface rap
13 typedef [public,noprint] enum {
14 NERR_Success = 0
15 } rap_status;
17 const int RAP_WshareEnum = 0;
18 const int RAP_WshareGetInfo = 1;
19 const int RAP_WshareSetInfo = 2;
20 const int RAP_WshareAdd = 3;
21 const int RAP_WshareDel = 4;
22 const int RAP_NetShareCheck = 5;
23 const int RAP_WsessionEnum = 6;
24 const int RAP_WsessionGetInfo = 7;
25 const int RAP_WsessionDel = 8;
26 const int RAP_WconnectionEnum = 9;
27 const int RAP_WfileEnum = 10;
28 const int RAP_WfileGetInfo = 11;
29 const int RAP_WfileClose = 12;
30 const int RAP_WserverGetInfo = 13;
31 const int RAP_WserverSetInfo = 14;
32 const int RAP_WserverDiskEnum = 15;
33 const int RAP_WserverAdminCommand = 16;
34 const int RAP_NetAuditOpen = 17;
35 const int RAP_WauditClear = 18;
36 const int RAP_NetErrorLogOpen = 19;
37 const int RAP_WerrorLogClear = 20;
38 const int RAP_NetCharDevEnum = 21;
39 const int RAP_NetCharDevGetInfo = 22;
40 const int RAP_WCharDevControl = 23;
41 const int RAP_NetCharDevQEnum = 24;
42 const int RAP_NetCharDevQGetInfo = 25;
43 const int RAP_WCharDevQSetInfo = 26;
44 const int RAP_WCharDevQPurge = 27;
45 const int RAP_WCharDevQPurgeSelf = 28;
46 const int RAP_WMessageNameEnum = 29;
47 const int RAP_WMessageNameGetInfo = 30;
48 const int RAP_WMessageNameAdd = 31;
49 const int RAP_WMessageNameDel = 32;
50 const int RAP_WMessageNameFwd = 33;
51 const int RAP_WMessageNameUnFwd = 34;
52 const int RAP_WMessageBufferSend = 35;
53 const int RAP_WMessageFileSend = 36;
54 const int RAP_WMessageLogFileSet = 37;
55 const int RAP_WMessageLogFileGet = 38;
56 const int RAP_WServiceEnum = 39;
57 const int RAP_WServiceInstall = 40;
58 const int RAP_WServiceControl = 41;
59 const int RAP_WAccessEnum = 42;
60 const int RAP_WAccessGetInfo = 43;
61 const int RAP_WAccessSetInfo = 44;
62 const int RAP_WAccessAdd = 45;
63 const int RAP_WAccessDel = 46;
64 const int RAP_WGroupEnum = 47;
65 const int RAP_WGroupAdd = 48;
66 const int RAP_WGroupDel = 49;
67 const int RAP_WGroupAddUser = 50;
68 const int RAP_WGroupDelUser = 51;
69 const int RAP_WGroupGetUsers = 52;
70 const int RAP_WUserEnum = 53;
71 const int RAP_WUserAdd = 54;
72 const int RAP_WUserDel = 55;
73 const int RAP_WUserGetInfo = 56;
74 const int RAP_WUserSetInfo = 57;
75 const int RAP_WUserPasswordSet = 58;
76 const int RAP_WUserGetGroups = 59;
77 const int RAP_WWkstaSetUID = 62;
78 const int RAP_WWkstaGetInfo = 63;
79 const int RAP_WWkstaSetInfo = 64;
80 const int RAP_WUseEnum = 65;
81 const int RAP_WUseAdd = 66;
82 const int RAP_WUseDel = 67;
83 const int RAP_WUseGetInfo = 68;
84 const int RAP_WPrintQEnum = 69;
85 const int RAP_WPrintQGetInfo = 70;
86 const int RAP_WPrintQSetInfo = 71;
87 const int RAP_WPrintQAdd = 72;
88 const int RAP_WPrintQDel = 73;
89 const int RAP_WPrintQPause = 74;
90 const int RAP_WPrintQContinue = 75;
91 const int RAP_WPrintJobEnum = 76;
92 const int RAP_WPrintJobGetInfo = 77;
93 const int RAP_WPrintJobSetInfo_OLD = 78;
94 const int RAP_WPrintJobDel = 81;
95 const int RAP_WPrintJobPause = 82;
96 const int RAP_WPrintJobContinue = 83;
97 const int RAP_WPrintDestEnum = 84;
98 const int RAP_WPrintDestGetInfo = 85;
99 const int RAP_WPrintDestControl = 86;
100 const int RAP_WProfileSave = 87;
101 const int RAP_WProfileLoad = 88;
102 const int RAP_WStatisticsGet = 89;
103 const int RAP_WStatisticsClear = 90;
104 const int RAP_NetRemoteTOD = 91;
105 const int RAP_WNetBiosEnum = 92;
106 const int RAP_WNetBiosGetInfo = 93;
107 const int RAP_NetServerEnum = 94;
108 const int RAP_I_NetServerEnum = 95;
109 const int RAP_WServiceGetInfo = 96;
110 const int RAP_WPrintQPurge = 103;
111 const int RAP_NetServerEnum2 = 104;
112 const int RAP_WAccessGetUserPerms = 105;
113 const int RAP_WGroupGetInfo = 106;
114 const int RAP_WGroupSetInfo = 107;
115 const int RAP_WGroupSetUsers = 108;
116 const int RAP_WUserSetGroups = 109;
117 const int RAP_WUserModalsGet = 110;
118 const int RAP_WUserModalsSet = 111;
119 const int RAP_WFileEnum2 = 112;
120 const int RAP_WUserAdd2 = 113;
121 const int RAP_WUserSetInfo2 = 114;
122 const int RAP_WUserPasswordSet2 = 115;
123 const int RAP_I_NetServerEnum2 = 116;
124 const int RAP_WConfigGet2 = 117;
125 const int RAP_WConfigGetAll2 = 118;
126 const int RAP_WGetDCName = 119;
127 const int RAP_NetHandleGetInfo = 120;
128 const int RAP_NetHandleSetInfo = 121;
129 const int RAP_WStatisticsGet2 = 122;
130 const int RAP_WBuildGetInfo = 123;
131 const int RAP_WFileGetInfo2 = 124;
132 const int RAP_WFileClose2 = 125;
133 const int RAP_WNetServerReqChallenge = 126;
134 const int RAP_WNetServerAuthenticate = 127;
135 const int RAP_WNetServerPasswordSet = 128;
136 const int RAP_WNetAccountDeltas = 129;
137 const int RAP_WNetAccountSync = 130;
138 const int RAP_WUserEnum2 = 131;
139 const int RAP_WWkstaUserLogon = 132;
140 const int RAP_WWkstaUserLogoff = 133;
141 const int RAP_WLogonEnum = 134;
142 const int RAP_WErrorLogRead = 135;
143 const int RAP_NetPathType = 136;
144 const int RAP_NetPathCanonicalize = 137;
145 const int RAP_NetPathCompare = 138;
146 const int RAP_NetNameValidate = 139;
147 const int RAP_NetNameCanonicalize = 140;
148 const int RAP_NetNameCompare = 141;
149 const int RAP_WAuditRead = 142;
150 const int RAP_WPrintDestAdd = 143;
151 const int RAP_WPrintDestSetInfo = 144;
152 const int RAP_WPrintDestDel = 145;
153 const int RAP_WUserValidate2 = 146;
154 const int RAP_WPrintJobSetInfo = 147;
155 const int RAP_TI_NetServerDiskEnum = 148;
156 const int RAP_TI_NetServerDiskGetInfo = 149;
157 const int RAP_TI_FTVerifyMirror = 150;
158 const int RAP_TI_FTAbortVerify = 151;
159 const int RAP_TI_FTGetInfo = 152;
160 const int RAP_TI_FTSetInfo = 153;
161 const int RAP_TI_FTLockDisk = 154;
162 const int RAP_TI_FTFixError = 155;
163 const int RAP_TI_FTAbortFix = 156;
164 const int RAP_TI_FTDiagnoseError = 157;
165 const int RAP_TI_FTGetDriveStats = 158;
166 const int RAP_TI_FTErrorGetInfo = 160;
167 const int RAP_NetAccessCheck = 163;
168 const int RAP_NetAlertRaise = 164;
169 const int RAP_NetAlertStart = 165;
170 const int RAP_NetAlertStop = 166;
171 const int RAP_NetAuditWrite = 167;
172 const int RAP_NetIRemoteAPI = 168;
173 const int RAP_NetServiceStatus = 169;
174 const int RAP_NetServerRegister = 170;
175 const int RAP_NetServerDeregister = 171;
176 const int RAP_NetSessionEntryMake = 172;
177 const int RAP_NetSessionEntryClear = 173;
178 const int RAP_NetSessionEntryGetInfo = 174;
179 const int RAP_NetSessionEntrySetInfo = 175;
180 const int RAP_NetConnectionEntryMake = 176;
181 const int RAP_NetConnectionEntryClear = 177;
182 const int RAP_NetConnectionEntrySetInfo = 178;
183 const int RAP_NetConnectionEntryGetInfo = 179;
184 const int RAP_NetFileEntryMake = 180;
185 const int RAP_NetFileEntryClear = 181;
186 const int RAP_NetFileEntrySetInfo = 182;
187 const int RAP_NetFileEntryGetInfo = 183;
188 const int RAP_AltSrvMessageBufferSend = 184;
189 const int RAP_AltSrvMessageFileSend = 185;
190 const int RAP_wI_NetRplWkstaEnum = 186;
191 const int RAP_wI_NetRplWkstaGetInfo = 187;
192 const int RAP_wI_NetRplWkstaSetInfo = 188;
193 const int RAP_wI_NetRplWkstaAdd = 189;
194 const int RAP_wI_NetRplWkstaDel = 190;
195 const int RAP_wI_NetRplProfileEnum = 191;
196 const int RAP_wI_NetRplProfileGetInfo = 192;
197 const int RAP_wI_NetRplProfileSetInfo = 193;
198 const int RAP_wI_NetRplProfileAdd = 194;
199 const int RAP_wI_NetRplProfileDel = 195;
200 const int RAP_wI_NetRplProfileClone = 196;
201 const int RAP_wI_NetRplBaseProfileEnum = 197;
202 const int RAP_WIServerSetInfo = 201;
203 const int RAP_WPrintDriverEnum = 205;
204 const int RAP_WPrintQProcessorEnum = 206;
205 const int RAP_WPrintPortEnum = 207;
206 const int RAP_WNetWriteUpdateLog = 208;
207 const int RAP_WNetAccountUpdate = 209;
208 const int RAP_WNetAccountConfirmUpdate = 210;
209 const int RAP_WConfigSet = 211;
210 const int RAP_WAccountsReplicate = 212;
211 const int RAP_SamOEMChgPasswordUser2_P = 214;
212 const int RAP_NetServerEnum3 = 215;
213 const int RAP_WprintDriverGetInfo = 250;
214 const int RAP_WprintDriverSetInfo = 251;
215 const int RAP_WaliasAdd = 252;
216 const int RAP_WaliasDel = 253;
217 const int RAP_WaliasGetInfo = 254;
218 const int RAP_WaliasSetInfo = 255;
219 const int RAP_WaliasEnum = 256;
220 const int RAP_WuserGetLogonAsn = 257;
221 const int RAP_WuserSetLogonAsn = 258;
222 const int RAP_WuserGetAppSel = 259;
223 const int RAP_WuserSetAppSel = 260;
224 const int RAP_WappAdd = 261;
225 const int RAP_WappDel = 262;
226 const int RAP_WappGetInfo = 263;
227 const int RAP_WappSetInfo = 264;
228 const int RAP_WappEnum = 265;
229 const int RAP_WUserDCDBInit = 266;
230 const int RAP_WDASDAdd = 267;
231 const int RAP_WDASDDel = 268;
232 const int RAP_WDASDGetInfo = 269;
233 const int RAP_WDASDSetInfo = 270;
234 const int RAP_WDASDEnum = 271;
235 const int RAP_WDASDCheck = 272;
236 const int RAP_WDASDCtl = 273;
237 const int RAP_WuserRemoteLogonCheck = 274;
238 const int RAP_WUserPasswordSet3 = 275;
239 const int RAP_WCreateRIPLMachine = 276;
240 const int RAP_WDeleteRIPLMachine = 277;
241 const int RAP_WGetRIPLMachineInfo = 278;
242 const int RAP_WSetRIPLMachineInfo = 279;
243 const int RAP_WEnumRIPLMachine = 280;
244 const int RAP_I_ShareAdd = 281;
245 const int RAP_AliasEnum = 282;
246 const int RAP_WaccessApply = 283;
247 const int RAP_WPrt16Query = 284;
248 const int RAP_WPrt16Set = 285;
249 const int RAP_WUserDel100 = 286;
250 const int RAP_WUserRemoteLogonCheck2 = 287;
251 const int RAP_WRemoteTODSet = 294;
252 const int RAP_WprintJobMoveAll = 295;
253 const int RAP_W16AppParmAdd = 296;
254 const int RAP_W16AppParmDel = 297;
255 const int RAP_W16AppParmGet = 298;
256 const int RAP_W16AppParmSet = 299;
257 const int RAP_W16RIPLMachineCreate = 300;
258 const int RAP_W16RIPLMachineGetInfo = 301;
259 const int RAP_W16RIPLMachineSetInfo = 302;
260 const int RAP_W16RIPLMachineEnum = 303;
261 const int RAP_W16RIPLMachineListParmEnum = 304;
262 const int RAP_W16RIPLMachClassGetInfo = 305;
263 const int RAP_W16RIPLMachClassEnum = 306;
264 const int RAP_W16RIPLMachClassCreate = 307;
265 const int RAP_W16RIPLMachClassSetInfo = 308;
266 const int RAP_W16RIPLMachClassDelete = 309;
267 const int RAP_W16RIPLMachClassLPEnum = 310;
268 const int RAP_W16RIPLMachineDelete = 311;
269 const int RAP_W16WSLevelGetInfo = 312;
270 const int RAP_WserverNameAdd = 313;
271 const int RAP_WserverNameDel = 314;
272 const int RAP_WserverNameEnum = 315;
273 const int RAP_I_WDASDEnum = 316;
274 const int RAP_WDASDEnumTerminate = 317;
275 const int RAP_WDASDSetInfo2 = 318;
276 const int MAX_API = 318;
278 /* sizes of fixed-length fields, including null terminator */
279 const int RAP_GROUPNAME_LEN = 21;
280 const int RAP_USERNAME_LEN = 21;
281 const int RAP_SHARENAME_LEN = 13;
282 const int RAP_UPASSWD_LEN = 16; /* user password */
283 const int RAP_SPASSWD_LEN = 9; /* share password */
284 const int RAP_MACHNAME_LEN = 16;
285 const int RAP_SRVCNAME_LEN = 16;
286 const int RAP_SRVCCMNT_LEN = 64;
287 const int RAP_DATATYPE_LEN = 10;
289 typedef struct {
290 uint8 group_name[21];
291 char reserved1;
292 astring *comment;
293 } rap_group_info_1;
295 typedef struct {
296 uint8 user_name[21];
297 char reserved1;
298 uint8 passwrd[16];
299 uint32 pwage;
300 uint16 priv;
301 astring *home_dir;
302 astring *comment;
303 uint16 userflags;
304 astring *logon_script;
305 } rap_user_info_1;
307 typedef struct {
308 uint8 service_name[16];
309 uint16 status;
310 uint32 installcode;
311 uint16 process_num;
312 astring *comment;
313 } rap_service_info_2;
315 typedef struct {
316 uint8 share_name[13];
317 } rap_share_info_0;
319 typedef struct {
320 uint8 share_name[13];
321 char reserved1;
322 uint16 share_type;
323 astring *comment;
324 } rap_share_info_1;
326 typedef struct {
327 uint8 share_name[13];
328 char reserved1;
329 uint16 share_type;
330 astring *comment;
331 uint16 perms;
332 uint16 maximum_users;
333 uint16 active_users;
334 astring *path;
335 uint8 password[9];
336 char reserved2;
337 } rap_share_info_2;
339 typedef [nodiscriminant] union {
340 [case(0)] rap_share_info_0 info0;
341 [case(1)] rap_share_info_1 info1;
342 [case(2)] rap_share_info_2 info2;
343 } rap_share_info;
345 [public] void rap_NetShareEnum(
346 [in] uint16 level,
347 [in] uint16 bufsize,
348 [out] rap_status status,
349 [out] uint16 convert,
350 [out] uint16 count,
351 [out] uint16 available,
352 [out,switch_is(level)] rap_share_info *info
355 /* not documented in MS-RAP */
356 [public] void rap_NetShareAdd(
357 [in] uint16 level,
358 [in] uint16 bufsize,
359 [in,switch_is(level)] rap_share_info info,
360 [out] rap_status status,
361 [out] uint16 convert
364 typedef struct {
365 uint8 name[16];
366 } rap_server_info_0;
368 typedef struct {
369 uint8 name[16];
370 uint8 version_major;
371 uint8 version_minor;
372 uint32 servertype;
373 astring *comment;
374 } rap_server_info_1;
376 typedef [nodiscriminant] union {
377 [case(0)] rap_server_info_0 info0;
378 [case(1)] rap_server_info_1 info1;
379 } rap_server_info;
381 [public] void rap_NetServerEnum2(
382 [in] uint16 level,
383 [in] uint16 bufsize,
384 [in] uint32 servertype,
385 [in] astring *domain,
386 [out] rap_status status,
387 [out] uint16 convert,
388 [out] uint16 count,
389 [out] uint16 available,
390 [out,switch_is(level)] rap_server_info info[count]
393 [public] void rap_WserverGetInfo(
394 [in] uint16 level,
395 [in] uint16 bufsize,
396 [out] rap_status status,
397 [out] uint16 convert,
398 [out] uint16 available,
399 [out,switch_is(level)] rap_server_info info
402 typedef [public] enum {
403 PRJ_QS_QUEUED = 0x0000,
404 PRJ_QS_PAUSED = 0x0001,
405 PRJ_QS_SPOOLING = 0x0002,
406 PRJ_QS_PRINTING = 0x0003,
407 PRJ_QS_ERROR = 0x0010
408 } rap_PrintJStatusCode;
410 typedef struct {
411 uint16 JobID;
412 } rap_PrintJobInfo0;
414 typedef struct {
415 uint16 JobID;
416 [charset(DOS)] uint8 UserName[21];
417 uint8 Pad;
418 [charset(DOS)] uint8 NotifyName[16];
419 [charset(DOS)] uint8 DataType[10];
420 [relative_short] astring *PrintParameterString;
421 uint16 PrintParameterStringHigh;
422 uint16 JobPosition;
423 rap_PrintJStatusCode JobStatus;
424 [relative_short] astring *JobStatusString;
425 uint16 JobStatusStringHigh;
426 time_t TimeSubmitted;
427 uint32 JobSize;
428 [relative_short] astring *JobCommentString;
429 uint16 JobCommentStringHigh;
430 } rap_PrintJobInfo1;
432 typedef struct {
433 uint16 JobID;
434 uint16 Priority;
435 [relative_short] astring *UserName;
436 uint16 UserNameHigh;
437 uint16 JobPosition;
438 rap_PrintJStatusCode JobStatus;
439 time_t TimeSubmitted;
440 uint32 JobSize;
441 [relative_short] astring *JobCommentString;
442 uint16 JobCommentStringHigh;
443 [relative_short] astring *DocumentName;
444 uint16 DocumentNameHigh;
445 } rap_PrintJobInfo2;
447 typedef struct {
448 uint16 JobID;
449 uint16 Priority;
450 [relative_short] astring *UserName;
451 uint16 UserNameHigh;
452 uint16 JobPosition;
453 rap_PrintJStatusCode JobStatus;
454 time_t TimeSubmitted;
455 uint32 JobSize;
456 [relative_short] astring *JobCommentString;
457 uint16 JobCommentStringHigh;
458 [relative_short] astring *DocumentName;
459 uint16 DocumentNameHigh;
460 [relative_short] astring *NotifyName;
461 uint16 NotifyNameHigh;
462 [relative_short] astring *DataType;
463 uint16 DataTypeHigh;
464 [relative_short] astring *PrintParameterString;
465 uint16 PrintParameterStringHigh;
466 [relative_short] astring *StatusString;
467 uint16 StatusStringHigh;
468 [relative_short] astring *QueueName;
469 uint16 QueueNameHigh;
470 [relative_short] astring *PrintProcessorName;
471 uint16 PrintProcessorNameHigh;
472 [relative_short] astring *PrintProcessorParams;
473 uint16 PrintProcessorParamsHigh;
474 [relative_short] astring *DriverName;
475 uint16 DriverNameHigh;
476 [relative_short] astring *DriverDataOffset;
477 uint16 DriverDataOffsetHigh;
478 [relative_short] astring *PrinterNameOffset;
479 uint16 PrinterNameOffsetHigh;
480 } rap_PrintJobInfo3;
482 typedef [public,nodiscriminant] union {
483 [case(0)] rap_PrintJobInfo0 info0;
484 [case(1)] rap_PrintJobInfo1 info1;
485 [case(2)] rap_PrintJobInfo2 info2;
486 [case(3)] rap_PrintJobInfo3 info3;
487 } rap_printj_info;
489 typedef [public] enum {
490 PRQ_ACTIVE = 0x0000,
491 PRQ_PAUSE = 0x0001,
492 PRQ_ERROR = 0x0002,
493 PRQ_PENDING = 0x0003
494 } rap_PrintQStatusCode;
496 typedef struct {
497 [charset(DOS)] uint8 PrintQName[13];
498 } rap_PrintQueue0;
500 typedef struct {
501 [charset(DOS)] uint8 PrintQName[13];
502 uint8 Pad1;
503 uint16 Priority;
504 uint16 StartTime;
505 uint16 UntilTime;
506 [relative_short] astring *SeparatorPageFilename;
507 uint16 SeparatorPageFilenameHigh;
508 [relative_short] astring *PrintProcessorDllName;
509 uint16 PrintProcessorDllNameHigh;
510 [relative_short] astring *PrintDestinationsName;
511 uint16 PrintDestinationsNameHigh;
512 [relative_short] astring *PrintParameterString;
513 uint16 PrintParameterStringHigh;
514 [relative_short] astring *CommentString;
515 uint16 CommentStringHigh;
516 rap_PrintQStatusCode PrintQStatus;
517 uint16 PrintJobCount;
518 } rap_PrintQueue1;
520 typedef struct {
521 rap_PrintQueue1 queue;
522 rap_PrintJobInfo1 job[queue.PrintJobCount];
523 } rap_PrintQueue2;
525 typedef [public] struct {
526 [relative_short] astring *PrintQueueName;
527 uint16 PrintQueueNameHigh;
528 uint16 Priority;
529 uint16 StartTime;
530 uint16 UntilTime;
531 uint16 Pad;
532 [relative_short] astring *SeparatorPageFilename;
533 uint16 SeparatorPageFilenameHigh;
534 [relative_short] astring *PrintProcessorDllName;
535 uint16 PrintProcessorDllNameHigh;
536 [relative_short] astring *PrintParameterString;
537 uint16 PrintParameterStringHigh;
538 [relative_short] astring *CommentString;
539 uint16 CommentStringHigh;
540 rap_PrintQStatusCode PrintQStatus;
541 uint16 PrintJobCount;
542 [relative_short] astring *Printers;
543 uint16 PrintersHigh;
544 [relative_short] astring *DriverName;
545 uint16 DriverNameHigh;
546 [relative_short] astring *PrintDriverData;
547 uint16 PrintDriverDataHigh;
548 } rap_PrintQueue3;
550 typedef struct {
551 rap_PrintQueue3 queue;
552 rap_PrintJobInfo2 job[queue.PrintJobCount];
553 } rap_PrintQueue4;
555 typedef struct {
556 [relative_short] astring *PrintQueueName;
557 uint16 PrintQueueNameHigh;
558 } rap_PrintQueue5;
560 typedef [public,nodiscriminant] union {
561 [case(0)] rap_PrintQueue0 info0;
562 [case(1)] rap_PrintQueue1 info1;
563 [case(2)] rap_PrintQueue2 info2;
564 [case(3)] rap_PrintQueue3 info3;
565 [case(4)] rap_PrintQueue4 info4;
566 [case(5)] rap_PrintQueue5 info5;
567 } rap_printq_info;
569 [public] void rap_NetPrintQEnum(
570 [in] uint16 level,
571 [in] uint16 bufsize,
572 [out] rap_status status,
573 [out] uint16 convert,
574 [out] uint16 count,
575 [out] uint16 available,
576 [out,switch_is(level)] rap_printq_info info[count]
579 [public] void rap_NetPrintQGetInfo(
580 [in] astring PrintQueueName,
581 [in] uint16 level,
582 [in] uint16 bufsize,
583 [out] rap_status status,
584 [out] uint16 convert,
585 [out] uint16 available,
586 [out,switch_is(level)] rap_printq_info info
589 [public] void rap_NetPrintJobPause(
590 [in] uint16 JobID,
591 [out] rap_status status,
592 [out] uint16 convert
595 [public] void rap_NetPrintJobContinue(
596 [in] uint16 JobID,
597 [out] rap_status status,
598 [out] uint16 convert
601 [public] void rap_NetPrintJobDelete(
602 [in] uint16 JobID,
603 [out] rap_status status,
604 [out] uint16 convert
607 /* not documented in MS-RAP */
608 [public] void rap_NetPrintQueuePause(
609 [in] astring PrintQueueName,
610 [out] rap_status status,
611 [out] uint16 convert
614 /* not documented in MS-RAP */
615 [public] void rap_NetPrintQueueResume(
616 [in] astring PrintQueueName,
617 [out] rap_status status,
618 [out] uint16 convert
621 /* not documented in MS-RAP */
622 [public] void rap_NetPrintQueuePurge(
623 [in] astring PrintQueueName,
624 [out] rap_status status,
625 [out] uint16 convert
628 /* not documented in MS-RAP */
629 [public] void rap_NetPrintJobEnum(
630 [in] astring PrintQueueName,
631 [in] uint16 level,
632 [in] uint16 bufsize,
633 [out] rap_status status,
634 [out] uint16 convert,
635 [out] uint16 count,
636 [out] uint16 available,
637 [out,switch_is(level)] rap_printj_info info[count]
640 [public] void rap_NetPrintJobGetInfo(
641 [in] uint16 JobID,
642 [in] uint16 level,
643 [in] uint16 bufsize,
644 [out] rap_status status,
645 [out] uint16 convert,
646 [out] uint16 available,
647 [out,switch_is(level)] rap_printj_info info
650 typedef enum {
651 RAP_PARAM_JOBNUM = 0x0001,
652 RAP_PARAM_USERNAME = 0x0002,
653 RAP_PARAM_NOTIFYNAME = 0x0003,
654 RAP_PARAM_DATATYPE = 0x0004,
655 RAP_PARAM_PARAMETERS_STRING = 0x0005,
656 RAP_PARAM_JOBPOSITION = 0x0006,
657 RAP_PARAM_JOBSTATUS = 0x0007,
658 RAP_PARAM_JOBSTATUSSTR = 0x0008,
659 RAP_PARAM_TIMESUBMITTED = 0x0009,
660 RAP_PARAM_JOBSIZE = 0x000a,
661 RAP_PARAM_JOBCOMMENT = 0x000b
662 } rap_JobInfoParamNum;
664 typedef [nodiscriminant] union {
665 [case (RAP_PARAM_JOBNUM)] uint16 value;
666 [case (RAP_PARAM_USERNAME)] astring string;
667 [case (RAP_PARAM_NOTIFYNAME)] astring string;
668 [case (RAP_PARAM_DATATYPE)] astring string;
669 [case (RAP_PARAM_PARAMETERS_STRING)] astring string;
670 [case (RAP_PARAM_JOBPOSITION)] uint16 value;
671 [case (RAP_PARAM_JOBSTATUS)] uint16 value;
672 [case (RAP_PARAM_JOBSTATUSSTR)] astring string;
673 [case (RAP_PARAM_TIMESUBMITTED)] uint32 value4;
674 [case (RAP_PARAM_JOBSIZE)] uint32 value4;
675 [case (RAP_PARAM_JOBCOMMENT)] astring string;
676 } rap_JobInfoParam;
678 [public] void rap_NetPrintJobSetInfo(
679 [in] uint16 JobID,
680 [in] uint16 level,
681 [in] uint16 bufsize,
682 [in] rap_JobInfoParamNum ParamNum,
683 [in,switch_is(ParamNum)] rap_JobInfoParam Param,
684 [out] rap_status status,
685 [out] uint16 convert
688 /* all not documented in MS-RAP */
690 typedef struct {
691 [charset(DOS)] uint8 PrintDestName[9];
692 } rap_PrintDest0;
694 typedef struct {
695 [charset(DOS)] uint8 PrintDestName[9];
696 [charset(DOS)] uint8 UserName[21];
697 uint16 JobId;
698 uint16 Status;
699 [relative_short] astring *StatusStringName;
700 uint16 PrintQueueNameHigh;
701 uint16 Time;
702 } rap_PrintDest1;
704 typedef struct {
705 [relative_short] astring *PrinterName;
706 uint16 PrinterNameHigh;
707 } rap_PrintDest2;
709 typedef struct {
710 [relative_short] astring *PrinterName;
711 uint16 PrinterNameHigh;
712 [relative_short] astring *UserName;
713 uint16 UserNameHigh;
714 [relative_short] astring *LogAddr;
715 uint16 LogAddrHigh;
716 uint16 JobId;
717 uint16 Status;
718 [relative_short] astring *StatusStringName;
719 uint16 PrintQueueNameHigh;
720 [relative_short] astring *Comment;
721 uint16 CommentHigh;
722 [relative_short] astring *Drivers;
723 uint16 DriversHigh;
724 uint16 Time;
725 uint16 Pad1;
726 } rap_PrintDest3;
728 typedef [public,nodiscriminant] union {
729 [case(0)] rap_PrintDest0 info0;
730 [case(1)] rap_PrintDest1 info1;
731 [case(2)] rap_PrintDest2 info2;
732 [case(3)] rap_PrintDest3 info3;
733 } rap_printdest_info;
735 /* not documented in MS-RAP */
736 [public] void rap_NetPrintDestEnum(
737 [in] uint16 level,
738 [in] uint16 bufsize,
739 [out] rap_status status,
740 [out] uint16 convert,
741 [out] uint16 count,
742 [out] uint16 available,
743 [out,switch_is(level)] rap_printdest_info info[count]
746 /* not documented in MS-RAP */
747 [public] void rap_NetPrintDestGetInfo(
748 [in] astring PrintDestName,
749 [in] uint16 level,
750 [in] uint16 bufsize,
751 [out] rap_status status,
752 [out] uint16 convert,
753 [out] uint16 available,
754 [out,switch_is(level)] rap_printdest_info info
757 [public] void rap_NetUserPasswordSet2(
758 [in] astring UserName,
759 [in] uint8 OldPassword[16],
760 [in] uint8 NewPassword[16],
761 [in] uint16 EncryptedPassword,
762 [in] uint16 RealPasswordLength,
763 [out] rap_status status,
764 [out] uint16 convert
767 /* not documented in MS-RAP */
768 [public] void rap_NetOEMChangePassword(
769 [in] astring UserName,
770 [in] uint8 crypt_password[516],
771 [in] uint8 password_hash[16],
772 [out] rap_status status,
773 [out] uint16 convert
776 typedef struct {
777 [charset(DOS)] uint8 Name[21];
778 } rap_NetUserInfo0;
780 typedef [public] enum {
781 USER_PRIV_GUEST = 0,
782 USER_PRIV_USER = 1,
783 USER_PRIV_ADMIN = 2
784 } rap_UserPriv;
786 typedef struct {
787 [charset(DOS)] uint8 Name[21];
788 uint8 Pad;
789 uint8 Password[16];
790 time_t PasswordAge;
791 rap_UserPriv Priv;
792 [relative_short] astring *HomeDir;
793 uint16 HomeDirHigh;
794 [relative_short] astring *Comment;
795 uint16 CommentHigh;
796 uint16 Flags; /* FIXME */
797 [relative_short] astring *ScriptPath;
798 uint16 ScriptPathHigh;
799 } rap_NetUserInfo1;
801 typedef [public,v1_enum] enum {
802 AF_OP_PRINT = 0,
803 AF_OP_COMM = 1,
804 AF_OP_SERVER = 2,
805 AF_OP_ACCOUNTS = 3
806 } rap_AuthFlags;
808 typedef [public] struct {
809 uint8 LogonHours[21];
810 } rap_LogonHours;
812 typedef struct {
813 [charset(DOS)] uint8 Name[21];
814 uint8 Pad;
815 uint8 Password[16];
816 time_t PasswordAge;
817 rap_UserPriv Priv;
818 [relative_short] astring *HomeDir;
819 uint16 HomeDirHigh;
820 [relative_short] astring *Comment;
821 uint16 CommentHigh;
822 uint16 Flags; /* FIXME */
823 [relative_short] astring *ScriptPath;
824 uint16 ScriptPathHigh;
825 rap_AuthFlags AuthFlags;
826 [relative_short] astring *FullName;
827 uint16 FullNameHigh;
828 [relative_short] astring *UsrComment;
829 uint16 UsrCommentHigh;
830 [relative_short] astring *pParms;
831 uint16 pParmsHigh;
832 [relative_short] astring *WorkStations;
833 uint16 WorkStationsHigh;
834 time_t LastLogon;
835 time_t LastLogOff;
836 time_t AcctExpires;
837 uint32 MaxStorage;
838 uint16 UnitsPerWeek;
839 [relative_short] rap_LogonHours *LogonHours;
840 uint16 LogonHoursHigh;
841 uint16 BadPwCount;
842 uint16 NumLogons;
843 [relative_short] astring *LogonServer;
844 uint16 LogonServerHigh;
845 uint16 CountryCode;
846 uint16 CodePage;
847 } rap_NetUserInfo2;
849 typedef struct {
850 [charset(DOS)] uint8 Name[21];
851 uint8 Pad;
852 [relative_short] astring *Comment;
853 uint16 CommentHigh;
854 [relative_short] astring *UsrComment;
855 uint16 UsrCommentHigh;
856 [relative_short] astring *FullName;
857 uint16 FullNameHigh;
858 } rap_NetUserInfo10;
860 typedef struct {
861 [charset(DOS)] uint8 Name[21];
862 uint8 Pad;
863 [relative_short] astring *Comment;
864 uint16 CommentHigh;
865 [relative_short] astring *UsrComment;
866 uint16 UsrCommentHigh;
867 [relative_short] astring *FullName;
868 uint16 FullNameHigh;
869 rap_UserPriv Priv;
870 rap_AuthFlags AuthFlags;
871 time_t PasswordAge;
872 [relative_short] astring *HomeDir;
873 uint16 HomeDirHigh;
874 [relative_short] astring *Parms;
875 uint16 ParmsHigh;
876 time_t LastLogon;
877 time_t LastLogOff;
878 uint16 BadPWCount;
879 uint16 NumLogons;
880 [relative_short] astring *LogonServer;
881 uint16 LogonServerHigh;
882 uint16 CountryCode;
883 [relative_short] astring *WorkStations;
884 uint16 WorkStationsHigh;
885 uint32 MaxStorage;
886 uint16 UnitsPerWeek;
887 [relative_short] rap_LogonHours *LogonHours;
888 uint16 LogonHoursHigh;
889 uint16 CodePage;
890 } rap_NetUserInfo11;
892 typedef [public,nodiscriminant] union {
893 [case(0)] rap_NetUserInfo0 info0;
894 [case(1)] rap_NetUserInfo1 info1;
895 [case(2)] rap_NetUserInfo2 info2;
896 [case(10)] rap_NetUserInfo10 info10;
897 [case(11)] rap_NetUserInfo11 info11;
898 } rap_netuser_info;
900 [public] void rap_NetUserGetInfo(
901 [in] astring UserName,
902 [in] uint16 level,
903 [in] uint16 bufsize,
904 [out] rap_status status,
905 [out] uint16 convert,
906 [out] uint16 available,
907 [out,switch_is(level)] rap_netuser_info info
910 typedef struct {
911 [relative_short] astring *ComputerName;
912 uint16 ComputerNameHigh;
913 [relative_short] astring *UserName;
914 uint16 UserNameHigh;
915 uint16 num_conns;
916 uint16 num_opens;
917 uint16 num_users;
918 uint32 sess_time;
919 uint32 idle_time;
920 uint32 user_flags;
921 [relative_short] astring *CliTypeName;
922 uint16 CliTypeNameHigh;
923 } rap_session_info_2;
925 typedef [public,nodiscriminant] union {
926 [case(2)] rap_session_info_2 info2;
927 } rap_session_info;
929 /* not documented in MS-RAP */
930 [public] void rap_NetSessionEnum(
931 [in] uint16 level,
932 [in] uint16 bufsize,
933 [out] rap_status status,
934 [out] uint16 convert,
935 [out] uint16 count,
936 [out] uint16 available,
937 [out,switch_is(level)] rap_session_info info[count]
940 /* not documented in MS-RAP */
941 [public] void rap_NetSessionGetInfo(
942 [in] astring SessionName,
943 [in] uint16 level,
944 [in] uint16 bufsize,
945 [out] rap_status status,
946 [out] uint16 convert,
947 [out] uint16 available,
948 [out,switch_is(level)] rap_session_info info
951 /* not documented in MS-RAP */
952 [public] void rap_NetUserAdd(
953 [in] uint16 level,
954 [in] uint16 bufsize,
955 [in] uint16 pwdlength,
956 [in] uint16 unknown,
957 [in,switch_is(level)] rap_netuser_info info,
958 [out] rap_status status,
959 [out] uint16 convert
962 /* not documented in MS-RAP */
963 [public] void rap_NetUserDelete(
964 [in] astring UserName,
965 [out] rap_status status,
966 [out] uint16 convert
969 typedef [public] struct {
970 uint32 TimeSinceJan11970;
971 uint32 TimeSinceBoot;
972 uint8 Hours;
973 uint8 Minutes;
974 uint8 Seconds;
975 uint8 Hundreds;
976 uint16 TimeZone;
977 uint16 ClockFrequency;
978 uint8 Day;
979 uint8 Month;
980 uint16 Year;
981 uint8 Weekday;
982 } rap_TimeOfDayInfo;
984 [public] void rap_NetRemoteTOD(
985 [in] uint16 bufsize,
986 [out] rap_status status,
987 [out] uint16 convert,
988 [out] rap_TimeOfDayInfo tod
991 /* Parameter description strings for RAP calls */
992 /* Names are defined name for RAP call with _REQ */
993 /* appended to end. */
995 const string RAP_WFileEnum2_REQ = "zzWrLehb8g8";
996 const string RAP_WFileGetInfo2_REQ = "DWrLh";
997 const string RAP_WFileClose2_REQ = "D";
999 const string RAP_NetGroupEnum_REQ = "WrLeh";
1000 const string RAP_NetGroupAdd_REQ = "WsT";
1001 const string RAP_NetGroupDel_REQ = "z";
1002 const string RAP_NetGroupAddUser_REQ = "zz";
1003 const string RAP_NetGroupDelUser_REQ = "zz";
1004 const string RAP_NetGroupGetUsers_REQ = "zWrLeh";
1005 const string RAP_NetGroupSetUsers_REQ = "zWsTW";
1007 const string RAP_NetUserAdd2_REQ = "WsTWW";
1008 const string RAP_NetUserEnum_REQ = "WrLeh";
1009 const string RAP_NetUserEnum2_REQ = "WrLDieh";
1010 const string RAP_NetUserGetGroups_REQ = "zWrLeh";
1011 const string RAP_NetUserSetGroups_REQ = "zWsTW";
1012 const string RAP_NetUserPasswordSet_REQ = "zb16b16w";
1013 const string RAP_NetUserPasswordSet2_REQ = "zb16b16WW";
1014 const string RAP_SAMOEMChgPasswordUser2_REQ = "B516B16";
1015 const string RAP_NetUserValidate2_REQ = "Wb62WWrLhWW";
1017 const string RAP_NetServerEnum2_REQ = "WrLehDz";
1018 const string RAP_WserverGetInfo_REQ = "WrLh";
1019 const string RAP_NetWkstatGetInfo = "WrLh";
1021 const string RAP_WShareAdd_REQ = "WsT";
1022 const string RAP_WShareEnum_REQ = "WrLeh";
1023 const string RAP_WShareDel_REQ = "zW";
1024 const string RAP_WWkstaGetInfo_REQ = "WrLh";
1026 const string RAP_NetPrintQEnum_REQ = "WrLeh";
1027 const string RAP_NetPrintQGetInfo_REQ = "zWrLh";
1029 const string RAP_NetServerAdminCommand_REQ = "zhrLeh";
1030 const string RAP_NetServiceEnum_REQ = "WrLeh";
1031 const string RAP_NetServiceControl_REQ = "zWWrL";
1032 const string RAP_NetServiceInstall_REQ = "zF88sg88T";
1033 const string RAP_NetServiceGetInfo_REQ = "zWrLh";
1034 const string RAP_NetSessionEnum_REQ = "WrLeh";
1035 const string RAP_NetSessionGetInfo_REQ = "zWrLh";
1036 const string RAP_NetSessionDel_REQ = "zW";
1038 const string RAP_NetConnectionEnum_REQ = "zWrLeh";
1040 const string RAP_NetWkstaUserLogoff_REQ = "zzWb38WrLh";
1042 /* Description strings for returned data in RAP calls */
1043 /* I use all caps here in part to avoid accidental */
1044 /* name collisions */
1046 const string RAP_FILE_INFO_L2 = "D";
1047 const string RAP_FILE_INFO_L3 = "DWWzz";
1048 const string RAP_GROUP_INFO_L0 = "B21";
1049 const string RAP_GROUP_INFO_L1 = "B21Bz";
1050 const string RAP_GROUP_USERS_INFO_0 = "B21";
1051 const string RAP_GROUP_USERS_INFO_1 = "B21BN";
1053 const string RAP_USER_INFO_L0 = "B21";
1054 const string RAP_USER_INFO_L1 = "B21BB16DWzzWz";
1056 const string RAP_SERVER_INFO_L0 = "B16";
1057 const string RAP_SERVER_INFO_L1 = "B16BBDz";
1058 const string RAP_SERVER_INFO_L2 = "B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWz";
1059 const string RAP_SERVER_INFO_L3 = "B16BBDzDDDWWzWWWWWWWB21BzWWWWWWWWWWWWWWWWWWWWWWzDWz";
1060 const string RAP_SERVICE_INFO_L0 = "B16";
1061 const string RAP_SERVICE_INFO_L2 = "B16WDWB64";
1062 const string RAP_SHARE_INFO_L0 = "B13";
1063 const string RAP_SHARE_INFO_L1 = "B13BWz";
1064 const string RAP_SHARE_INFO_L2 = "B13BWzWWWzB9B";
1066 const string RAP_PRINTQ_INFO_L2 = "B13BWWWzzzzzWN";
1067 const string RAP_SMB_PRINT_JOB_L1 = "WB21BB16B10zWWzDDz";
1069 const string RAP_SESSION_INFO_L2 = "zzWWWDDDz";
1070 const string RAP_CONNECTION_INFO_L1 = "WWWWDzz";
1072 const string RAP_USER_LOGOFF_INFO_L1 = "WDW";
1074 const string RAP_WKSTA_INFO_L1 = "WDzzzzBBDWDWWWWWWWWWWWWWWWWWWWzzWzzW";
1075 const string RAP_WKSTA_INFO_L10 = "zzzBBzz";