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,
313 /* Deprecated - CVE-2018-7168 */
316 AFSOpaque *AccessList,
317 OUT AFSFetchStatus *OutStatus,
323 AFSStoreStatus *InStatus,
324 OUT AFSFetchStatus *OutStatus,
330 string Name<AFSNAMEMAX>,
331 OUT AFSFetchStatus *OutStatus,
337 string Name<AFSNAMEMAX>,
338 AFSStoreStatus *InStatus,
340 AFSFetchStatus *OutFidStatus,
341 AFSFetchStatus *OutDirStatus,
342 AFSCallBack *CallBack,
343 AFSVolSync *Sync) = 137;
346 IN AFSFid *OldDirFid,
347 string OldName<AFSNAMEMAX>,
349 string NewName<AFSNAMEMAX>,
350 OUT AFSFetchStatus *OutOldDirStatus,
351 AFSFetchStatus *OutNewDirStatus,
357 string Name<AFSNAMEMAX>,
358 string LinkContents<AFSPATHMAX>,
359 AFSStoreStatus *InStatus,
361 AFSFetchStatus *OutFidStatus,
362 AFSFetchStatus *OutDirStatus,
368 string Name<AFSNAMEMAX>,
370 OUT AFSFetchStatus *OutFidStatus,
371 AFSFetchStatus *OutDirStatus,
377 string Name<AFSNAMEMAX>,
378 AFSStoreStatus *InStatus,
380 AFSFetchStatus *OutFidStatus,
381 AFSFetchStatus *OutDirStatus,
382 AFSCallBack *CallBack,
388 string Name<AFSNAMEMAX>,
389 OUT AFSFetchStatus *OutDirStatus,
410 OUT ViceStatistics *Statistics
414 IN AFSCBFids *Fids_Array,
415 AFSCBs *CallBacks_Array
419 IN string VolumeName<AFSNAMEMAX>,
420 OUT VolumeInfo *Volumeinfo
424 IN afs_int32 Volumeid,
425 OUT AFSFetchVolumeStatus *Volumestatus,
426 string Name<AFSNAMEMAX>,
427 string OfflineMsg<AFSOPAQUEMAX>,
428 string Motd<AFSOPAQUEMAX>
432 IN afs_int32 Volumeid,
433 AFSStoreVolumeStatus *Volumestatus,
434 string Name<AFSNAMEMAX>,
435 string OfflineMsg<AFSOPAQUEMAX>,
436 string Motd<AFSOPAQUEMAX>
440 OUT string VolumeName<AFSNAMEMAX>
449 OUT afs_uint32 *Seconds,
454 IN string VolumeName<AFSNAMEMAX>,
455 OUT AFSVolumeInfo *stuff
459 IN AFSCBFids *FidsArray,
460 OUT AFSBulkStats *StatArray,
482 OUT afs_int32 *versionNumberP
486 IN afs_int32 clientVersionNumber,
487 afs_int32 collectionNumber,
488 OUT afs_int32 *srvVersionNumberP,
493 /* This interface is to supported the AFS/DFS Protocol Translator */
496 string Name<AFSNAMEMAX>,
498 AFSFetchStatus *OutFidStatus,
499 AFSFetchStatus *OutDirStatus,
500 AFSCallBack *CallBack,
505 IN ViceIds *IdsArray,
508 OUT afs_int32 *spare2,
514 string Name<AFSNAMEMAX>,
515 string LinkContents<AFSPATHMAX>,
516 AFSStoreStatus *InStatus,
518 AFSFetchStatus *OutFidStatus,
519 AFSFetchStatus *OutDirStatus,
520 AFSCallBack *CallBack,
526 AFSOpaque *AccessList,
527 OUT AFSFetchStatus *OutStatus,
533 IN struct FsCmdInputs *Inputs,
534 OUT struct FsCmdOutputs *Outputs
538 %int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs);
539 %int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs)
541 % return RXAFS_FsCmd(z_conn, Fid, Inputs, Outputs);
546 IN AFSCBFids *FidsArray,
547 OUT AFSBulkStats *StatArray,
556 OUT AFSFetchStatus *OutStatus,
557 AFSCallBack *CallBack,
563 AFSStoreStatus *InStatus,
566 afs_uint64 FileLength,
567 OUT AFSFetchStatus *OutStatus,
575 Capabilities *capabilities
582 %#define STATS64_CURRENTTIME 0
583 %#define STATS64_BOOTTIME 1
584 %#define STATS64_STARTTIME 2
585 %#define STATS64_CURRENTCONNECTIONS 3
586 %#define STATS64_TOTALFETCHES 4
587 %#define STATS64_FETCHDATAS 5
588 %#define STATS64_FETCHEDBYTES 6
589 %#define STATS64_FETCHDATARATE 7
590 %#define STATS64_TOTALSTORES 8
591 %#define STATS64_STOREDATAS 9
592 %#define STATS64_STOREDBYTES 10
593 %#define STATS64_STOREDATARATE 11
594 %#define STATS64_TOTALVICECALLS 12
595 %#define STATS64_WORKSTATIONS 13
596 %#define STATS64_ACTIVEWORKSTATIONS 14
597 %#define STATS64_PROCESSSIZE 15
599 const STATS64_VERSION = 16;
600 typedef afs_uint64 ViceStatistics64<STATS64_VERSION>;
602 /* the "version" is a number representing the number of
603 array elements to return, from 0 to N-1 */
606 IN afs_int32 statsVersion,
607 OUT ViceStatistics64 *Statistics
610 /* rx osd. put here now to hold version numbers.
614 OUT FilePath *NameiInfo,
615 AFSFetchStatus *OutStatus,
616 AFSCallBack *CallBack
631 OUT AFSFetchStatus *OutStatus,
632 AFSCallBack *CallBack,
639 OUT struct afs_filename *file,
640 afs_uint32 *nextparent
643 CheckOSDconns() = 65559;
645 OsdPolicy(IN AFSFid *Fid,
647 OUT afs_uint32 *protocol