Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / afsclass / worker.h
1 #ifndef WORKER_H
2 #define WORKER_H
3 extern "C" {
4 #include <afs/afs_Admin.h>
5 #include <afs/afs_utilAdmin.h>
6 #include <afs/afs_vosAdmin.h>
7 #include <afs/afs_bosAdmin.h>
8 #include <afs/afs_kasAdmin.h>
9 #include <afs/afs_ptsAdmin.h>
10 #include <afs/afs_clientAdmin.h>
11 #include <afs/pterror.h>
12
13 #define __KAUTILS__ // prevents including anything but error #s from kautils.h
14 #include <afs/kautils.h>
15 } // extern "C"
16
17
18 /*
19  * DEFINITIONS ________________________________________________________________
20  *
21  */
22
23 #define NO_PARTITION  ((unsigned int)-1)
24 #define NO_VOLUME     ((VOLUMEID)-1)
25
26 typedef enum // WORKERTASK
27    {
28    wtaskVosBackupVolumeCreate,
29    wtaskVosBackupVolumeCreateMultiple,
30    wtaskVosPartitionGet,
31    wtaskVosPartitionGetBegin,
32    wtaskVosPartitionGetNext,
33    wtaskVosPartitionGetDone,
34    wtaskVosServerOpen,
35    wtaskVosServerClose,
36    wtaskVosServerSync,
37    wtaskVosFileServerAddressChange,
38    wtaskVosFileServerAddressRemove,
39    wtaskVosFileServerGetBegin,
40    wtaskVosFileServerGetNext,
41    wtaskVosFileServerGetDone,
42    wtaskVosServerTransactionStatusGetBegin,
43    wtaskVosServerTransactionStatusGetNext,
44    wtaskVosServerTransactionStatusGetDone,
45    wtaskVosVLDBGet,
46    wtaskVosVLDBGetBegin,
47    wtaskVosVLDBGetNext,
48    wtaskVosVLDBGetDone,
49    wtaskVosVLDBEntryRemove,
50    wtaskVosVLDBEntryLock,
51    wtaskVosVLDBEntryUnlock,
52    wtaskVosVLDBReadOnlySiteCreate,
53    wtaskVosVLDBReadOnlySiteDelete,
54    wtaskVosVLDBSync,
55    wtaskVosVolumeCreate,
56    wtaskVosVolumeDelete,
57    wtaskVosVolumeRename,
58    wtaskVosVolumeDump,
59    wtaskVosVolumeRestore,
60    wtaskVosVolumeOnline,
61    wtaskVosVolumeOffline,
62    wtaskVosVolumeGet,
63    wtaskVosVolumeGetBegin,
64    wtaskVosVolumeGetNext,
65    wtaskVosVolumeGetDone,
66    wtaskVosVolumeMove,
67    wtaskVosVolumeRelease,
68    wtaskVosVolumeZap,
69    wtaskVosPartitionNameToId,
70    wtaskVosPartitionIdToName,
71    wtaskVosVolumeQuotaChange,
72    wtaskBosServerOpen,
73    wtaskBosServerClose,
74    wtaskBosProcessCreate,
75    wtaskBosProcessDelete,
76    wtaskBosProcessExecutionStateGet,
77    wtaskBosAuxiliaryProcessStatusDeallocate,
78    wtaskBosProcessExecutionStateSet,
79    wtaskBosProcessExecutionStateSetTemporary,
80    wtaskBosProcessNameGetBegin,
81    wtaskBosProcessNameGetDone,
82    wtaskBosProcessNameGetNext,
83    wtaskBosProcessInfoGet,
84    wtaskBosProcessParameterGetBegin,
85    wtaskBosProcessParameterGetDone,
86    wtaskBosProcessParameterGetNext,
87    wtaskBosProcessNotifierGet,
88    wtaskBosProcessRestart,
89    wtaskBosProcessAllStop,
90    wtaskBosProcessAllStart,
91    wtaskBosProcessAllWaitStop,
92    wtaskBosProcessAllStopAndRestart,
93    wtaskBosAdminCreate,
94    wtaskBosAdminDelete,
95    wtaskBosAdminGetBegin,
96    wtaskBosAdminGetDone,
97    wtaskBosAdminGetNext,
98    wtaskBosKeyCreate,
99    wtaskBosKeyDelete,
100    wtaskBosKeyGetBegin,
101    wtaskBosKeyGetDone,
102    wtaskBosKeyGetNext,
103    wtaskBosCellSet,
104    wtaskBosCellGet,
105    wtaskBosHostCreate,
106    wtaskBosHostDelete,
107    wtaskBosHostGetBegin,
108    wtaskBosHostGetDone,
109    wtaskBosHostGetNext,
110    wtaskBosExecutableCreate,
111    wtaskBosExecutableRevert,
112    wtaskBosExecutableTimestampGet,
113    wtaskBosExecutablePrune,
114    wtaskBosExecutableRestartTimeSet,
115    wtaskBosExecutableRestartTimeGet,
116    wtaskBosLogGet,
117    wtaskBosAuthSet,
118    wtaskBosCommandExecute,
119    wtaskBosSalvage,
120    wtaskKasServerOpen,
121    wtaskKasServerClose,
122    wtaskKasServerRandomKeyGet,
123    wtaskKasStringToKey,
124    wtaskKasPrincipalCreate,
125    wtaskKasPrincipalDelete,
126    wtaskKasPrincipalGet,
127    wtaskKasPrincipalGetBegin,
128    wtaskKasPrincipalGetNext,
129    wtaskKasPrincipalGetDone,
130    wtaskKasPrincipalKeySet,
131    wtaskKasPrincipalLockStatusGet,
132    wtaskKasPrincipalUnlock,
133    wtaskKasPrincipalFieldsSet,
134    wtaskPtsGroupMemberAdd,
135    wtaskPtsGroupOwnerChange,
136    wtaskPtsGroupCreate,
137    wtaskPtsGroupGet,
138    wtaskPtsGroupDelete,
139    wtaskPtsGroupMaxGet,
140    wtaskPtsGroupMaxSet,
141    wtaskPtsGroupMemberListBegin,
142    wtaskPtsGroupMemberListNext,
143    wtaskPtsGroupMemberListDone,
144    wtaskPtsGroupMemberRemove,
145    wtaskPtsGroupRename,
146    wtaskPtsGroupModify,
147    wtaskPtsUserCreate,
148    wtaskPtsUserDelete,
149    wtaskPtsUserGet,
150    wtaskPtsUserRename,
151    wtaskPtsUserModify,
152    wtaskPtsUserMaxGet,
153    wtaskPtsUserMaxSet,
154    wtaskPtsUserMemberListBegin,
155    wtaskPtsUserMemberListNext,
156    wtaskPtsUserMemberListDone,
157    wtaskPtsOwnedGroupListBegin,
158    wtaskPtsOwnedGroupListNext,
159    wtaskPtsOwnedGroupListDone,
160    wtaskClientTokenGetExisting,
161    wtaskClientCellOpen,
162    wtaskClientCellClose,
163    wtaskClientLocalCellGet,
164    wtaskClientAFSServerGet,
165    wtaskClientAFSServerGetBegin,
166    wtaskClientAFSServerGetNext,
167    wtaskClientAFSServerGetDone,
168    wtaskUtilDatabaseServerGetBegin,
169    wtaskUtilDatabaseServerGetNext,
170    wtaskUtilDatabaseServerGetDone,
171    // ADD HERE
172    } WORKERTASK;
173
174 typedef union // WORKERPACKET
175    {
176
177       struct {
178          PVOID hCell;   // [in] token from AdminCellOpen()
179          VOLUMEID idVolume;     // [in] id of read/write volume
180       } wpVosBackupVolumeCreate;
181
182       struct {
183          PVOID hCell;   // [in] token from AdminCellOpen()
184          PVOID hServer; // [in] server token (or NULL)
185          int idPartition;       // [in] partition ID (or NO_PARTITION)
186          LPTSTR pszPrefix;      // [in] volume prefix to match (or NULL)
187          BOOL fExclude; // [in] TRUE if prefix is exclusionary
188       } wpVosBackupVolumeCreateMultiple;
189
190       struct {
191          PVOID hCell;   // [in] token from AdminCellOpen()
192          PVOID hServer; // [in] token from VosServerOpen()
193          int idPartition;       // [in] partition ID
194          vos_partitionEntry_t Data;     // [out] partition properties
195       } wpVosPartitionGet;
196
197       struct {
198          PVOID hCell;   // [in] token from AdminCellOpen()
199          PVOID hServer; // [in] token from VosServerOpen()
200          PVOID hEnum;   // [out] enumeration token
201       } wpVosPartitionGetBegin;
202
203       struct {
204          PVOID hEnum;   // [in] enumeration token
205          vos_partitionEntry_t Data;     // [out] partition properties
206       } wpVosPartitionGetNext;
207
208       struct {
209          PVOID hEnum;   // [in] enumeration token
210       } wpVosPartitionGetDone;
211
212       struct {
213          PVOID hCell;   // [in] token from AdminCellOpen()
214          LPTSTR pszServer;      // [in] server name
215          PVOID hServer; // [out] server token
216       } wpVosServerOpen;
217
218       struct {
219          PVOID hServer; // [in] token from VosServerOpen()
220       } wpVosServerClose;
221
222       struct {
223          PVOID hCell;   // [in] token from AdminCellOpen()
224          PVOID hServer; // [in] token from VosServerOpen()
225          int idPartition;       // [in] partition ID (or NO_PARTITION)
226          BOOL fForce;   // [in] TRUE to force sync
227       } wpVosServerSync;
228
229       struct {
230          PVOID hCell;   // [in] token from AdminCellOpen()
231          SOCKADDR_IN addrOld;   // [in] old address (or 0's to add new)
232          SOCKADDR_IN addrNew;   // [in] new address (or 0's to del old)
233       } wpVosFileServerAddressChange;
234
235       struct {
236          PVOID hCell;   // [in] token from AdminCellOpen()
237          SOCKADDR_IN addr;      // [in] address to remove
238       } wpVosFileServerAddressRemove;
239
240       struct {
241          PVOID hCell;   // [in] token from AdminCellOpen()
242          PVOID hEnum;   // [out] enumeration token
243       } wpVosFileServerGetBegin;
244
245       struct {
246          PVOID hEnum;   // [in] enumeration token
247          vos_fileServerEntry_t Entry;   // [out] server entry (with addresses)
248       } wpVosFileServerGetNext;
249
250       struct {
251          PVOID hEnum;   // [in] enumeration token
252       } wpVosFileServerGetDone;
253
254       struct {
255          PVOID hCell;   // [in] token from AdminCellOpen()
256          PVOID hServer; // [in] token from VosServerOpen()
257          PVOID hEnum;   // [out] enumeration token
258       } wpVosServerTransactionStatusGetBegin;
259
260       struct {
261          PVOID hEnum;   // [in] enumeration token
262          vos_serverTransactionStatus_t Data; // [out] transaction information
263       } wpVosServerTransactionStatusGetNext;
264
265       struct {
266          PVOID hEnum;   // [in] enumeration token
267       } wpVosServerTransactionStatusGetDone;
268
269       struct {
270          PVOID hCell;   // [in] token from AdminCellOpen()
271          VOLUMEID idVolume;     // [in] read/write volume ID
272          vos_vldbEntry_t Data;  // [out] VLDB entry
273       } wpVosVLDBGet;
274
275       struct {
276          PVOID hCell;   // [in] token from AdminCellOpen()
277          PVOID hServer; // [in] server token (or NULL)
278          int idPartition;       // [in] partition ID (or NO_PARTITION)
279          PVOID hEnum;   // [out] enumeration token
280       } wpVosVLDBGetBegin;
281
282       struct {
283          PVOID hEnum;   // [in] enumeration token
284          vos_vldbEntry_t Data;  // [out] VLDB entry
285       } wpVosVLDBGetNext;
286
287       struct {
288          PVOID hEnum;   // [in] enumeration token
289       } wpVosVLDBGetDone;
290
291       struct {
292          PVOID hCell;   // [in] token from AdminCellOpen()
293          PVOID hServer; // [in] server token (or NULL)
294          int idPartition;       // [in] partition ID (or NO_PARTITION)
295          VOLUMEID idVolume;     // [in] read/write volume ID
296       } wpVosVLDBEntryRemove;
297
298       struct {
299          PVOID hCell;   // [in] token from AdminCellOpen()
300          VOLUMEID idVolume;     // [in] read/write volume ID
301       } wpVosVLDBEntryLock;
302
303       struct {
304          PVOID hCell;   // [in] token from AdminCellOpen()
305          PVOID hServer; // [in] server token (or NULL)
306          int idPartition;       // [in] partition ID (or NO_PARTITION)
307          VOLUMEID idVolume;     // [in] read/write volume ID
308       } wpVosVLDBEntryUnlock;
309
310       struct {
311          PVOID hCell;   // [in] token from AdminCellOpen()
312          PVOID hServer; // [in] token from VosServerOpen()
313          int idPartition;       // [in] partition ID
314          VOLUMEID idVolume;     // [in] read/write volume ID
315       } wpVosVLDBReadOnlySiteCreate;
316
317       struct {
318          PVOID hCell;   // [in] token from AdminCellOpen()
319          PVOID hServer; // [in] token from VosServerOpen()
320          int idPartition;       // [in] partition ID
321          VOLUMEID idVolume;     // [in] read/write volume ID
322       } wpVosVLDBReadOnlySiteDelete;
323
324       struct {
325          PVOID hCell;   // [in] token from AdminCellOpen()
326          PVOID hServer; // [in] token from VosServerOpen()
327          int idPartition;       // [in] partition ID (or NO_PARTITION)
328          BOOL fForce;   // [in] TRUE to force sync
329       } wpVosVLDBSync;
330
331       struct {
332          PVOID hCell;   // [in] token from AdminCellOpen()
333          PVOID hServer; // [in] token from VosServerOpen()
334          int idPartition;       // [in] partition ID
335          LPTSTR pszVolume;      // [in] volume name
336          ULONG ckQuota; // [in] initial quota
337          VOLUMEID idVolume;     // [out] volume ID
338       } wpVosVolumeCreate;
339
340       struct {
341          PVOID hCell;   // [in] token from AdminCellOpen()
342          PVOID hServer; // [in] token from VosServerOpen()
343          int idPartition;       // [in] partition ID
344          VOLUMEID idVolume;     // [in] volume ID
345       } wpVosVolumeDelete;
346
347       struct {
348          PVOID hCell;   // [in] token from AdminCellOpen()
349          VOLUMEID idVolume;     // [in] read/write volume ID
350          LPTSTR pszVolume;      // [in] new volume name
351       } wpVosVolumeRename;
352
353       struct {
354          PVOID hCell;   // [in] token from AdminCellOpen()
355          PVOID hServer; // [in] token from VosServerOpen()
356          int idPartition;       // [in] parition ID
357          VOLUMEID idVolume;     // [in] volume ID
358          SYSTEMTIME stStart;    // [in] start time
359          LPTSTR pszFilename;    // [in] target filename (local)
360       } wpVosVolumeDump;
361
362       struct {
363          PVOID hCell;   // [in] token from AdminCellOpen()
364          PVOID hServer; // [in] token from VosServerOpen()
365          int idPartition;       // [in] partition ID
366          VOLUMEID idVolume;     // [in] read/write volume ID (or 0)
367          LPTSTR pszVolume;      // [in] new volume name (or NULL)
368          LPTSTR pszFilename;    // [in] source filename (local)
369          BOOL fIncremental;     // [in] TRUE if restoring inc backup
370       } wpVosVolumeRestore;
371
372       struct {
373          PVOID hServer; // [in] token from VosServerOpen()
374          int idPartition;       // [in] partition ID
375          VOLUMEID idVolume;     // [in] read/write volume ID (or 0)
376          int csecSleep; // [in] sleep time
377          vos_volumeOnlineType_t Status; // [in] new status to indicate
378       } wpVosVolumeOnline;
379
380       struct {
381          PVOID hServer; // [in] token from VosServerOpen()
382          int idPartition;       // [in] partition ID
383          VOLUMEID idVolume;     // [in] volume ID
384       } wpVosVolumeOffline;
385
386       struct {
387          PVOID hCell;   // [in] token from AdminCellOpen()
388          PVOID hServer; // [in] token from VosServerOpen()
389          int idPartition;       // [in] partition ID
390          VOLUMEID idVolume;     // [in] volume ID
391          vos_volumeEntry_t Data;        // [out] volume properties
392       } wpVosVolumeGet;
393
394       struct {
395          PVOID hCell;   // [in] token from AdminCellOpen()
396          PVOID hServer; // [in] token from VosServerOpen()
397          int idPartition;       // [in] partition ID
398          PVOID hEnum;   // [out] enumeration token
399       } wpVosVolumeGetBegin;
400
401       struct {
402          PVOID hEnum;   // [in] enumeration token
403          vos_volumeEntry_t Data;        // [out] volume properties
404       } wpVosVolumeGetNext;
405
406       struct {
407          PVOID hEnum;   // [in] enumeration token
408       } wpVosVolumeGetDone;
409
410       struct {
411          PVOID hCell;   // [in] token from AdminCellOpen()
412          PVOID hServerFrom;     // [in] source server token
413          int idPartitionFrom;   // [in] source partition ID
414          PVOID hServerTo;       // [in] target server token
415          int idPartitionTo;     // [in] target partition ID
416          VOLUMEID idVolume;     // [in] read/write volume ID
417       } wpVosVolumeMove;
418
419       struct {
420          PVOID hCell;   // [in] token from AdminCellOpen()
421          VOLUMEID idVolume;     // [in] read/write volume ID
422          BOOL fForce;   // [in] TRUE to force release
423       } wpVosVolumeRelease;
424
425       struct {
426          PVOID hCell;   // [in] token from AdminCellOpen()
427          PVOID hServer; // [in] token from VosServerOpen()
428          int idPartition;       // [in] partition ID
429          VOLUMEID idVolume;     // [in] volume ID
430          BOOL fForce;   // [in] TRUE to force delete
431       } wpVosVolumeZap;
432
433       struct {
434          LPTSTR pszPartition;   // [in] partition name
435          int idPartition;       // [out] partition ID
436       } wpVosPartitionNameToId;
437
438       struct {
439          int idPartition;       // [in] partition ID
440          LPTSTR pszPartition;   // [out] partition name
441       } wpVosPartitionIdToName;
442
443       struct {
444          PVOID hCell;   // [in] token from AdminCellOpen()
445          PVOID hServer; // [in] token from VosServerOpen()
446          int idPartition;       // [in] partition ID
447          VOLUMEID idVolume;     // [in] id of read/write volume
448          ULONG ckQuota; // [in] new quota
449       } wpVosVolumeQuotaChange;
450
451       struct {
452          PVOID hCell;   // [in] token from AdminCellOpen()
453          LPTSTR pszServer;      // [in] name of server to open
454          PVOID hServer; // [out] handle for server
455       } wpBosServerOpen;
456
457       struct {
458          PVOID hServer; // [in] token from BosServerOpen()
459       } wpBosServerClose;
460
461       struct {
462          PVOID hServer; // [in] token from BosServerOpen()
463          LPTSTR pszService;     // [in] name of new service
464          SERVICETYPE type;      // [in] service type (stCRON, stFS, etc)
465          LPTSTR pszCommand;     // [in] full command-line to execute
466          LPTSTR pszTimeCron;    // [in] date/time (CRON only)
467          LPTSTR pszNotifier;    // [in] command executed on exit
468       } wpBosProcessCreate;
469
470       struct {
471          PVOID hServer; // [in] token from BosServerOpen()
472          LPTSTR pszService;     // [in] service name
473       } wpBosProcessDelete;
474
475       struct {
476          PVOID hServer; // [in] token from BosServerOpen()
477          LPTSTR pszService;     // [in] service name
478          SERVICESTATE state;    // [out] current execution state
479          LPTSTR pszAuxStatus;   // [out] additional status information
480       } wpBosProcessExecutionStateGet;
481
482       struct {
483          char *pszAuxStatusA;   // [in] service string
484       } wpBosAuxiliaryProcessStatusDeallocate;
485
486       struct {
487          PVOID hServer; // [in] token from BosServerOpen()
488          LPTSTR pszService;     // [in] service name
489          SERVICESTATE state;    // [in] desired new service state
490       } wpBosProcessExecutionStateSet;
491
492       struct {
493          PVOID hServer; // [in] token from BosServerOpen()
494          LPTSTR pszService;     // [in] service name
495          SERVICESTATE state;    // [in] desired new service state
496       } wpBosProcessExecutionStateSetTemporary;
497
498       struct {
499          PVOID hServer; // [in] token from BosServerOpen()
500          PVOID hEnum;   // [out] enumeration token
501       } wpBosProcessNameGetBegin;
502
503       struct {
504          PVOID hEnum;   // [in] enumeration token
505       } wpBosProcessNameGetDone;
506
507       struct {
508          PVOID hEnum;   // [in] enumeration token
509          LPTSTR pszService;     // [in] service name
510       } wpBosProcessNameGetNext;
511
512       struct {
513          PVOID hServer; // [in] token from BosServerOpen()
514          LPTSTR pszService;     // [in] service name
515          SERVICESTATUS ss;      // [out] service properties
516       } wpBosProcessInfoGet;
517
518       struct {
519          PVOID hServer; // [in] token from BosServerOpen()
520          LPTSTR pszService;     // [in] service name
521          PVOID hEnum;   // [out] enumeration token
522       } wpBosProcessParameterGetBegin;
523
524       struct {
525          PVOID hEnum;   // [in] enumeration token
526       } wpBosProcessParameterGetDone;
527
528       struct {
529          PVOID hEnum;   // [in] enumeration token
530          LPTSTR pszParam;       // [out] parameter
531       } wpBosProcessParameterGetNext;
532
533       struct {
534          PVOID hServer; // [in] token from BosServerOpen()
535          LPTSTR pszService;     // [in] service name
536          LPTSTR pszNotifier;    // [out] current notifier command
537       } wpBosProcessNotifierGet;
538
539       struct {
540          PVOID hServer; // [in] token from BosServerOpen()
541          LPTSTR pszService;     // [in] service name
542       } wpBosProcessRestart;
543
544       struct {
545          PVOID hServer; // [in] token from BosServerOpen()
546       } wpBosProcessAllStop;
547
548       struct {
549          PVOID hServer; // [in] token from BosServerOpen()
550       } wpBosProcessAllStart;
551
552       struct {
553          PVOID hServer; // [in] token from BosServerOpen()
554       } wpBosProcessAllWaitStop;
555
556       struct {
557          PVOID hServer; // [in] token from BosServerOpen()
558          BOOL fRestartBOS;      // [in] TRUE to also restart BOS
559       } wpBosProcessAllStopAndRestart;
560
561       struct {
562          PVOID hServer; // [in] token from BosServerOpen()
563          LPTSTR pszAdmin;       // [in] administrator name
564       } wpBosAdminCreate;
565
566       struct {
567          PVOID hServer; // [in] token from BosServerOpen()
568          LPTSTR pszAdmin;       // [in] administrator name
569       } wpBosAdminDelete;
570
571       struct {
572          PVOID hServer; // [in] token from BosServerOpen()
573          PVOID hEnum;   // [out] enumeration token
574       } wpBosAdminGetBegin;
575
576       struct {
577          PVOID hEnum;   // [in] enumeration token
578       } wpBosAdminGetDone;
579
580       struct {
581          PVOID hEnum;   // [in] enumeration token
582          LPTSTR pszAdmin;       // [out] administrator name
583       } wpBosAdminGetNext;
584
585       struct {
586          PVOID hServer; // [in] token from BosServerOpen()
587          ENCRYPTIONKEY key;     // [in] encryption key to add
588          int keyVersion;        // [in] version of new key
589       } wpBosKeyCreate;
590
591       struct {
592          PVOID hServer; // [in] token from BosServerOpen()
593          int keyVersion;        // [in] key version number to delete
594       } wpBosKeyDelete;
595
596       struct {
597          PVOID hServer; // [in] token from BosServerOpen()
598          PVOID hEnum;   // [out] enumeration token
599       } wpBosKeyGetBegin;
600
601       struct {
602          PVOID hEnum;   // [in] enumeration token
603       } wpBosKeyGetDone;
604
605       struct {
606          PVOID hEnum;   // [in] enumeration token
607          int keyVersion;        // [out] key version number
608          ENCRYPTIONKEY keyData; // [out] encryption key
609          ENCRYPTIONKEYINFO keyInfo;     // [out] additional key information
610       } wpBosKeyGetNext;
611
612       struct {
613          PVOID hServer; // [in] token from BosServerOpen()
614          LPTSTR pszCell;        // [in] cell name to assign
615       } wpBosCellSet;
616
617       struct {
618          PVOID hServer; // [in] token from BosServerOpen()
619          LPTSTR pszCell;        // [out] currently-assigned cell name
620       } wpBosCellGet;
621
622       struct {
623          PVOID hServer; // [in] token from BosServerOpen()
624          LPTSTR pszServer;      // [in] name of server to create
625       } wpBosHostCreate;
626
627       struct {
628          PVOID hServer; // [in] token from BosServerOpen()
629          LPTSTR pszServer;      // [in] name of server to remove
630       } wpBosHostDelete;
631
632       struct {
633          PVOID hServer; // [in] token from BosServerOpen()
634          PVOID hEnum;   // [out] enumeration token
635       } wpBosHostGetBegin;
636
637       struct {
638          PVOID hEnum;   // [in] enumeration token
639       } wpBosHostGetDone;
640
641       struct {
642          PVOID hEnum;   // [in] enumeration token
643          LPTSTR pszServer;      // [out] name of server
644       } wpBosHostGetNext;
645
646       struct {
647          PVOID hServer; // [in] token from BosServerOpen()
648          LPTSTR pszLocal;       // [in] filename on local machine
649          LPTSTR pszRemoteDir;   // [in] target dir on remote machine
650       } wpBosExecutableCreate;
651
652       struct {
653          PVOID hServer; // [in] token from BosServerOpen()
654          LPTSTR pszFilename;    // [in] filename on remote machine
655       } wpBosExecutableRevert;
656
657       struct {
658          PVOID hServer; // [in] token from BosServerOpen()
659          LPTSTR pszFilename;    // [in] filename on remote machine
660          SYSTEMTIME timeNew;    // [out] file's last-modified time
661          SYSTEMTIME timeOld;    // [out] .OLD file's last-modified time
662          SYSTEMTIME timeBak;    // [out] .BAK file's last-modified time
663       } wpBosExecutableTimestampGet;
664
665       struct {
666          PVOID hServer; // [in] token from BosServerOpen()
667          BOOL fPruneOld;        // [in] TRUE to remove .OLD files
668          BOOL fPruneBak;        // [in] TRUE to remove .BAK files
669          BOOL fPruneCore;       // [in] TRUE to remove CORE files
670       } wpBosExecutablePrune;
671
672       struct {
673          PVOID hServer; // [in] token from BosServerOpen()
674          BOOL fWeeklyRestart;   // [in] TRUE to enable weekly restart
675          SYSTEMTIME timeWeekly; // [in] new weekly restart time
676          BOOL fDailyRestart;    // [in] TRUE to enable weekly restart
677          SYSTEMTIME timeDaily;  // [in] new daily restart time
678       } wpBosExecutableRestartTimeSet;
679
680       struct {
681          PVOID hServer; // [in] token from BosServerOpen()
682          BOOL fWeeklyRestart;   // [out] TRUE if doing weekly restart
683          SYSTEMTIME timeWeekly; // [out] weekly restart time
684          BOOL fDailyRestart;    // [out] TRUE if doing weekly restart
685          SYSTEMTIME timeDaily;  // [out] daily restart time
686       } wpBosExecutableRestartTimeGet;
687
688       struct {
689          PVOID hServer; // [in] token from BosServerOpen()
690          LPTSTR pszLogName;     // [in] name of log file to retrieve
691          LPTSTR pszLogData;     // [out] 0-init; GlobalFree() when done
692       } wpBosLogGet;
693
694       struct {
695          PVOID hServer; // [in] token from BosServerOpen()
696          BOOL fEnableAuth;      // [in] TRUE to enable auth checking
697       } wpBosAuthSet;
698
699       struct {
700          PVOID hServer; // [in] token from BosServerOpen()
701          LPTSTR pszCommand;     // [in] command-line to execute
702       } wpBosCommandExecute;
703
704       struct {
705          PVOID hCell;   // [in] token from AdminCellOpen()
706          PVOID hServer; // [in] token from BosServerOpen()
707          LPTSTR pszAggregate;   // [in] NULL or aggregate to salvage
708          LPTSTR pszFileset;     // [in] NULL or fileset to salvage
709          int nProcesses;        // [in] 0 for default (4)
710          LPTSTR pszTempDir;     // [in] NULL or temporary directory
711          LPTSTR pszLogFile;     // [in] NULL for SalvageLog
712          BOOL fForce;   // [in] TRUE to salvage all filesets
713          BOOL fReadonly;        // [in] TRUE to only bring up undamaged
714          BOOL fLogInodes;       // [in] TRUE to log damaged inodes
715          BOOL fLogRootInodes;   // [in] TRUE to log AFS-owned inodes
716          BOOL fRebuildDirs;     // [in] TRUE to rebuild dir structure
717          BOOL fReadBlocks;      // [in] TRUE to read in small blocks
718       } wpBosSalvage;
719
720       struct {
721          PVOID hCell;   // [in] token from AdminCellOpen()
722          char **apszServers;    // [in] 0-terminated array, or NULL
723          PVOID hServer; // [out] handle for server(s)
724       } wpKasServerOpen;
725
726       struct {
727          PVOID hServer; // [in] token from KasServerOpen()
728       } wpKasServerClose;
729
730       struct {
731          PVOID hCell;   // [in] token from AdminCellOpen()
732          PVOID hServer; // [in] token from KasServerOpen()
733          ENCRYPTIONKEY key;     // [out] random encryption key
734       } wpKasServerRandomKeyGet;
735
736       struct {
737          LPTSTR pszCell;        // [in] cell name
738          LPTSTR pszString;      // [in] string to hash
739          ENCRYPTIONKEY key;     // [out] generated encryption key
740       } wpKasStringToKey;
741
742       struct {
743          PVOID hCell;   // [in] token from AdminCellOpen()
744          PVOID hServer; // [in] token from KasServerOpen()
745          LPTSTR pszPrincipal;   // [in] principal name
746          LPTSTR pszInstance;    // [in] principal instance or NULL
747          LPTSTR pszPassword;    // [in] password for new principal
748       } wpKasPrincipalCreate;
749
750       struct {
751          PVOID hCell;   // [in] token from AdminCellOpen()
752          PVOID hServer; // [in] token from KasServerOpen()
753          LPTSTR pszPrincipal;   // [in] principal name
754          LPTSTR pszInstance;    // [in] principal instance or NULL
755       } wpKasPrincipalDelete;
756
757       struct {
758          PVOID hCell;   // [in] token from AdminCellOpen()
759          PVOID hServer; // [in] token from KasServerOpen()
760          LPTSTR pszPrincipal;   // [in] principal name
761          LPTSTR pszInstance;    // [in] principal instance or NULL
762          kas_principalEntry_t Data;     // [out] principal information
763       } wpKasPrincipalGet;
764
765       struct {
766          PVOID hCell;   // [in] token from AdminCellOpen()
767          PVOID hServer; // [in] token from KasServerOpen()
768          PVOID hEnum;   // [out] enumeration token
769       } wpKasPrincipalGetBegin;
770
771       struct {
772          PVOID hEnum;   // [in] enumeration token
773          LPTSTR pszPrincipal;   // [out] principal name
774          LPTSTR pszInstance;    // [out] principal instance
775       } wpKasPrincipalGetNext;
776
777       struct {
778          PVOID hEnum;   // [in] enumeration token
779       } wpKasPrincipalGetDone;
780
781       struct {
782          PVOID hCell;   // [in] token from AdminCellOpen()
783          PVOID hServer; // [in] token from KasServerOpen()
784          LPTSTR pszPrincipal;   // [in] principal name
785          LPTSTR pszInstance;    // [in] principal instance or NULL
786          int keyVersion;        // [in] key version number
787          ENCRYPTIONKEY key;     // [in] encryption key
788       } wpKasPrincipalKeySet;
789
790       struct {
791          PVOID hCell;   // [in] token from AdminCellOpen()
792          PVOID hServer; // [in] token from KasServerOpen()
793          LPTSTR pszPrincipal;   // [in] principal name
794          LPTSTR pszInstance;    // [in] principal instance or NULL
795          SYSTEMTIME timeUnlocked;       // [out] time lock released
796       } wpKasPrincipalLockStatusGet;
797
798       struct {
799          PVOID hCell;   // [in] token from AdminCellOpen()
800          PVOID hServer; // [in] token from KasServerOpen()
801          LPTSTR pszPrincipal;   // [in] principal name
802          LPTSTR pszInstance;    // [in] principal instance or NULL
803       } wpKasPrincipalUnlock;
804
805       struct {
806          PVOID hCell;   // [in] token from AdminCellOpen()
807          PVOID hServer; // [in] token from KasServerOpen()
808          LPTSTR pszPrincipal;   // [in] principal name
809          LPTSTR pszInstance;    // [in] principal instance or NULL
810          BOOL fIsAdmin; // [in] TRUE if admin
811          BOOL fGrantTickets;    // [in] TRUE if can get tokens
812          BOOL fCanEncrypt;      // [in] TRUE if can encrypt
813          BOOL fCanChangePassword;       // [in] TRUE if can change password
814          BOOL fCanReusePasswords;       // [in] TRUE if can change password
815          SYSTEMTIME timeExpires;        // [in] time account expires (or 0's)
816          LONG cdayPwExpires;    // [in] days til password expires (or 0)
817          LONG csecTicketLifetime;       // [in] ticket expiration timeout
818          LONG nFailureAttempts; // [in] num failures to tolerate (or 0)
819          LONG csecFailedLoginLockTime;  // [in] csec to lock account if failed
820       } wpKasPrincipalFieldsSet;
821
822       struct {
823          PVOID hCell;   // [in] token from AdminCellOpen()
824          LPTSTR pszGroup;       // [in] group to modify
825          LPTSTR pszUser;        // [in] user to add to group
826       } wpPtsGroupMemberAdd;
827
828       struct {
829          PVOID hCell;   // [in] token from AdminCellOpen()
830          LPTSTR pszGroup;       // [in] group to modify
831          LPTSTR pszOwner;       // [in] new owner for group
832       } wpPtsGroupOwnerChange;
833
834       struct {
835          PVOID hCell;   // [in] token from AdminCellOpen()
836          LPTSTR pszGroup;       // [in] group to create
837          LPTSTR pszOwner;       // [in] owner for group
838          int idGroup;   // [in out] new group ID (or 0)
839       } wpPtsGroupCreate;
840
841       struct {
842          PVOID hCell;   // [in] token from AdminCellOpen()
843          LPTSTR pszGroup;       // [in] group to query
844          pts_GroupEntry_t Entry;        // [out] group information
845       } wpPtsGroupGet;
846
847       struct {
848          PVOID hCell;   // [in] token from AdminCellOpen()
849          LPTSTR pszGroup;       // [in] group to remove
850       } wpPtsGroupDelete;
851
852       struct {
853          PVOID hCell;   // [in] token from AdminCellOpen()
854          int idGroupMax;        // [out] highest current group number
855       } wpPtsGroupMaxGet;
856
857       struct {
858          PVOID hCell;   // [in] token from AdminCellOpen()
859          int idGroupMax;        // [in] new highest current group number
860       } wpPtsGroupMaxSet;
861
862       struct {
863          PVOID hCell;   // [in] token from AdminCellOpen()
864          LPTSTR pszGroup;       // [in] group to enumerate
865          PVOID hEnum;   // [out] enumeration token
866       } wpPtsGroupMemberListBegin;
867
868       struct {
869          PVOID hEnum;   // [in] enumeration token
870          LPTSTR pszMember;      // [out] member name
871       } wpPtsGroupMemberListNext;
872
873       struct {
874          PVOID hEnum;   // [in] enumeration token
875       } wpPtsGroupMemberListDone;
876
877       struct {
878          PVOID hCell;   // [in] token from AdminCellOpen()
879          LPTSTR pszGroup;       // [in] group to modify
880          LPTSTR pszUser;        // [in] member to remove
881       } wpPtsGroupMemberRemove;
882
883       struct {
884          PVOID hCell;   // [in] token from AdminCellOpen()
885          LPTSTR pszGroup;       // [in] group to rename
886          LPTSTR pszNewName;     // [in] new name for group
887       } wpPtsGroupRename;
888
889       struct {
890          PVOID hCell;   // [in] token from AdminCellOpen()
891          LPTSTR pszGroup;       // [in] group to modify
892          pts_GroupUpdateEntry_t Delta;  // [in] new properties for group
893       } wpPtsGroupModify;
894
895       struct {
896          PVOID hCell;   // [in] token from AdminCellOpen()
897          LPTSTR pszUser;        // [in] name for new user account
898          int idUser;    // [in out] new user account ID (or 0)
899       } wpPtsUserCreate;
900
901       struct {
902          PVOID hCell;   // [in] token from AdminCellOpen()
903          LPTSTR pszUser;        // [in] user to remove
904       } wpPtsUserDelete;
905
906       struct {
907          PVOID hCell;   // [in] token from AdminCellOpen()
908          LPTSTR pszUser;        // [in] user to query
909          pts_UserEntry_t Entry; // [out] user properties
910       } wpPtsUserGet;
911
912       struct {
913          PVOID hCell;   // [in] token from AdminCellOpen()
914          LPTSTR pszUser;        // [in] user to modify
915          LPTSTR pszNewName;     // [in] new name for user
916       } wpPtsUserRename;
917
918       struct {
919          PVOID hCell;   // [in] token from AdminCellOpen()
920          LPTSTR pszUser;        // [in] user to modify
921          pts_UserUpdateEntry_t Delta;   // [in] new user properties
922       } wpPtsUserModify;
923
924       struct {
925          PVOID hCell;   // [in] token from AdminCellOpen()
926          int idUserMax; // [out] highest user ID
927       } wpPtsUserMaxGet;
928
929       struct {
930          PVOID hCell;   // [in] token from AdminCellOpen()
931          int idUserMax; // [in] new highest user ID
932       } wpPtsUserMaxSet;
933
934       struct {
935          PVOID hCell;   // [in] token from AdminCellOpen()
936          LPTSTR pszUser;        // [in] user to query
937          PVOID hEnum;   // [out] enumeration token
938       } wpPtsUserMemberListBegin;
939
940       struct {
941          PVOID hEnum;   // [in] enumeration token
942          LPTSTR pszGroup;       // [in] group to which user belongs
943       } wpPtsUserMemberListNext;
944
945       struct {
946          PVOID hEnum;   // [in] enumeration token
947       } wpPtsUserMemberListDone;
948
949       struct {
950          PVOID hCell;   // [in] token from AdminCellOpen()
951          LPTSTR pszOwner;       // [in] user to query
952          PVOID hEnum;   // [out] enumeration token
953       } wpPtsOwnedGroupListBegin;
954
955       struct {
956          PVOID hEnum;   // [in] enumeration token
957          LPTSTR pszGroup;       // [in] group which owner owns
958       } wpPtsOwnedGroupListNext;
959
960       struct {
961          PVOID hEnum;   // [in] enumeration token
962       } wpPtsOwnedGroupListDone;
963
964       struct {
965          LPTSTR pszCell;        // [in] cell in which to query
966          PVOID hCreds;  // [out] user credentials token
967       } wpClientTokenGetExisting;
968
969       struct {
970          LPTSTR pszCell;        // [in] cell to open
971          PVOID hCreds;  // [in] user credentials token
972          PVOID hCell;   // [out] cell token
973       } wpClientCellOpen;
974
975       struct {
976          PVOID hCell;   // [in] cell token
977       } wpClientCellClose;
978
979       struct {
980          LPTSTR pszCell;        // [out] local cell name
981       } wpClientLocalCellGet;
982
983       struct {
984          PVOID hCell;   // [in] cell token
985          LPTSTR pszServer;      // [in] full name of server to query
986          afs_serverEntry_t Entry;       // [out] server information
987       } wpClientAFSServerGet;
988
989       struct {
990          PVOID hCell;   // [in] cell token
991          PVOID hEnum;   // [out] enumeration token
992       } wpClientAFSServerGetBegin;
993
994       struct {
995          PVOID hEnum;   // [in] enumeration token
996          afs_serverEntry_t Entry;       // [out] server information
997       } wpClientAFSServerGetNext;
998
999       struct {
1000          PVOID hEnum;   // [in] enumeration token
1001       } wpClientAFSServerGetDone;
1002
1003       struct {
1004          LPTSTR pszCell;        // [in] cell name
1005          PVOID hEnum;   // [out] enumeration token
1006       } wpUtilDatabaseServerGetBegin;
1007
1008       struct {
1009          PVOID hEnum;   // [in] enumeration token
1010          SOCKADDR_IN Address;   // [out] server address
1011       } wpUtilDatabaseServerGetNext;
1012
1013       struct {
1014          PVOID hEnum;   // [in] enumeration token
1015       } wpUtilDatabaseServerGetDone;
1016
1017       // ADD HERE
1018
1019    } WORKERPACKET, *LPWORKERPACKET;
1020
1021
1022 /*
1023  * PROTOTYPES _________________________________________________________________
1024  *
1025  */
1026
1027 BOOL Worker_Initialize (ULONG *pStatus = NULL);
1028
1029 BOOL Worker_DoTask (WORKERTASK wtask, LPWORKERPACKET lpwp = NULL, ULONG *pStatus = NULL);
1030
1031 #endif
1032