2 * Copyright (c) 1995 - 2004 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
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
35 * Common definition used by several *.xg files
46 const LockRelease
= 3;
48 const AFSNAMEMAX
= 256;
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;
88 struct AFSFetchStatus
{
89 uint32_t InterfaceVersion
;
96 uint32_t CallerAccess
;
97 uint32_t AnonymousAccess
;
98 uint32_t UnixModeBits
;
100 uint32_t ParentUnique
;
101 uint32_t ResidencyMask
;
102 uint32_t ClientModTime
;
103 uint32_t ServerModTime
;
105 uint32_t SyncCounter
;
106 uint32_t DataVersionHigh
; /* For AFS/DFS translator */
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
{
126 uint32_t ClientModTime
;
129 uint32_t UnixModeBits
;
133 struct AFSFetchVolumeStatus
{
144 int32_t PartBlocksAvail
;
145 int32_t PartMaxBlocks
;
148 struct AFSStoreVolumeStatus
{
154 const AFS_SETMINQUOTA
= 1;
155 const AFS_SETMAXQUOTA
= 2;
157 const AFSOPAQUEMAX
= 1024;
159 typedef opaque AFSOpaque
<AFSOPAQUEMAX
>;
161 typedef int32_t ViceLockType
;
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
{
187 uint32_t ServerCount
;
208 const AFSCAPABILITIESMAX
= 196;
210 typedef int32_t Capabilities
<AFSCAPABILITIESMAX
>;
212 %#endif /* _COMMON_ */