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
17 #ifdef DJGPP /* we need these for vldbentry decl., etc. */
18 #include <afs/vldbint.h>
19 #include <afs/afsint.h>
23 /* FIXME: these were "long" but Windows NT wants "int" */
24 int VL_GetEntryByID(struct rx_connection *, afs_int32, afs_int32, struct vldbentry *);
25 int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
26 int VL_ProbeServer(struct rx_connection *);
27 int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbentry *);
28 int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
31 int StartRXAFS_FetchData (struct rx_call *,
35 int EndRXAFS_FetchData (struct rx_call *,
36 struct AFSFetchStatus *OutStatus,
37 struct AFSCallBack *CallBack,
38 struct AFSVolSync *Sync);
40 int RXAFS_FetchACL(struct rx_connection *,
42 struct AFSOpaque *AccessList,
43 struct AFSFetchStatus *OutStatus,
44 struct AFSVolSync *Sync);
46 int RXAFS_FetchStatus (struct rx_connection *,
48 struct AFSFetchStatus *OutStatus,
49 struct AFSCallBack *CallBack,
50 struct AFSVolSync *Sync);
52 int StartRXAFS_StoreData (struct rx_call *,
54 struct AFSStoreStatus *InStatus,
57 afs_uint32 FileLength);
59 int EndRXAFS_StoreData(struct rx_call *,
60 struct AFSFetchStatus *OutStatus,
61 struct AFSVolSync *Sync);
63 int StartRXAFS_FetchData64(struct rx_call *z_call,
68 int EndRXAFS_FetchData64(struct rx_call *z_call,
69 struct AFSFetchStatus * OutStatus,
70 struct AFSCallBack * CallBack,
71 struct AFSVolSync * Sync);
73 afs_int32 SRXAFS_FetchData64(struct rx_call *z_call,
77 struct AFSFetchStatus * OutStatus,
78 struct AFSCallBack * CallBack,
79 struct AFSVolSync * Sync);
81 int StartRXAFS_StoreData64(struct rx_call *z_call,
83 struct AFSStoreStatus * InStatus,
86 afs_uint64 FileLength);
88 int EndRXAFS_StoreData64(struct rx_call *z_call,
89 struct AFSFetchStatus * OutStatus,
90 struct AFSVolSync * Sync);
92 afs_int32 SRXAFS_StoreData64(struct rx_call *z_call,
94 struct AFSStoreStatus * InStatus,
97 afs_uint64 FileLength,
98 struct AFSFetchStatus * OutStatus,
99 struct AFSVolSync * Sync);
101 int RXAFS_StoreACL (struct rx_connection *,
103 struct AFSOpaque *AccessList,
104 struct AFSFetchStatus *OutStatus,
105 struct AFSVolSync *Sync);
107 int RXAFS_StoreStatus(struct rx_connection *,
109 struct AFSStoreStatus *InStatus,
110 struct AFSFetchStatus *OutStatus,
111 struct AFSVolSync *Sync);
113 int RXAFS_RemoveFile (struct rx_connection *,
114 struct AFSFid *DirFid,
116 struct AFSFetchStatus *OutStatus,
117 struct AFSVolSync *Sync);
119 int RXAFS_CreateFile (struct rx_connection *,
120 struct AFSFid *DirFid,
122 struct AFSStoreStatus *InStatus,
123 struct AFSFid *OutFid,
124 struct AFSFetchStatus *OutFidStatus,
125 struct AFSFetchStatus *OutDirStatus,
126 struct AFSCallBack *CallBack,
127 struct AFSVolSync *Sync);
129 int RXAFS_Rename (struct rx_connection *,
130 struct AFSFid *OldDirFid,
132 struct AFSFid *NewDirFid,
134 struct AFSFetchStatus *OutOldDirStatus,
135 struct AFSFetchStatus *OutNewDirStatus,
136 struct AFSVolSync *Sync);
138 int RXAFS_Symlink (struct rx_connection *,
139 struct AFSFid *DirFid,
142 struct AFSStoreStatus *InStatus,
143 struct AFSFid *OutFid,
144 struct AFSFetchStatus *OutFidStatus,
145 struct AFSFetchStatus *OutDirStatus,
146 struct AFSVolSync *Sync);
148 int RXAFS_Link (struct rx_connection *,
149 struct AFSFid *DirFid,
151 struct AFSFid *ExistingFid,
152 struct AFSFetchStatus *OutFidStatus,
153 struct AFSFetchStatus *OutDirStatus,
154 struct AFSVolSync *Sync);
156 int RXAFS_MakeDir (struct rx_connection *,
157 struct AFSFid *DirFid,
159 struct AFSStoreStatus *InStatus,
160 struct AFSFid *OutFid,
161 struct AFSFetchStatus *OutFidStatus,
162 struct AFSFetchStatus *OutDirStatus,
163 struct AFSCallBack *CallBack,
164 struct AFSVolSync *Sync);
166 int RXAFS_RemoveDir (struct rx_connection *,
167 struct AFSFid *DirFid,
169 struct AFSFetchStatus *OutDirStatus,
170 struct AFSVolSync *Sync);
172 int RXAFS_GetStatistics (struct rx_connection *,
173 struct ViceStatistics *Statistics);
175 int RXAFS_GiveUpCallBacks (struct rx_connection *,
176 struct AFSCBFids *Fids_Array,
177 struct AFSCBs *CallBacks_Array);
179 int RXAFS_GetVolumeInfo (struct rx_connection *,
181 struct VolumeInfo *Volumeinfo);
183 int RXAFS_GetVolumeStatus (struct rx_connection *,
185 struct AFSFetchVolumeStatus *Volumestatus,
190 int RXAFS_SetVolumeStatus (struct rx_connection *,
192 struct AFSStoreVolumeStatus *Volumestatus,
197 int RXAFS_GetRootVolume (struct rx_connection *,
200 int RXAFS_CheckToken (struct rx_connection *,
202 struct AFSOpaque *token);
204 int RXAFS_GetTime (struct rx_connection *,
206 afs_uint32 *USeconds);
208 int RXAFS_BulkStatus (struct rx_connection *,
209 struct AFSCBFids *FidsArray,
210 struct AFSBulkStats *StatArray,
211 struct AFSCBs *CBArray,
212 struct AFSVolSync *Sync);
214 int RXAFS_SetLock (struct rx_connection *,
217 struct AFSVolSync *Sync);
219 int RXAFS_ExtendLock (struct rx_connection *,
221 struct AFSVolSync *Sync);
223 int RXAFS_ReleaseLock (struct rx_connection *,
225 struct AFSVolSync *Sync);
227 /* This interface is to supported the AFS/DFS Protocol Translator */
228 int RXAFS_Lookup (struct rx_connection *,
229 struct AFSFid *DirFid,
231 struct AFSFid *OutFid,
232 struct AFSFetchStatus *OutFidStatus,
233 struct AFSFetchStatus *OutDirStatus,
234 struct AFSCallBack *CallBack,
235 struct AFSVolSync *Sync);
237 #define CM_DEFAULT_CALLBACKPORT 7001
239 /* common flags to many procedures */
240 #define CM_FLAG_CREATE 1 /* create entry */
241 #define CM_FLAG_CASEFOLD 2 /* fold case in namei, lookup, etc. */
242 #define CM_FLAG_EXCLUSIVE 4 /* create exclusive */
243 #define CM_FLAG_FOLLOW 8 /* follow symlinks, even at the end (namei) */
244 #define CM_FLAG_8DOT3 0x10 /* restrict to 8.3 name */
245 #define CM_FLAG_NOMOUNTCHASE 0x20 /* don't follow mount points */
246 #define CM_FLAG_DIRSEARCH 0x40 /* for directory search */
247 #define CM_FLAG_CHECKPATH 0x80 /* Path instead of File */
248 #define CM_FLAG_NOPROBE 0x100 /* For use with cm_GetCellxxx - do not probe server status */
251 #define CM_ERROR_BASE 0x66543200
252 #define CM_ERROR_NOSUCHCELL (CM_ERROR_BASE+0)
253 #define CM_ERROR_NOSUCHVOLUME (CM_ERROR_BASE+1)
254 #define CM_ERROR_TIMEDOUT (CM_ERROR_BASE+2)
255 #define CM_ERROR_RETRY (CM_ERROR_BASE+3)
256 #define CM_ERROR_NOACCESS (CM_ERROR_BASE+4)
257 #define CM_ERROR_NOSUCHFILE (CM_ERROR_BASE+5)
258 #define CM_ERROR_STOPNOW (CM_ERROR_BASE+6)
259 #define CM_ERROR_TOOBIG (CM_ERROR_BASE+7)
260 #define CM_ERROR_INVAL (CM_ERROR_BASE+8)
261 #define CM_ERROR_BADFD (CM_ERROR_BASE+9)
262 #define CM_ERROR_BADFDOP (CM_ERROR_BASE+10)
263 #define CM_ERROR_EXISTS (CM_ERROR_BASE+11)
264 #define CM_ERROR_CROSSDEVLINK (CM_ERROR_BASE+12)
265 #define CM_ERROR_BADOP (CM_ERROR_BASE+13)
266 #define CM_ERROR_BADPASSWORD (CM_ERROR_BASE+14)
267 #define CM_ERROR_NOTDIR (CM_ERROR_BASE+15)
268 #define CM_ERROR_ISDIR (CM_ERROR_BASE+16)
269 #define CM_ERROR_READONLY (CM_ERROR_BASE+17)
270 #define CM_ERROR_WOULDBLOCK (CM_ERROR_BASE+18)
271 #define CM_ERROR_QUOTA (CM_ERROR_BASE+19)
272 #define CM_ERROR_SPACE (CM_ERROR_BASE+20)
273 #define CM_ERROR_BADSHARENAME (CM_ERROR_BASE+21)
274 #define CM_ERROR_BADTID (CM_ERROR_BASE+22)
275 #define CM_ERROR_UNKNOWN (CM_ERROR_BASE+23)
276 #define CM_ERROR_NOMORETOKENS (CM_ERROR_BASE+24)
277 #define CM_ERROR_NOTEMPTY (CM_ERROR_BASE+25)
278 #define CM_ERROR_USESTD (CM_ERROR_BASE+26)
279 #define CM_ERROR_REMOTECONN (CM_ERROR_BASE+27)
280 #define CM_ERROR_ATSYS (CM_ERROR_BASE+28)
281 #define CM_ERROR_NOSUCHPATH (CM_ERROR_BASE+29)
282 #define CM_ERROR_CLOCKSKEW (CM_ERROR_BASE+31)
283 #define CM_ERROR_BADSMB (CM_ERROR_BASE+32)
284 #define CM_ERROR_ALLBUSY (CM_ERROR_BASE+33)
285 #define CM_ERROR_NOFILES (CM_ERROR_BASE+34)
286 #define CM_ERROR_PARTIALWRITE (CM_ERROR_BASE+35)
287 #define CM_ERROR_NOIPC (CM_ERROR_BASE+36)
288 #define CM_ERROR_BADNTFILENAME (CM_ERROR_BASE+37)
289 #define CM_ERROR_BUFFERTOOSMALL (CM_ERROR_BASE+38)
290 #define CM_ERROR_RENAME_IDENTICAL (CM_ERROR_BASE+39)
291 #define CM_ERROR_ALLOFFLINE (CM_ERROR_BASE+40)
292 #define CM_ERROR_AMBIGUOUS_FILENAME (CM_ERROR_BASE+41)
293 #define CM_ERROR_BADLOGONTYPE (CM_ERROR_BASE+42)
294 #define CM_ERROR_GSSCONTINUE (CM_ERROR_BASE+43)
295 #define CM_ERROR_TIDIPC (CM_ERROR_BASE+44)
296 #define CM_ERROR_TOO_MANY_SYMLINKS (CM_ERROR_BASE+45)
297 #define CM_ERROR_PATH_NOT_COVERED (CM_ERROR_BASE+46)
298 #define CM_ERROR_LOCK_CONFLICT (CM_ERROR_BASE+47)
299 #define CM_ERROR_SHARING_VIOLATION (CM_ERROR_BASE+48)
300 #define CM_ERROR_ALLDOWN (CM_ERROR_BASE+49)
301 #define CM_ERROR_TOOFEWBUFS (CM_ERROR_BASE+50)
302 #define CM_ERROR_TOOMANYBUFS (CM_ERROR_BASE+51)
303 #define CM_ERROR_BAD_LEVEL (CM_ERROR_BASE+52)
304 #define CM_ERROR_NOT_A_DFSLINK (CM_ERROR_BASE+53)
305 #define CM_ERROR_INEXACT_MATCH (CM_ERROR_BASE+54)
306 #define CM_ERROR_BPLUS_NOMATCH (CM_ERROR_BASE+55)
307 #define CM_ERROR_EAS_NOT_SUPPORTED (CM_ERROR_BASE+56)
309 /* Used by cm_FollowMountPoint and cm_GetVolumeByName */
313 #endif /* __CM_H_ENV__ */