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 long VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
21 long VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
22 long VL_ProbeServer(struct rx_connection *);
23 long VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
24 long VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
27 extern StartRXAFS_FetchData (struct rx_call *,
31 extern EndRXAFS_FetchData (struct rx_call *,
32 struct AFSFetchStatus *OutStatus,
33 struct AFSCallBack *CallBack,
34 struct AFSVolSync *Sync);
36 extern RXAFS_FetchACL(struct rx_connection *,
38 struct AFSOpaque *AccessList,
39 struct AFSFetchStatus *OutStatus,
40 struct AFSVolSync *Sync);
42 extern 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_int32 FileLength);
55 int EndRXAFS_StoreData(struct rx_call *,
56 struct AFSFetchStatus *OutStatus,
57 struct AFSVolSync *Sync);
59 int RXAFS_StoreACL (struct rx_connection *,
61 struct AFSOpaque *AccessList,
62 struct AFSFetchStatus *OutStatus,
63 struct AFSVolSync *Sync);
65 int RXAFS_StoreStatus(struct rx_connection *,
67 struct AFSStoreStatus *InStatus,
68 struct AFSFetchStatus *OutStatus,
69 struct AFSVolSync *Sync);
71 int RXAFS_RemoveFile (struct rx_connection *,
72 struct AFSFid *DirFid,
74 struct AFSFetchStatus *OutStatus,
75 struct AFSVolSync *Sync);
77 int RXAFS_CreateFile (struct rx_connection *,
78 struct AFSFid *DirFid,
80 struct AFSStoreStatus *InStatus,
81 struct AFSFid *OutFid,
82 struct AFSFetchStatus *OutFidStatus,
83 struct AFSFetchStatus *OutDirStatus,
84 struct AFSCallBack *CallBack,
85 struct AFSVolSync *Sync);
87 int RXAFS_Rename (struct rx_connection *,
88 struct AFSFid *OldDirFid,
90 struct AFSFid *NewDirFid,
92 struct AFSFetchStatus *OutOldDirStatus,
93 struct AFSFetchStatus *OutNewDirStatus,
94 struct AFSVolSync *Sync);
96 int RXAFS_Symlink (struct rx_connection *,
97 struct AFSFid *DirFid,
100 struct AFSStoreStatus *InStatus,
101 struct AFSFid *OutFid,
102 struct AFSFetchStatus *OutFidStatus,
103 struct AFSFetchStatus *OutDirStatus,
104 struct AFSVolSync *Sync);
106 int RXAFS_Link (struct rx_connection *,
107 struct AFSFid *DirFid,
109 struct AFSFid *ExistingFid,
110 struct AFSFetchStatus *OutFidStatus,
111 struct AFSFetchStatus *OutDirStatus,
112 struct AFSVolSync *Sync);
114 int RXAFS_MakeDir (struct rx_connection *,
115 struct AFSFid *DirFid,
117 struct AFSStoreStatus *InStatus,
118 struct AFSFid *OutFid,
119 struct AFSFetchStatus *OutFidStatus,
120 struct AFSFetchStatus *OutDirStatus,
121 struct AFSCallBack *CallBack,
122 struct AFSVolSync *Sync);
124 int RXAFS_RemoveDir (struct rx_connection *,
125 struct AFSFid *DirFid,
127 struct AFSFetchStatus *OutDirStatus,
128 struct AFSVolSync *Sync);
130 int RXAFS_GetStatistics (struct rx_connection *,
131 struct ViceStatistics *Statistics);
133 int RXAFS_GiveUpCallBacks (struct rx_connection *,
134 struct AFSCBFids *Fids_Array,
135 struct AFSCBs *CallBacks_Array);
137 int RXAFS_GetVolumeInfo (struct rx_connection *,
139 struct VolumeInfo *Volumeinfo);
141 int RXAFS_GetVolumeStatus (struct rx_connection *,
143 struct AFSFetchVolumeStatus *Volumestatus,
148 int RXAFS_SetVolumeStatus (struct rx_connection *,
150 struct AFSStoreVolumeStatus *Volumestatus,
155 int RXAFS_GetRootVolume (struct rx_connection *,
158 int RXAFS_CheckToken (struct rx_connection *,
160 struct AFSOpaque *token);
162 int RXAFS_GetTime (struct rx_connection *,
164 afs_uint32 *USeconds);
166 int RXAFS_BulkStatus (struct rx_connection *,
167 struct AFSCBFids *FidsArray,
168 struct AFSBulkStats *StatArray,
169 struct AFSCBs *CBArray,
170 struct AFSVolSync *Sync);
172 int RXAFS_SetLock (struct rx_connection *,
175 struct AFSVolSync *Sync);
177 int RXAFS_ExtendLock (struct rx_connection *,
179 struct AFSVolSync *Sync);
181 int RXAFS_ReleaseLock (struct rx_connection *,
183 struct AFSVolSync *Sync);
185 /* This interface is to supported the AFS/DFS Protocol Translator */
186 int RXAFS_Lookup (struct rx_connection *,
187 struct AFSFid *DirFid,
189 struct AFSFid *OutFid,
190 struct AFSFetchStatus *OutFidStatus,
191 struct AFSFetchStatus *OutDirStatus,
192 struct AFSCallBack *CallBack,
193 struct AFSVolSync *Sync);
195 /* common flags to many procedures */
196 #define CM_FLAG_CREATE 1 /* create entry */
197 #define CM_FLAG_CASEFOLD 2 /* fold case in namei, lookup, etc. */
198 #define CM_FLAG_EXCLUSIVE 4 /* create exclusive */
199 #define CM_FLAG_FOLLOW 8 /* follow symlinks, even at the end (namei) */
200 #define CM_FLAG_8DOT3 0x10 /* restrict to 8.3 name */
201 #define CM_FLAG_NOMOUNTCHASE 0x20 /* don't follow mount points */
202 #define CM_FLAG_DIRSEARCH 0x40 /* for directory search */
203 #define CM_FLAG_CHECKPATH 0x80 /* Path instead of File */
206 #define CM_ERROR_BASE 0x66543200
207 #define CM_ERROR_NOSUCHCELL (CM_ERROR_BASE+0)
208 #define CM_ERROR_NOSUCHVOLUME (CM_ERROR_BASE+1)
209 #define CM_ERROR_TIMEDOUT (CM_ERROR_BASE+2)
210 #define CM_ERROR_RETRY (CM_ERROR_BASE+3)
211 #define CM_ERROR_NOACCESS (CM_ERROR_BASE+4)
212 #define CM_ERROR_NOSUCHFILE (CM_ERROR_BASE+5)
213 #define CM_ERROR_STOPNOW (CM_ERROR_BASE+6)
214 #define CM_ERROR_TOOBIG (CM_ERROR_BASE+7)
215 #define CM_ERROR_INVAL (CM_ERROR_BASE+8)
216 #define CM_ERROR_BADFD (CM_ERROR_BASE+9)
217 #define CM_ERROR_BADFDOP (CM_ERROR_BASE+10)
218 #define CM_ERROR_EXISTS (CM_ERROR_BASE+11)
219 #define CM_ERROR_CROSSDEVLINK (CM_ERROR_BASE+12)
220 #define CM_ERROR_BADOP (CM_ERROR_BASE+13)
221 #define CM_ERROR_BADSMB (CM_ERROR_BASE+32)
222 /* CM_ERROR_BADPASSWORD used to be here */
223 #define CM_ERROR_NOTDIR (CM_ERROR_BASE+15)
224 #define CM_ERROR_ISDIR (CM_ERROR_BASE+16)
225 #define CM_ERROR_READONLY (CM_ERROR_BASE+17)
226 #define CM_ERROR_WOULDBLOCK (CM_ERROR_BASE+18)
227 #define CM_ERROR_QUOTA (CM_ERROR_BASE+19)
228 #define CM_ERROR_SPACE (CM_ERROR_BASE+20)
229 #define CM_ERROR_BADSHARENAME (CM_ERROR_BASE+21)
230 #define CM_ERROR_BADTID (CM_ERROR_BASE+22)
231 #define CM_ERROR_UNKNOWN (CM_ERROR_BASE+23)
232 #define CM_ERROR_NOMORETOKENS (CM_ERROR_BASE+24)
233 #define CM_ERROR_NOTEMPTY (CM_ERROR_BASE+25)
234 #define CM_ERROR_USESTD (CM_ERROR_BASE+26)
235 #define CM_ERROR_REMOTECONN (CM_ERROR_BASE+27)
236 #define CM_ERROR_ATSYS (CM_ERROR_BASE+28)
237 #define CM_ERROR_NOSUCHPATH (CM_ERROR_BASE+29)
239 #define CM_ERROR_CLOCKSKEW (CM_ERROR_BASE+31)
241 #define CM_ERROR_ALLBUSY (CM_ERROR_BASE+33)
242 #define CM_ERROR_NOFILES (CM_ERROR_BASE+34)
243 #define CM_ERROR_PARTIALWRITE (CM_ERROR_BASE+35)
244 #define CM_ERROR_NOIPC (CM_ERROR_BASE+36)
245 #define CM_ERROR_BADNTFILENAME (CM_ERROR_BASE+37)
246 #define CM_ERROR_BUFFERTOOSMALL (CM_ERROR_BASE+38)
247 #define CM_ERROR_RENAME_IDENTICAL (CM_ERROR_BASE+39)
249 #endif /* __CM_H_ENV__ */