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
14 #ifdef DJGPP /* we need these for vldbentry decl., etc. */
15 #include <afs/vldbint.h>
16 #include <afs/afsint.h>
20 /* FIXME: these were "long" but Windows NT wants "int" */
21 int VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
22 int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
23 int VL_ProbeServer(struct rx_connection *);
24 int VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
25 int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
28 extern StartRXAFS_FetchData (struct rx_call *,
32 extern EndRXAFS_FetchData (struct rx_call *,
33 struct AFSFetchStatus *OutStatus,
34 struct AFSCallBack *CallBack,
35 struct AFSVolSync *Sync);
37 extern RXAFS_FetchACL(struct rx_connection *,
39 struct AFSOpaque *AccessList,
40 struct AFSFetchStatus *OutStatus,
41 struct AFSVolSync *Sync);
43 extern RXAFS_FetchStatus (struct rx_connection *,
45 struct AFSFetchStatus *OutStatus,
46 struct AFSCallBack *CallBack,
47 struct AFSVolSync *Sync);
49 int StartRXAFS_StoreData (struct rx_call *,
51 struct AFSStoreStatus *InStatus,
54 afs_int32 FileLength);
56 int EndRXAFS_StoreData(struct rx_call *,
57 struct AFSFetchStatus *OutStatus,
58 struct AFSVolSync *Sync);
60 int RXAFS_StoreACL (struct rx_connection *,
62 struct AFSOpaque *AccessList,
63 struct AFSFetchStatus *OutStatus,
64 struct AFSVolSync *Sync);
66 int RXAFS_StoreStatus(struct rx_connection *,
68 struct AFSStoreStatus *InStatus,
69 struct AFSFetchStatus *OutStatus,
70 struct AFSVolSync *Sync);
72 int RXAFS_RemoveFile (struct rx_connection *,
73 struct AFSFid *DirFid,
75 struct AFSFetchStatus *OutStatus,
76 struct AFSVolSync *Sync);
78 int RXAFS_CreateFile (struct rx_connection *,
79 struct AFSFid *DirFid,
81 struct AFSStoreStatus *InStatus,
82 struct AFSFid *OutFid,
83 struct AFSFetchStatus *OutFidStatus,
84 struct AFSFetchStatus *OutDirStatus,
85 struct AFSCallBack *CallBack,
86 struct AFSVolSync *Sync);
88 int RXAFS_Rename (struct rx_connection *,
89 struct AFSFid *OldDirFid,
91 struct AFSFid *NewDirFid,
93 struct AFSFetchStatus *OutOldDirStatus,
94 struct AFSFetchStatus *OutNewDirStatus,
95 struct AFSVolSync *Sync);
97 int RXAFS_Symlink (struct rx_connection *,
98 struct AFSFid *DirFid,
101 struct AFSStoreStatus *InStatus,
102 struct AFSFid *OutFid,
103 struct AFSFetchStatus *OutFidStatus,
104 struct AFSFetchStatus *OutDirStatus,
105 struct AFSVolSync *Sync);
107 int RXAFS_Link (struct rx_connection *,
108 struct AFSFid *DirFid,
110 struct AFSFid *ExistingFid,
111 struct AFSFetchStatus *OutFidStatus,
112 struct AFSFetchStatus *OutDirStatus,
113 struct AFSVolSync *Sync);
115 int RXAFS_MakeDir (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_RemoveDir (struct rx_connection *,
126 struct AFSFid *DirFid,
128 struct AFSFetchStatus *OutDirStatus,
129 struct AFSVolSync *Sync);
131 int RXAFS_GetStatistics (struct rx_connection *,
132 struct ViceStatistics *Statistics);
134 int RXAFS_GiveUpCallBacks (struct rx_connection *,
135 struct AFSCBFids *Fids_Array,
136 struct AFSCBs *CallBacks_Array);
138 int RXAFS_GetVolumeInfo (struct rx_connection *,
140 struct VolumeInfo *Volumeinfo);
142 int RXAFS_GetVolumeStatus (struct rx_connection *,
144 struct AFSFetchVolumeStatus *Volumestatus,
149 int RXAFS_SetVolumeStatus (struct rx_connection *,
151 struct AFSStoreVolumeStatus *Volumestatus,
156 int RXAFS_GetRootVolume (struct rx_connection *,
159 int RXAFS_CheckToken (struct rx_connection *,
161 struct AFSOpaque *token);
163 int RXAFS_GetTime (struct rx_connection *,
165 afs_uint32 *USeconds);
167 int RXAFS_BulkStatus (struct rx_connection *,
168 struct AFSCBFids *FidsArray,
169 struct AFSBulkStats *StatArray,
170 struct AFSCBs *CBArray,
171 struct AFSVolSync *Sync);
173 int RXAFS_SetLock (struct rx_connection *,
176 struct AFSVolSync *Sync);
178 int RXAFS_ExtendLock (struct rx_connection *,
180 struct AFSVolSync *Sync);
182 int RXAFS_ReleaseLock (struct rx_connection *,
184 struct AFSVolSync *Sync);
186 /* This interface is to supported the AFS/DFS Protocol Translator */
187 int RXAFS_Lookup (struct rx_connection *,
188 struct AFSFid *DirFid,
190 struct AFSFid *OutFid,
191 struct AFSFetchStatus *OutFidStatus,
192 struct AFSFetchStatus *OutDirStatus,
193 struct AFSCallBack *CallBack,
194 struct AFSVolSync *Sync);
196 /* common flags to many procedures */
197 #define CM_FLAG_CREATE 1 /* create entry */
198 #define CM_FLAG_CASEFOLD 2 /* fold case in namei, lookup, etc. */
199 #define CM_FLAG_EXCLUSIVE 4 /* create exclusive */
200 #define CM_FLAG_FOLLOW 8 /* follow symlinks, even at the end (namei) */
201 #define CM_FLAG_8DOT3 0x10 /* restrict to 8.3 name */
202 #define CM_FLAG_NOMOUNTCHASE 0x20 /* don't follow mount points */
203 #define CM_FLAG_DIRSEARCH 0x40 /* for directory search */
204 #define CM_FLAG_CHECKPATH 0x80 /* Path instead of File */
207 #define CM_ERROR_BASE 0x66543200
208 #define CM_ERROR_NOSUCHCELL (CM_ERROR_BASE+0)
209 #define CM_ERROR_NOSUCHVOLUME (CM_ERROR_BASE+1)
210 #define CM_ERROR_TIMEDOUT (CM_ERROR_BASE+2)
211 #define CM_ERROR_RETRY (CM_ERROR_BASE+3)
212 #define CM_ERROR_NOACCESS (CM_ERROR_BASE+4)
213 #define CM_ERROR_NOSUCHFILE (CM_ERROR_BASE+5)
214 #define CM_ERROR_STOPNOW (CM_ERROR_BASE+6)
215 #define CM_ERROR_TOOBIG (CM_ERROR_BASE+7)
216 #define CM_ERROR_INVAL (CM_ERROR_BASE+8)
217 #define CM_ERROR_BADFD (CM_ERROR_BASE+9)
218 #define CM_ERROR_BADFDOP (CM_ERROR_BASE+10)
219 #define CM_ERROR_EXISTS (CM_ERROR_BASE+11)
220 #define CM_ERROR_CROSSDEVLINK (CM_ERROR_BASE+12)
221 #define CM_ERROR_BADOP (CM_ERROR_BASE+13)
222 #define CM_ERROR_BADSMB (CM_ERROR_BASE+32)
223 /* CM_ERROR_BADPASSWORD used to be here */
224 #define CM_ERROR_NOTDIR (CM_ERROR_BASE+15)
225 #define CM_ERROR_ISDIR (CM_ERROR_BASE+16)
226 #define CM_ERROR_READONLY (CM_ERROR_BASE+17)
227 #define CM_ERROR_WOULDBLOCK (CM_ERROR_BASE+18)
228 #define CM_ERROR_QUOTA (CM_ERROR_BASE+19)
229 #define CM_ERROR_SPACE (CM_ERROR_BASE+20)
230 #define CM_ERROR_BADSHARENAME (CM_ERROR_BASE+21)
231 #define CM_ERROR_BADTID (CM_ERROR_BASE+22)
232 #define CM_ERROR_UNKNOWN (CM_ERROR_BASE+23)
233 #define CM_ERROR_NOMORETOKENS (CM_ERROR_BASE+24)
234 #define CM_ERROR_NOTEMPTY (CM_ERROR_BASE+25)
235 #define CM_ERROR_USESTD (CM_ERROR_BASE+26)
236 #define CM_ERROR_REMOTECONN (CM_ERROR_BASE+27)
237 #define CM_ERROR_ATSYS (CM_ERROR_BASE+28)
238 #define CM_ERROR_NOSUCHPATH (CM_ERROR_BASE+29)
240 #define CM_ERROR_CLOCKSKEW (CM_ERROR_BASE+31)
242 #define CM_ERROR_ALLBUSY (CM_ERROR_BASE+33)
243 #define CM_ERROR_NOFILES (CM_ERROR_BASE+34)
244 #define CM_ERROR_PARTIALWRITE (CM_ERROR_BASE+35)
245 #define CM_ERROR_NOIPC (CM_ERROR_BASE+36)
246 #define CM_ERROR_BADNTFILENAME (CM_ERROR_BASE+37)
247 #define CM_ERROR_BUFFERTOOSMALL (CM_ERROR_BASE+38)
248 #define CM_ERROR_RENAME_IDENTICAL (CM_ERROR_BASE+39)
249 #define CM_ERROR_ALLOFFLINE (CM_ERROR_BASE+40)
251 #endif /* __CM_H_ENV__ */