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