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
11 #define __CM_H_ENV__ 1
13 #ifndef AFS_PTHREAD_ENV
14 #define AFS_PTHREAD_ENV 1
19 /* FIXME: these were "long" but Windows NT wants "int" */
20 int VL_GetEntryByID(struct rx_connection *, afs_int32, afs_int32, struct vldbentry *);
21 int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
22 int VL_ProbeServer(struct rx_connection *);
23 int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbentry *);
24 int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
27 int StartRXAFS_FetchData (struct rx_call *,
31 int EndRXAFS_FetchData (struct rx_call *,
32 struct AFSFetchStatus *OutStatus,
33 struct AFSCallBack *CallBack,
34 struct AFSVolSync *Sync);
36 int RXAFS_FetchACL(struct rx_connection *,
38 struct AFSOpaque *AccessList,
39 struct AFSFetchStatus *OutStatus,
40 struct AFSVolSync *Sync);
42 int RXAFS_FetchStatus (struct rx_connection *,
44 struct AFSFetchStatus *OutStatus,
45 struct AFSCallBack *CallBack,
46 struct AFSVolSync *Sync);
48 int StartRXAFS_StoreData (struct rx_call *,
50 struct AFSStoreStatus *InStatus,
53 afs_uint32 FileLength);
55 int EndRXAFS_StoreData(struct rx_call *,
56 struct AFSFetchStatus *OutStatus,
57 struct AFSVolSync *Sync);
59 int StartRXAFS_FetchData64(struct rx_call *z_call,
64 int EndRXAFS_FetchData64(struct rx_call *z_call,
65 struct AFSFetchStatus * OutStatus,
66 struct AFSCallBack * CallBack,
67 struct AFSVolSync * Sync);
69 afs_int32 SRXAFS_FetchData64(struct rx_call *z_call,
73 struct AFSFetchStatus * OutStatus,
74 struct AFSCallBack * CallBack,
75 struct AFSVolSync * Sync);
77 int StartRXAFS_StoreData64(struct rx_call *z_call,
79 struct AFSStoreStatus * InStatus,
82 afs_uint64 FileLength);
84 int EndRXAFS_StoreData64(struct rx_call *z_call,
85 struct AFSFetchStatus * OutStatus,
86 struct AFSVolSync * Sync);
88 afs_int32 SRXAFS_StoreData64(struct rx_call *z_call,
90 struct AFSStoreStatus * InStatus,
93 afs_uint64 FileLength,
94 struct AFSFetchStatus * OutStatus,
95 struct AFSVolSync * Sync);
97 int RXAFS_StoreACL (struct rx_connection *,
99 struct AFSOpaque *AccessList,
100 struct AFSFetchStatus *OutStatus,
101 struct AFSVolSync *Sync);
103 int RXAFS_StoreStatus(struct rx_connection *,
105 struct AFSStoreStatus *InStatus,
106 struct AFSFetchStatus *OutStatus,
107 struct AFSVolSync *Sync);
109 int RXAFS_RemoveFile (struct rx_connection *,
110 struct AFSFid *DirFid,
112 struct AFSFetchStatus *OutStatus,
113 struct AFSVolSync *Sync);
115 int RXAFS_CreateFile (struct rx_connection *,
116 struct AFSFid *DirFid,
118 struct AFSStoreStatus *InStatus,
119 struct AFSFid *OutFid,
120 struct AFSFetchStatus *OutFidStatus,
121 struct AFSFetchStatus *OutDirStatus,
122 struct AFSCallBack *CallBack,
123 struct AFSVolSync *Sync);
125 int RXAFS_Rename (struct rx_connection *,
126 struct AFSFid *OldDirFid,
128 struct AFSFid *NewDirFid,
130 struct AFSFetchStatus *OutOldDirStatus,
131 struct AFSFetchStatus *OutNewDirStatus,
132 struct AFSVolSync *Sync);
134 int RXAFS_Symlink (struct rx_connection *,
135 struct AFSFid *DirFid,
138 struct AFSStoreStatus *InStatus,
139 struct AFSFid *OutFid,
140 struct AFSFetchStatus *OutFidStatus,
141 struct AFSFetchStatus *OutDirStatus,
142 struct AFSVolSync *Sync);
144 int RXAFS_Link (struct rx_connection *,
145 struct AFSFid *DirFid,
147 struct AFSFid *ExistingFid,
148 struct AFSFetchStatus *OutFidStatus,
149 struct AFSFetchStatus *OutDirStatus,
150 struct AFSVolSync *Sync);
152 int RXAFS_MakeDir (struct rx_connection *,
153 struct AFSFid *DirFid,
155 struct AFSStoreStatus *InStatus,
156 struct AFSFid *OutFid,
157 struct AFSFetchStatus *OutFidStatus,
158 struct AFSFetchStatus *OutDirStatus,
159 struct AFSCallBack *CallBack,
160 struct AFSVolSync *Sync);
162 int RXAFS_RemoveDir (struct rx_connection *,
163 struct AFSFid *DirFid,
165 struct AFSFetchStatus *OutDirStatus,
166 struct AFSVolSync *Sync);
168 int RXAFS_GetStatistics (struct rx_connection *,
169 struct ViceStatistics *Statistics);
171 int RXAFS_GiveUpCallBacks (struct rx_connection *,
172 struct AFSCBFids *Fids_Array,
173 struct AFSCBs *CallBacks_Array);
175 int RXAFS_GetVolumeInfo (struct rx_connection *,
177 struct VolumeInfo *Volumeinfo);
179 int RXAFS_GetVolumeStatus (struct rx_connection *,
181 struct AFSFetchVolumeStatus *Volumestatus,
186 int RXAFS_SetVolumeStatus (struct rx_connection *,
188 struct AFSStoreVolumeStatus *Volumestatus,
193 int RXAFS_GetRootVolume (struct rx_connection *,
196 int RXAFS_CheckToken (struct rx_connection *,
198 struct AFSOpaque *token);
200 int RXAFS_GetTime (struct rx_connection *,
202 afs_uint32 *USeconds);
204 int RXAFS_BulkStatus (struct rx_connection *,
205 struct AFSCBFids *FidsArray,
206 struct AFSBulkStats *StatArray,
207 struct AFSCBs *CBArray,
208 struct AFSVolSync *Sync);
210 int RXAFS_SetLock (struct rx_connection *,
213 struct AFSVolSync *Sync);
215 int RXAFS_ExtendLock (struct rx_connection *,
217 struct AFSVolSync *Sync);
219 int RXAFS_ReleaseLock (struct rx_connection *,
221 struct AFSVolSync *Sync);
223 /* This interface is to supported the AFS/DFS Protocol Translator */
224 int RXAFS_Lookup (struct rx_connection *,
225 struct AFSFid *DirFid,
227 struct AFSFid *OutFid,
228 struct AFSFetchStatus *OutFidStatus,
229 struct AFSFetchStatus *OutDirStatus,
230 struct AFSCallBack *CallBack,
231 struct AFSVolSync *Sync);
233 #define CM_DEFAULT_CALLBACKPORT 7001
235 /* common flags to many procedures */
236 #define CM_FLAG_CREATE 1 /* create entry */
237 #define CM_FLAG_CASEFOLD 2 /* fold case in namei, lookup, etc. */
238 #define CM_FLAG_EXCLUSIVE 4 /* create exclusive */
239 #define CM_FLAG_FOLLOW 8 /* follow symlinks, even at the end (namei) */
240 #define CM_FLAG_8DOT3 0x10 /* restrict to 8.3 name */
241 #define CM_FLAG_NOMOUNTCHASE 0x20 /* don't follow mount points */
242 #define CM_FLAG_DIRSEARCH 0x40 /* for directory search */
243 #define CM_FLAG_CHECKPATH 0x80 /* Path instead of File */
246 #define CM_ERROR_BASE 0x66543200
247 #define CM_ERROR_NOSUCHCELL (CM_ERROR_BASE+0)
248 #define CM_ERROR_NOSUCHVOLUME (CM_ERROR_BASE+1)
249 #define CM_ERROR_TIMEDOUT (CM_ERROR_BASE+2)
250 #define CM_ERROR_RETRY (CM_ERROR_BASE+3)
251 #define CM_ERROR_NOACCESS (CM_ERROR_BASE+4)
252 #define CM_ERROR_NOSUCHFILE (CM_ERROR_BASE+5)
253 #define CM_ERROR_STOPNOW (CM_ERROR_BASE+6)
254 #define CM_ERROR_TOOBIG (CM_ERROR_BASE+7)
255 #define CM_ERROR_INVAL (CM_ERROR_BASE+8)
256 #define CM_ERROR_BADFD (CM_ERROR_BASE+9)
257 #define CM_ERROR_BADFDOP (CM_ERROR_BASE+10)
258 #define CM_ERROR_EXISTS (CM_ERROR_BASE+11)
259 #define CM_ERROR_CROSSDEVLINK (CM_ERROR_BASE+12)
260 #define CM_ERROR_BADOP (CM_ERROR_BASE+13)
261 #define CM_ERROR_BADPASSWORD (CM_ERROR_BASE+14)
262 #define CM_ERROR_NOTDIR (CM_ERROR_BASE+15)
263 #define CM_ERROR_ISDIR (CM_ERROR_BASE+16)
264 #define CM_ERROR_READONLY (CM_ERROR_BASE+17)
265 #define CM_ERROR_WOULDBLOCK (CM_ERROR_BASE+18)
266 #define CM_ERROR_QUOTA (CM_ERROR_BASE+19)
267 #define CM_ERROR_SPACE (CM_ERROR_BASE+20)
268 #define CM_ERROR_BADSHARENAME (CM_ERROR_BASE+21)
269 #define CM_ERROR_BADTID (CM_ERROR_BASE+22)
270 #define CM_ERROR_UNKNOWN (CM_ERROR_BASE+23)
271 #define CM_ERROR_NOMORETOKENS (CM_ERROR_BASE+24)
272 #define CM_ERROR_NOTEMPTY (CM_ERROR_BASE+25)
273 #define CM_ERROR_USESTD (CM_ERROR_BASE+26)
274 #define CM_ERROR_REMOTECONN (CM_ERROR_BASE+27)
275 #define CM_ERROR_ATSYS (CM_ERROR_BASE+28)
276 #define CM_ERROR_NOSUCHPATH (CM_ERROR_BASE+29)
277 #define CM_ERROR_CLOCKSKEW (CM_ERROR_BASE+31)
278 #define CM_ERROR_BADSMB (CM_ERROR_BASE+32)
279 #define CM_ERROR_ALLBUSY (CM_ERROR_BASE+33)
280 #define CM_ERROR_NOFILES (CM_ERROR_BASE+34)
281 #define CM_ERROR_PARTIALWRITE (CM_ERROR_BASE+35)
282 #define CM_ERROR_NOIPC (CM_ERROR_BASE+36)
283 #define CM_ERROR_BADNTFILENAME (CM_ERROR_BASE+37)
284 #define CM_ERROR_BUFFERTOOSMALL (CM_ERROR_BASE+38)
285 #define CM_ERROR_RENAME_IDENTICAL (CM_ERROR_BASE+39)
286 #define CM_ERROR_ALLOFFLINE (CM_ERROR_BASE+40)
287 #define CM_ERROR_AMBIGUOUS_FILENAME (CM_ERROR_BASE+41)
288 #define CM_ERROR_BADLOGONTYPE (CM_ERROR_BASE+42)
289 #define CM_ERROR_GSSCONTINUE (CM_ERROR_BASE+43)
290 #define CM_ERROR_TIDIPC (CM_ERROR_BASE+44)
291 #define CM_ERROR_TOO_MANY_SYMLINKS (CM_ERROR_BASE+45)
292 #define CM_ERROR_PATH_NOT_COVERED (CM_ERROR_BASE+46)
293 #define CM_ERROR_LOCK_CONFLICT (CM_ERROR_BASE+47)
294 #define CM_ERROR_SHARING_VIOLATION (CM_ERROR_BASE+48)
295 #define CM_ERROR_ALLDOWN (CM_ERROR_BASE+49)
296 #define CM_ERROR_TOOFEWBUFS (CM_ERROR_BASE+50)
297 #define CM_ERROR_TOOMANYBUFS (CM_ERROR_BASE+51)
298 #define CM_ERROR_BAD_LEVEL (CM_ERROR_BASE+52)
299 #define CM_ERROR_NOT_A_DFSLINK (CM_ERROR_BASE+53)
301 /* Used by cm_FollowMountPoint and cm_GetVolumeByName */
305 #endif /* __CM_H_ENV__ */