Some doc path fixes from Anders
[pkg-k5-afs_openafs.git] / src / fsint / common.xg
blob253efc5e010a77a15859f6d30116c0103b0a2609
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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  */
11  *  common.xg:
12  *      Common values and structures used in the AFS File Server
13  *      and Cache Manager interfaces.
14  */
16 %#ifndef FSINT_COMMON_XG
18 struct AFSFid {
19     afs_uint32 Volume;
20     afs_uint32 Vnode;
21     afs_uint32 Unique;
24 struct AFSCallBack {
25     afs_uint32 CallBackVersion;
26     afs_uint32 ExpirationTime;
27     afs_uint32 CallBackType;
30 struct AFSDBLockDesc {
31     char waitStates;
32     char exclLocked;
33     short readersReading;
34     short numWaiting;
35     short spare;
36     int pid_last_reader;
37     int pid_writer;
38     int src_indicator;
41 struct AFSDBCacheEntry {
42     afs_int32 addr;
43     afs_int32 cell;                             /*Cell part of the fid*/
44     AFSFid netFid;                      /*Network part of the fid*/
45     afs_int32 Length;
46     afs_int32 DataVersion;
47     struct AFSDBLockDesc lock;
48     afs_int32 callback;
49     afs_int32 cbExpires;
50     short refCount;
51     short opens;
52     short writers;
53     char mvstat;
54     char states;
57 struct AFSDBCacheEntry64 {
58     afs_int32 addr;
59     afs_int32 cell;                             /*Cell part of the fid*/
60     AFSFid netFid;                      /*Network part of the fid*/
61     afs_int64 Length;
62     afs_int32 DataVersion;
63     struct AFSDBLockDesc lock;
64     afs_int32 callback;
65     afs_int32 cbExpires;
66     short refCount;
67     short opens;
68     short writers;
69     char mvstat;
70     char states;
73 struct AFSDBLock {
74     char name[16];
75     struct AFSDBLockDesc lock;
78 struct AFSDEntry {
79     afs_int32 addr;
80     afs_int32 cell;                             /*Cell part of the fid*/
81     AFSFid netFid;                      /*Network part of the fid*/
82     afs_int32 Length;
83     afs_int32 DataVersion;
84     struct AFSDBLockDesc lock;
85     afs_int32 callback;
86     afs_int32 cbExpires;
87     short refCount;
88     short opens;
89     short writers;
90     char mvstat;
91     char states;
95  * Callback types.
96  */
97 const CB_EXCLUSIVE = 1;
98 const CB_SHARED    = 2;
99 const CB_DROPPED   = 3;
101 const AFSNAMEMAX =  256;        /*Max size for name*/
102 const AFSPATHMAX = 1024;        /*Max size for pathname*/
105  * Define the maximum opaque structure to be passed.
106  */
107 const AFSOPAQUEMAX = 1024;
108 typedef opaque AFSOpaque <AFSOPAQUEMAX>;
111  * Define the maximum arrays for passing callback fids and callbacks
112  * themselves around.
113  */
114 const AFSCBMAX = 50;
115 typedef AFSFid AFSCBFids<AFSCBMAX>;
116 typedef AFSCallBack AFSCBs<AFSCBMAX>;
119  * Define the version of Cache Manager and File Server extended statistics
120  * being implemented.
121  */
122 const AFSCB_XSTAT_VERSION = 2;
123 const AFS_XSTAT_VERSION = 2;
126  * Define the maximum arrays for passing extended statistics information
127  * for the Cache Manager and File Server back to our caller.
128  */
129 const AFSCB_MAX_XSTAT_LONGS = 2048;
130 const AFS_MAX_XSTAT_LONGS = 1024;
132 typedef afs_int32 AFSCB_CollData<AFSCB_MAX_XSTAT_LONGS>;
133 typedef afs_int32 AFS_CollData<AFS_MAX_XSTAT_LONGS>;
136  * Define the identifiers for the accessible extended stats data
137  * collections.
138  */
139 const AFSCB_XSTATSCOLL_CALL_INFO = 0;    /*CM call counting & info*/
140 const AFSCB_XSTATSCOLL_PERF_INFO = 1;    /*CM performance info*/
141 const AFSCB_XSTATSCOLL_FULL_PERF_INFO = 2;       /*CM performance info*/
143 const AFS_XSTATSCOLL_CALL_INFO = 0;      /*FS call counting & info*/
144 const AFS_XSTATSCOLL_PERF_INFO = 1;      /*FS performance info*/
145 const AFS_XSTATSCOLL_FULL_PERF_INFO = 2; /*Full FS performance info*/
146 const AFS_XSTATSCOLL_CBSTATS = 3;        /*Callback package counters */
148 typedef afs_uint32 VolumeId;
149 typedef afs_uint32 VolId;
150 typedef afs_uint32 VnodeId;
151 typedef afs_uint32 Unique;
152 typedef afs_uint32 UserId;
153 typedef afs_uint32 FileVersion;
154 typedef afs_int32             ErrorCode;
155 typedef afs_int32             Rights;
157 const AFS_DISKNAMESIZE = 32;
158 typedef opaque DiskName[AFS_DISKNAMESIZE];
160 const CALLBACK_VERSION = 1;
162 const AFS_MAX_INTERFACE_ADDR  =  32;
163 struct interfaceAddr {          /* for multihomed clients */
164     int         numberOfInterfaces;
165     afsUUID     uuid;
166     afs_int32   addr_in[AFS_MAX_INTERFACE_ADDR]; /* interface addresses */
167     afs_int32       subnetmask[AFS_MAX_INTERFACE_ADDR]; /* subnet masks in net ord */
168     afs_int32       mtu[AFS_MAX_INTERFACE_ADDR]; /* MTU */
171 const AFSMAXCELLHOSTS = 8;      /*Max VLDB servers per cell*/
172 typedef afs_int32 serverList<AFSMAXCELLHOSTS>;
174 typedef afs_uint32 cacheConfig<>;
176 const AFSCAPABILITIESMAX = 196;
177 typedef afs_uint32 Capabilities<AFSCAPABILITIESMAX>;
179 /* Viced Capability Flags */
180 const VICED_CAPABILITY_ERRORTRANS       = 0x0001;
181 const VICED_CAPABILITY_64BITFILES       = 0x0002;
182 const VICED_CAPABILITY_WRITELOCKACL     = 0x0004;
183 const VICED_CAPABILITY_SANEACLS         = 0x0008;
185 /* Cache Manager Capability Flags */
186 const CLIENT_CAPABILITY_ERRORTRANS      = 0x0001;
188 %#endif /* FSINT_COMMON_XG */