*** empty log message ***
[arla.git] / rxdef / common.h
blob9e293035f9ca2b5c15fbea6003c47dd77277fd67
1 /*
2 * Copyright (c) 1995 - 2004 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
35 * Common definition used by several *.xg files
38 /* $Id$ */
40 %#ifndef _COMMON_
41 %#define _COMMON_
43 const LockRead = 0;
44 const LockWrite = 1;
45 const LockExtend = 2;
46 const LockRelease = 3;
48 const AFSNAMEMAX = 256;
50 const RWVOL = 0;
51 const ROVOL = 1;
52 const BACKVOL = 2;
54 struct AFSFid {
55 uint32_t Volume;
56 uint32_t Vnode;
57 uint32_t Unique;
60 struct VenusFid {
61 int32_t Cell;
62 AFSFid fid;
65 struct AFSCallBack {
66 uint32_t CallBackVersion;
67 uint32_t ExpirationTime;
68 uint32_t CallBackType;
71 enum CallBackType { CBEXCLUSIVE = 1, CBSHARED = 2, CBDROPPED = 3};
73 const CALLBACK_VERSION = 1;
75 struct AFSVolSync {
76 uint32_t spare1;
77 uint32_t spare2;
78 uint32_t spare3;
79 uint32_t spare4;
80 uint32_t spare5;
81 uint32_t spare6;
84 const TYPE_FILE = 1;
85 const TYPE_DIR = 2;
86 const TYPE_LINK = 3;
88 struct AFSFetchStatus {
89 uint32_t InterfaceVersion;
90 uint32_t FileType;
91 uint32_t LinkCount;
92 uint32_t Length;
93 uint32_t DataVersion;
94 uint32_t Author;
95 uint32_t Owner;
96 uint32_t CallerAccess;
97 uint32_t AnonymousAccess;
98 uint32_t UnixModeBits;
99 uint32_t ParentVnode;
100 uint32_t ParentUnique;
101 uint32_t ResidencyMask;
102 uint32_t ClientModTime;
103 uint32_t ServerModTime;
104 uint32_t Group;
105 uint32_t SyncCounter;
106 uint32_t DataVersionHigh; /* For AFS/DFS translator */
107 uint32_t LockCount;
108 uint32_t LengthHigh;
109 uint32_t ErrorCode;
113 * Things in AFSStoreStatus.mask
116 const SS_MODTIME = 0x01 ;
117 const SS_OWNER = 0x02 ;
118 const SS_GROUP = 0x04 ;
119 const SS_MODEBITS = 0x08 ;
120 const SS_SEGSIZE = 0x10 ;
121 const SS_FSYNC = 0x400; /* 1024 */
124 struct AFSStoreStatus {
125 uint32_t Mask;
126 uint32_t ClientModTime;
127 uint32_t Owner;
128 uint32_t Group;
129 uint32_t UnixModeBits;
130 uint32_t SegSize;
133 struct AFSFetchVolumeStatus {
134 int32_t Vid;
135 int32_t ParentId;
136 char Online;
137 char InService;
138 char Blessed;
139 char NeedsSalvage;
140 int32_t Type;
141 int32_t MinQuota;
142 int32_t MaxQuota;
143 int32_t BlocksInUse;
144 int32_t PartBlocksAvail;
145 int32_t PartMaxBlocks;
148 struct AFSStoreVolumeStatus {
149 int32_t Mask;
150 int32_t MinQuota;
151 int32_t MaxQuota;
154 const AFS_SETMINQUOTA = 1;
155 const AFS_SETMAXQUOTA = 2;
157 const AFSOPAQUEMAX = 1024;
159 typedef opaque AFSOpaque<AFSOPAQUEMAX>;
161 typedef int32_t ViceLockType;
163 const AFSCBMAX = 50;
165 typedef AFSCallBack AFSCBs<AFSCBMAX>;
166 typedef AFSFetchStatus AFSBulkStats<AFSCBMAX>;
167 typedef AFSFid AFSCBFids<AFSCBMAX>;
169 /* Definitions for ACLs */
171 const PRSFS_READ = 1 ; /* Read files */
172 const PRSFS_WRITE = 2 ; /* Write files & write-lock existing files */
173 const PRSFS_INSERT = 4 ; /* Insert & write-lock new files */
174 const PRSFS_LOOKUP = 8 ; /* Enumerate files and examine ACL */
175 const PRSFS_DELETE = 16 ; /* Remove files */
176 const PRSFS_LOCK = 32 ; /* Read-lock files */
177 const PRSFS_ADMINISTER = 64 ; /* Set access list of directory */
179 struct AFSVolumeInfo {
180 uint32_t Vid;
181 int32_t Type;
182 uint32_t Type0;
183 uint32_t Type1;
184 uint32_t Type2;
185 uint32_t Type3;
186 uint32_t Type4;
187 uint32_t ServerCount;
188 uint32_t Server0;
189 uint32_t Server1;
190 uint32_t Server2;
191 uint32_t Server3;
192 uint32_t Server4;
193 uint32_t Server5;
194 uint32_t Server6;
195 uint32_t Server7;
196 uint16_t Port0;
197 uint16_t Port1;
198 uint16_t Port2;
199 uint16_t Port3;
200 uint16_t Port4;
201 uint16_t Port5;
202 uint16_t Port6;
203 uint16_t Port7;
206 #include "afsuuid.h"
208 const AFSCAPABILITIESMAX = 196;
210 typedef int32_t Capabilities<AFSCAPABILITIESMAX>;
212 %#endif /* _COMMON_ */