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)
24 %#define SymbolicLink 3
27 %#define afs_xdr_array(a,b,c,d,e,f) afs_xdr_arrayN(a,b,c,d,e,f)
39 struct AFSFetchStatus {
40 afs_uint32 InterfaceVersion;
44 afs_uint32 DataVersion;
47 afs_uint32 CallerAccess;
48 afs_uint32 AnonymousAccess;
49 afs_uint32 UnixModeBits;
50 afs_uint32 ParentVnode;
51 afs_uint32 ParentUnique;
52 afs_uint32 ResidencyMask;
53 afs_uint32 ClientModTime;
54 afs_uint32 ServerModTime;
56 afs_uint32 SyncCounter;
57 afs_uint32 dataVersionHigh; /* For AFS/DFS translator, hi bits of dvn */
63 struct AFSStoreStatus {
65 afs_uint32 ClientModTime;
68 afs_uint32 UnixModeBits;
72 %#define AFS_SETMODTIME 1
73 %#define AFS_SETOWNER 2
74 %#define AFS_SETGROUP 4
75 %#define AFS_SETMODE 8
76 %#define AFS_SETSEGSIZE 16
77 %#define AFS_FSYNC 1024
84 afs_int32 BlocksAvailable;
85 afs_int32 TotalBlocks;
89 struct ViceStatistics {
90 afs_uint32 CurrentMsgNumber;
91 afs_uint32 OldestMsgNumber;
92 afs_uint32 CurrentTime;
95 afs_int32 CurrentConnections;
96 afs_uint32 TotalViceCalls;
97 afs_uint32 TotalFetchs;
98 afs_uint32 FetchDatas;
99 afs_uint32 FetchedBytes;
100 afs_int32 FetchDataRate;
101 afs_uint32 TotalStores;
102 afs_uint32 StoreDatas;
103 afs_uint32 StoredBytes;
104 afs_int32 StoreDataRate;
105 afs_uint32 TotalRPCBytesSent;
106 afs_uint32 TotalRPCBytesReceived;
107 afs_uint32 TotalRPCPacketsSent;
108 afs_uint32 TotalRPCPacketsReceived;
109 afs_uint32 TotalRPCPacketsLost;
110 afs_uint32 TotalRPCBogusPackets;
118 afs_int32 EtherNetTotalErrors;
119 afs_int32 EtherNetTotalWrites;
120 afs_int32 EtherNetTotalInterupts;
121 afs_int32 EtherNetGoodReads;
122 afs_int32 EtherNetTotalBytesWritten;
123 afs_int32 EtherNetTotalBytesRead;
124 afs_int32 ProcessSize;
125 afs_int32 WorkStations;
126 afs_int32 ActiveWorkStations;
147 struct VolumeStatus {
157 afs_int32 BlocksInUse;
158 afs_int32 PartBlocksAvail;
159 afs_int32 PartMaxBlocks;
162 struct AFSFetchVolumeStatus {
172 afs_int32 BlocksInUse;
173 afs_int32 PartBlocksAvail;
174 afs_int32 PartMaxBlocks;
177 struct AFSStoreVolumeStatus {
183 const AFS_SETMINQUOTA = 1;
184 const AFS_SETMAXQUOTA = 2;
186 struct AFSVolumeInfo {
194 afs_uint32 ServerCount;
203 unsigned short Port0;
204 unsigned short Port1;
205 unsigned short Port2;
206 unsigned short Port3;
207 unsigned short Port4;
208 unsigned short Port5;
209 unsigned short Port6;
210 unsigned short Port7;
221 afs_uint32 ServerCount;
232 typedef afs_int32 ViceLockType;
233 typedef AFSFetchStatus AFSBulkStats<AFSCBMAX>;
237 %#define LockExtend 2
238 %#define LockRelease 3
240 %#define MAXCMDINT64S 3
241 %#define MAXCMDINT32S 200
242 %#define MAXCMDCHARS 256
243 %#define CMD_GETRESIDENCIES 1
244 %#define CMD_CHANGERESIDENCIES 2
245 %#define CMD_IMPORTRESIDENCIES 3
246 %#define CMD_GETEXTVOLATTR 4
247 %#define CMD_SETEXTVOLATTR 5
248 %#define CMD_GETACCESSHISTORY 6
249 %#define CMD_MIGRATEFILE 7
250 %#define CMD_CHECKHSMMETADATA 8
251 %#define CMD_FETCHSTATUS 9
256 afs_int64 int64s[MAXCMDINT64S];
257 afs_uint32 int32s[MAXCMDINT32S];
258 char chars[MAXCMDCHARS];
261 struct FsCmdOutputs {
263 struct AFSFetchStatus status;
264 afs_int64 int64s[MAXCMDINT64S];
265 afs_uint32 int32s[MAXCMDINT32S];
266 char chars[MAXCMDCHARS];
269 %#define ResidencyCmdInputs FsCmdInputs
270 %#define ResidencyCmdOutputs FsCmdOutputs
273 typedef afs_int32 ViceIds<FLUSHMAX>;
274 typedef afs_int32 IPAddrs<FLUSHMAX>;
284 OUT AFSFetchStatus *OutStatus,
285 AFSCallBack *CallBack,
291 OUT AFSOpaque *AccessList,
292 AFSFetchStatus *OutStatus,
298 OUT AFSFetchStatus *OutStatus,
299 AFSCallBack *CallBack,
305 AFSStoreStatus *InStatus,
308 afs_uint32 FileLength,
309 OUT AFSFetchStatus *OutStatus,
315 AFSOpaque *AccessList,
316 OUT AFSFetchStatus *OutStatus,
322 AFSStoreStatus *InStatus,
323 OUT AFSFetchStatus *OutStatus,
329 string Name<AFSNAMEMAX>,
330 OUT AFSFetchStatus *OutStatus,
336 string Name<AFSNAMEMAX>,
337 AFSStoreStatus *InStatus,
339 AFSFetchStatus *OutFidStatus,
340 AFSFetchStatus *OutDirStatus,
341 AFSCallBack *CallBack,
342 AFSVolSync *Sync) = 137;
345 IN AFSFid *OldDirFid,
346 string OldName<AFSNAMEMAX>,
348 string NewName<AFSNAMEMAX>,
349 OUT AFSFetchStatus *OutOldDirStatus,
350 AFSFetchStatus *OutNewDirStatus,
356 string Name<AFSNAMEMAX>,
357 string LinkContents<AFSPATHMAX>,
358 AFSStoreStatus *InStatus,
360 AFSFetchStatus *OutFidStatus,
361 AFSFetchStatus *OutDirStatus,
367 string Name<AFSNAMEMAX>,
369 OUT AFSFetchStatus *OutFidStatus,
370 AFSFetchStatus *OutDirStatus,
376 string Name<AFSNAMEMAX>,
377 AFSStoreStatus *InStatus,
379 AFSFetchStatus *OutFidStatus,
380 AFSFetchStatus *OutDirStatus,
381 AFSCallBack *CallBack,
387 string Name<AFSNAMEMAX>,
388 OUT AFSFetchStatus *OutDirStatus,
409 OUT ViceStatistics *Statistics
413 IN AFSCBFids *Fids_Array,
414 AFSCBs *CallBacks_Array
418 IN string VolumeName<AFSNAMEMAX>,
419 OUT VolumeInfo *Volumeinfo
423 IN afs_int32 Volumeid,
424 OUT AFSFetchVolumeStatus *Volumestatus,
425 string Name<AFSNAMEMAX>,
426 string OfflineMsg<AFSOPAQUEMAX>,
427 string Motd<AFSOPAQUEMAX>
431 IN afs_int32 Volumeid,
432 AFSStoreVolumeStatus *Volumestatus,
433 string Name<AFSNAMEMAX>,
434 string OfflineMsg<AFSOPAQUEMAX>,
435 string Motd<AFSOPAQUEMAX>
439 OUT string VolumeName<AFSNAMEMAX>
448 OUT afs_uint32 *Seconds,
453 IN string VolumeName<AFSNAMEMAX>,
454 OUT AFSVolumeInfo *stuff
458 IN AFSCBFids *FidsArray,
459 OUT AFSBulkStats *StatArray,
481 OUT afs_int32 *versionNumberP
485 IN afs_int32 clientVersionNumber,
486 afs_int32 collectionNumber,
487 OUT afs_int32 *srvVersionNumberP,
492 /* This interface is to supported the AFS/DFS Protocol Translator */
495 string Name<AFSNAMEMAX>,
497 AFSFetchStatus *OutFidStatus,
498 AFSFetchStatus *OutDirStatus,
499 AFSCallBack *CallBack,
504 IN ViceIds *IdsArray,
507 OUT afs_int32 *spare2,
513 string Name<AFSNAMEMAX>,
514 string LinkContents<AFSPATHMAX>,
515 AFSStoreStatus *InStatus,
517 AFSFetchStatus *OutFidStatus,
518 AFSFetchStatus *OutDirStatus,
519 AFSCallBack *CallBack,
525 IN struct FsCmdInputs *Inputs,
526 OUT struct FsCmdOutputs *Outputs
530 %int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs)
532 % return RXAFS_FsCmd(z_conn, Fid, Inputs, Outputs);
537 IN AFSCBFids *FidsArray,
538 OUT AFSBulkStats *StatArray,
547 OUT AFSFetchStatus *OutStatus,
548 AFSCallBack *CallBack,
554 AFSStoreStatus *InStatus,
557 afs_uint64 FileLength,
558 OUT AFSFetchStatus *OutStatus,
566 Capabilities *capabilities
573 %#define STATS64_CURRENTTIME 0
574 %#define STATS64_BOOTTIME 1
575 %#define STATS64_STARTTIME 2
576 %#define STATS64_CURRENTCONNECTIONS 3
577 %#define STATS64_TOTALFETCHES 4
578 %#define STATS64_FETCHDATAS 5
579 %#define STATS64_FETCHEDBYTES 6
580 %#define STATS64_FETCHDATARATE 7
581 %#define STATS64_TOTALSTORES 8
582 %#define STATS64_STOREDATAS 9
583 %#define STATS64_STOREDBYTES 10
584 %#define STATS64_STOREDATARATE 11
585 %#define STATS64_TOTALVICECALLS 12
586 %#define STATS64_WORKSTATIONS 13
587 %#define STATS64_ACTIVEWORKSTATIONS 14
588 %#define STATS64_PROCESSSIZE 15
590 const STATS64_VERSION = 16;
591 typedef afs_uint64 ViceStatistics64<STATS64_VERSION>;
593 /* the "version" is a number representing the number of
594 array elements to return, from 0 to N-1 */
597 IN afs_int32 statsVersion,
598 OUT ViceStatistics64 *Statistics
601 /* rx osd. put here now to hold version numbers.
605 OUT FilePath *NameiInfo,
606 AFSFetchStatus *OutStatus,
607 AFSCallBack *CallBack
622 OUT AFSFetchStatus *OutStatus,
623 AFSCallBack *CallBack,
630 OUT struct afs_filename *file,
631 afs_uint32 *nextparent
634 CheckOSDconns() = 65559;
636 OsdPolicy(IN AFSFid *Fid,
638 OUT afs_uint32 *protocol