2 * Copyright 2000, International Business Machines Corporation and others.
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
12 * Definition of the AFS File Server RPC interface.
15 #include "common.xg" /*Common structures & definitions*/
17 %#define VICECONNBAD 1234
18 %#define VICETOKENDEAD 1235
19 %#define AFS_LOCKWAIT (5*60)
21 customized struct CBS {
26 customized struct BBS {
32 customized struct AFSAccessList {
38 typedef AFSFid ViceFid;
40 typedef afs_int32 ViceDataType;
45 %#define SymbolicLink 3
48 %#define afs_xdr_array(a,b,c,d,e,f) afs_xdr_arrayN(a,b,c,d,e,f)
66 struct AFSOldFetchStatus {
67 afs_uint32 InterfaceVersion;
71 afs_uint32 DataVersion;
74 afs_uint32 CallerAccess;
75 afs_uint32 AnonymousAccess;
76 afs_uint32 UnixModeBits;
77 afs_uint32 ParentVnode;
78 afs_uint32 ParentUnique;
80 afs_uint32 ClientModTime;
81 afs_uint32 ServerModTime;
85 struct AFSFetchStatus {
86 afs_uint32 InterfaceVersion;
90 afs_uint32 DataVersion;
93 afs_uint32 CallerAccess;
94 afs_uint32 AnonymousAccess;
95 afs_uint32 UnixModeBits;
96 afs_uint32 ParentVnode;
97 afs_uint32 ParentUnique;
98 afs_uint32 ResidencyMask;
99 afs_uint32 ClientModTime;
100 afs_uint32 ServerModTime;
102 afs_uint32 SyncCounter;
103 afs_uint32 dataVersionHigh; /* For AFS/DFS translator, hi bits of dvn */
104 afs_uint32 lockCount;
105 afs_uint32 Length_hi;
106 afs_uint32 errorCode;
109 struct AFSStoreStatus {
111 afs_uint32 ClientModTime;
114 afs_uint32 UnixModeBits;
118 %#define AFS_SETMODTIME 1
119 %#define AFS_SETOWNER 2
120 %#define AFS_SETGROUP 4
121 %#define AFS_SETMODE 8
122 %#define AFS_SETSEGSIZE 16
123 %#define AFS_FSYNC 1024
125 typedef afs_int32 ViceVolumeType;
132 afs_int32 BlocksAvailable;
133 afs_int32 TotalBlocks;
137 struct ViceStatistics {
138 afs_uint32 CurrentMsgNumber;
139 afs_uint32 OldestMsgNumber;
140 afs_uint32 CurrentTime;
142 afs_uint32 StartTime;
143 afs_int32 CurrentConnections;
144 afs_uint32 TotalViceCalls;
145 afs_uint32 TotalFetchs;
146 afs_uint32 FetchDatas;
147 afs_uint32 FetchedBytes;
148 afs_int32 FetchDataRate;
149 afs_uint32 TotalStores;
150 afs_uint32 StoreDatas;
151 afs_uint32 StoredBytes;
152 afs_int32 StoreDataRate;
153 afs_uint32 TotalRPCBytesSent;
154 afs_uint32 TotalRPCBytesReceived;
155 afs_uint32 TotalRPCPacketsSent;
156 afs_uint32 TotalRPCPacketsReceived;
157 afs_uint32 TotalRPCPacketsLost;
158 afs_uint32 TotalRPCBogusPackets;
166 afs_int32 EtherNetTotalErrors;
167 afs_int32 EtherNetTotalWrites;
168 afs_int32 EtherNetTotalInterupts;
169 afs_int32 EtherNetGoodReads;
170 afs_int32 EtherNetTotalBytesWritten;
171 afs_int32 EtherNetTotalBytesRead;
172 afs_int32 ProcessSize;
173 afs_int32 WorkStations;
174 afs_int32 ActiveWorkStations;
195 struct VolumeStatus {
205 afs_int32 BlocksInUse;
206 afs_int32 PartBlocksAvail;
207 afs_int32 PartMaxBlocks;
210 struct AFSFetchVolumeStatus {
220 afs_int32 BlocksInUse;
221 afs_int32 PartBlocksAvail;
222 afs_int32 PartMaxBlocks;
225 struct AFSStoreVolumeStatus {
231 const AFS_SETMINQUOTA = 1;
232 const AFS_SETMAXQUOTA = 2;
234 struct AFSVolumeInfo {
242 afs_uint32 ServerCount;
251 unsigned short Port0;
252 unsigned short Port1;
253 unsigned short Port2;
254 unsigned short Port3;
255 unsigned short Port4;
256 unsigned short Port5;
257 unsigned short Port6;
258 unsigned short Port7;
269 afs_uint32 ServerCount;
280 typedef afs_int32 ViceLockType;
281 typedef AFSFetchStatus AFSBulkStats<AFSCBMAX>;
285 %#define LockExtend 2
286 %#define LockRelease 3
288 typedef afs_int32 ViceOfflineType;
293 %#define MAXCMDINT64S 3
294 %#define MAXCMDINT32S 200
295 %#define MAXCMDCHARS 256
296 %#define CMD_GETRESIDENCIES 1
297 %#define CMD_CHANGERESIDENCIES 2
298 %#define CMD_IMPORTRESIDENCIES 3
299 %#define CMD_GETEXTVOLATTR 4
300 %#define CMD_SETEXTVOLATTR 5
301 %#define CMD_GETACCESSHISTORY 6
302 %#define CMD_MIGRATEFILE 7
303 %#define CMD_CHECKHSMMETADATA 8
304 %#define CMD_FETCHSTATUS 9
306 %#define VOLATTR_DESIREDRESIDENCYMASK 1
307 %#define VOLATTR_UNDESIREDRESIDENCYMASK 2
308 %#define VOLATTR_SETSPECIALACCESSFLAG 4
309 struct ExtendedVolAttrInputs {
312 afs_uint32 DesiredResidencyMask;
313 afs_uint32 Spare1[10];
314 afs_uint32 UnDesiredResidencyMask;
315 afs_uint32 Spare2[9];
316 afs_uint32 SpecialAccessFlag;
319 struct ExtendedVolAttrOutputs {
320 afs_uint32 DesiredResidencyMask;
321 afs_uint32 Spare1[10];
322 afs_uint32 UnDesiredResidencyMask;
323 afs_uint32 Spare2[9];
324 afs_uint32 SpecialAccessFlag;
328 afs_uint32 TagsArray_len;
329 afs_uint32 TagsArray_val[184];
332 struct AccessHistory {
335 afs_uint32 NonSpoolingFetches;
336 afs_uint32 UserSpoolingFetches;
337 afs_uint32 MigratorSpoolingFetches;
338 afs_uint32 LastUserMigrationEvent;
339 afs_uint32 MigrateMe;
342 afs_uint32 LocalAccess0;
343 afs_uint32 Residency0;
346 afs_uint32 LocalAccess1;
347 afs_uint32 Residency1;
350 afs_uint32 LocalAccess2;
351 afs_uint32 Residency2;
354 afs_uint32 LocalAccess3;
355 afs_uint32 Residency3;
358 afs_uint32 LocalAccess4;
359 afs_uint32 Residency4;
362 struct AccessHistoryOld {
365 afs_uint32 NonSpoolingFetches;
366 afs_uint32 UserSpoolingFetches;
367 afs_uint32 MigratorSpoolingFetches;
368 afs_uint32 LastUserMigrationEvent;
369 afs_uint32 MigrateMe;
372 afs_uint32 LocalAccess0;
373 afs_uint32 Residency0;
376 afs_uint32 LocalAccess1;
377 afs_uint32 Residency1;
380 afs_uint32 LocalAccess2;
381 afs_uint32 Residency2;
384 afs_uint32 LocalAccess3;
385 afs_uint32 Residency3;
388 afs_uint32 LocalAccess4;
389 afs_uint32 Residency4;
395 afs_int64 int64s[MAXCMDINT64S];
396 afs_uint32 int32s[MAXCMDINT32S];
397 char chars[MAXCMDCHARS];
400 struct FsCmdOutputs {
402 struct AFSFetchStatus status;
403 afs_int64 int64s[MAXCMDINT64S];
404 afs_uint32 int32s[MAXCMDINT32S];
405 char chars[MAXCMDCHARS];
409 typedef afs_int32 ViceIds<FLUSHMAX>;
410 typedef afs_int32 IPAddrs<FLUSHMAX>;
420 OUT AFSFetchStatus *OutStatus,
421 AFSCallBack *CallBack,
427 OUT AFSOpaque *AccessList,
428 AFSFetchStatus *OutStatus,
434 OUT AFSFetchStatus *OutStatus,
435 AFSCallBack *CallBack,
441 AFSStoreStatus *InStatus,
444 afs_uint32 FileLength,
445 OUT AFSFetchStatus *OutStatus,
451 AFSOpaque *AccessList,
452 OUT AFSFetchStatus *OutStatus,
458 AFSStoreStatus *InStatus,
459 OUT AFSFetchStatus *OutStatus,
465 string Name<AFSNAMEMAX>,
466 OUT AFSFetchStatus *OutStatus,
472 string Name<AFSNAMEMAX>,
473 AFSStoreStatus *InStatus,
475 AFSFetchStatus *OutFidStatus,
476 AFSFetchStatus *OutDirStatus,
477 AFSCallBack *CallBack,
478 AFSVolSync *Sync) = 137;
481 IN AFSFid *OldDirFid,
482 string OldName<AFSNAMEMAX>,
484 string NewName<AFSNAMEMAX>,
485 OUT AFSFetchStatus *OutOldDirStatus,
486 AFSFetchStatus *OutNewDirStatus,
492 string Name<AFSNAMEMAX>,
493 string LinkContents<AFSPATHMAX>,
494 AFSStoreStatus *InStatus,
496 AFSFetchStatus *OutFidStatus,
497 AFSFetchStatus *OutDirStatus,
503 string Name<AFSNAMEMAX>,
505 OUT AFSFetchStatus *OutFidStatus,
506 AFSFetchStatus *OutDirStatus,
512 string Name<AFSNAMEMAX>,
513 AFSStoreStatus *InStatus,
515 AFSFetchStatus *OutFidStatus,
516 AFSFetchStatus *OutDirStatus,
517 AFSCallBack *CallBack,
523 string Name<AFSNAMEMAX>,
524 OUT AFSFetchStatus *OutDirStatus,
545 OUT ViceStatistics *Statistics
549 IN AFSCBFids *Fids_Array,
550 AFSCBs *CallBacks_Array
554 IN string VolumeName<AFSNAMEMAX>,
555 OUT VolumeInfo *Volumeinfo
559 IN afs_int32 Volumeid,
560 OUT AFSFetchVolumeStatus *Volumestatus,
561 string Name<AFSNAMEMAX>,
562 string OfflineMsg<AFSOPAQUEMAX>,
563 string Motd<AFSOPAQUEMAX>
567 IN afs_int32 Volumeid,
568 AFSStoreVolumeStatus *Volumestatus,
569 string Name<AFSNAMEMAX>,
570 string OfflineMsg<AFSOPAQUEMAX>,
571 string Motd<AFSOPAQUEMAX>
575 OUT string VolumeName<AFSNAMEMAX>
584 OUT afs_uint32 *Seconds,
589 IN string VolumeName<AFSNAMEMAX>,
590 OUT AFSVolumeInfo *stuff
594 IN AFSCBFids *FidsArray,
595 OUT AFSBulkStats *StatArray,
617 OUT afs_int32 *versionNumberP
621 IN afs_int32 clientVersionNumber,
622 afs_int32 collectionNumber,
623 OUT afs_int32 *srvVersionNumberP,
628 /* This interface is to supported the AFS/DFS Protocol Translator */
631 string Name<AFSNAMEMAX>,
633 AFSFetchStatus *OutFidStatus,
634 AFSFetchStatus *OutDirStatus,
635 AFSCallBack *CallBack,
640 IN ViceIds *IdsArray,
643 OUT afs_int32 *spare2,
649 string Name<AFSNAMEMAX>,
650 string LinkContents<AFSPATHMAX>,
651 AFSStoreStatus *InStatus,
653 AFSFetchStatus *OutFidStatus,
654 AFSFetchStatus *OutDirStatus,
655 AFSCallBack *CallBack,
661 IN struct FsCmdInputs *Inputs,
662 OUT struct FsCmdOutputs *Outputs
666 %int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs)
668 % return RXAFS_FsCmd(z_conn, Fid, Inputs, Outputs);
673 IN AFSCBFids *FidsArray,
674 OUT AFSBulkStats *StatArray,
683 OUT AFSFetchStatus *OutStatus,
684 AFSCallBack *CallBack,
690 AFSStoreStatus *InStatus,
693 afs_uint64 FileLength,
694 OUT AFSFetchStatus *OutStatus,
702 Capabilities *capabilities
709 %#define STATS64_CURRENTTIME 0
710 %#define STATS64_BOOTTIME 1
711 %#define STATS64_STARTTIME 2
712 %#define STATS64_CURRENTCONNECTIONS 3
713 %#define STATS64_TOTALFETCHES 4
714 %#define STATS64_FETCHDATAS 5
715 %#define STATS64_FETCHEDBYTES 6
716 %#define STATS64_FETCHDATARATE 7
717 %#define STATS64_TOTALSTORES 8
718 %#define STATS64_STOREDATAS 9
719 %#define STATS64_STOREDBYTES 10
720 %#define STATS64_STOREDATARATE 11
721 %#define STATS64_TOTALVICECALLS 12
722 %#define STATS64_WORKSTATIONS 13
723 %#define STATS64_ACTIVEWORKSTATIONS 14
724 %#define STATS64_PROCESSSIZE 15
726 const STATS64_VERSION = 16;
727 typedef afs_uint64 ViceStatistics64<STATS64_VERSION>;
729 /* the "version" is a number representing the number of
730 array elements to return, from 0 to N-1 */
733 IN afs_int32 statsVersion,
734 OUT ViceStatistics64 *Statistics
737 /* rx osd. put here now to hold version numbers.
741 OUT FilePath *NameiInfo,
742 AFSFetchStatus *OutStatus,
743 AFSCallBack *CallBack
758 OUT AFSFetchStatus *OutStatus,
759 AFSCallBack *CallBack,
766 OUT struct afs_filename *file,
767 afs_uint32 *nextparent
770 CheckOSDconns() = 65559;
772 OsdPolicy(IN AFSFid *Fid,
774 OUT afs_uint32 *protocol