Standardize License information
[openafs.git] / src / WINNT / afsd / cm.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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
8  */
9
10 #ifndef __CM_H_ENV__
11 #define __CM_H_ENV__ 1
12
13 #include <rx/rx.h>
14
15 /* from .xg file */
16 long VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
17 long VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
18 long VL_ProbeServer(struct rx_connection *);
19 long VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
20 long VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
21
22 /* from .xg file */
23 extern StartRXAFS_FetchData (struct rx_call *,
24         struct AFSFid *Fid,
25         afs_int32 Pos, 
26         afs_int32 Length);
27 extern EndRXAFS_FetchData (struct rx_call *,
28         struct AFSFetchStatus *OutStatus, 
29         struct AFSCallBack *CallBack, 
30         struct AFSVolSync *Sync);
31
32 extern RXAFS_FetchACL(struct rx_connection *,
33         struct AFSFid *Fid, 
34         struct AFSOpaque *AccessList, 
35         struct AFSFetchStatus *OutStatus, 
36         struct AFSVolSync *Sync);
37
38 extern RXAFS_FetchStatus (struct rx_connection *,
39         struct AFSFid *Fid, 
40         struct AFSFetchStatus *OutStatus, 
41         struct AFSCallBack *CallBack, 
42         struct AFSVolSync *Sync);
43
44 StartRXAFS_StoreData (struct rx_call *,
45         struct AFSFid *Fid, 
46         struct AFSStoreStatus *InStatus, 
47         afs_int32 Pos, 
48         afs_int32 Length, 
49         afs_int32 FileLength);
50
51 EndRXAFS_StoreData(struct rx_call *,
52         struct AFSFetchStatus *OutStatus, 
53         struct AFSVolSync *Sync);
54
55 RXAFS_StoreACL (struct rx_connection *,
56         struct AFSFid *Fid, 
57         struct AFSOpaque *AccessList,  
58         struct AFSFetchStatus *OutStatus, 
59         struct AFSVolSync *Sync);
60
61 RXAFS_StoreStatus(struct rx_connection *,
62         struct AFSFid *Fid, 
63         struct AFSStoreStatus *InStatus, 
64         struct AFSFetchStatus *OutStatus, 
65         struct AFSVolSync *Sync);
66
67 RXAFS_RemoveFile (struct rx_connection *,
68         struct AFSFid *DirFid, 
69         char *namep,
70         struct AFSFetchStatus *OutStatus, 
71         struct AFSVolSync *Sync);
72
73 RXAFS_CreateFile (struct rx_connection *,
74         struct AFSFid *DirFid, 
75         char *Name,
76         struct AFSStoreStatus *InStatus, 
77         struct AFSFid *OutFid, 
78         struct AFSFetchStatus *OutFidStatus, 
79         struct AFSFetchStatus *OutDirStatus, 
80         struct AFSCallBack *CallBack, 
81         struct AFSVolSync *Sync);
82
83 RXAFS_Rename (struct rx_connection *,
84         struct AFSFid *OldDirFid, 
85         char *OldName,
86         struct AFSFid *NewDirFid, 
87         char *NewName,
88         struct AFSFetchStatus *OutOldDirStatus, 
89         struct AFSFetchStatus *OutNewDirStatus, 
90         struct AFSVolSync *Sync);
91
92 RXAFS_Symlink (struct rx_connection *,
93         struct AFSFid *DirFid, 
94         char *name,
95         char *LinkContents,
96         struct AFSStoreStatus *InStatus,
97         struct AFSFid *OutFid, 
98         struct AFSFetchStatus *OutFidStatus, 
99         struct AFSFetchStatus *OutDirStatus, 
100         struct AFSVolSync *Sync);
101
102 RXAFS_Link (struct rx_connection *,
103         struct AFSFid *DirFid, 
104         char *Name,
105         struct AFSFid *ExistingFid, 
106         struct AFSFetchStatus *OutFidStatus, 
107         struct AFSFetchStatus *OutDirStatus, 
108         struct AFSVolSync *Sync);
109
110 RXAFS_MakeDir (struct rx_connection *,
111         struct AFSFid *DirFid, 
112         char *name,
113         struct AFSStoreStatus *InStatus, 
114         struct AFSFid *OutFid, 
115         struct AFSFetchStatus *OutFidStatus, 
116         struct AFSFetchStatus *OutDirStatus, 
117         struct AFSCallBack *CallBack, 
118         struct AFSVolSync *Sync);
119
120 RXAFS_RemoveDir (struct rx_connection *,
121         struct AFSFid *DirFid, 
122         char *Name,
123         struct AFSFetchStatus *OutDirStatus, 
124         struct AFSVolSync *Sync);
125
126 RXAFS_GetStatistics (struct rx_connection *,
127         struct ViceStatistics *Statistics);
128
129 RXAFS_GiveUpCallBacks (struct rx_connection *,
130         struct AFSCBFids *Fids_Array,
131         struct AFSCBs *CallBacks_Array);
132
133 RXAFS_GetVolumeInfo (struct rx_connection *,
134         char *VolumeName,
135         struct VolumeInfo *Volumeinfo);
136
137 RXAFS_GetVolumeStatus (struct rx_connection *,
138         afs_int32 Volumeid, 
139         struct AFSFetchVolumeStatus *Volumestatus, 
140         char **name,
141         char **offlineMsg,
142         char **motd);
143
144 RXAFS_SetVolumeStatus (struct rx_connection *,
145         afs_int32 Volumeid, 
146         struct AFSStoreVolumeStatus *Volumestatus,
147         char *name,
148         char *olm,
149         char *motd);
150
151 RXAFS_GetRootVolume (struct rx_connection *,
152         char **VolumeName);
153
154 RXAFS_CheckToken (struct rx_connection *,
155         afs_int32 ViceId,
156         struct AFSOpaque *token);
157
158 RXAFS_GetTime (struct rx_connection *,
159         afs_uint32 *Seconds, 
160         afs_uint32 *USeconds);
161
162 RXAFS_BulkStatus (struct rx_connection *,
163         struct AFSCBFids *FidsArray,
164         struct AFSBulkStats *StatArray,
165         struct AFSCBs *CBArray,
166         struct AFSVolSync *Sync);
167
168 RXAFS_SetLock (struct rx_connection *,
169         struct AFSFid *Fid, 
170         int Type, 
171         struct AFSVolSync *Sync);
172
173 RXAFS_ExtendLock (struct rx_connection *,
174         struct AFSFid *Fid, 
175         struct AFSVolSync *Sync);
176
177 RXAFS_ReleaseLock (struct rx_connection *,
178         struct AFSFid *Fid, 
179         struct AFSVolSync *Sync);
180
181 /* This interface is to supported the AFS/DFS Protocol Translator */
182 RXAFS_Lookup (struct rx_connection *,
183         struct AFSFid *DirFid,
184         char *Name,
185         struct AFSFid *OutFid,
186         struct AFSFetchStatus *OutFidStatus,
187         struct AFSFetchStatus *OutDirStatus,
188         struct AFSCallBack *CallBack,
189         struct AFSVolSync *Sync);
190
191 /* common flags to many procedures */
192 #define CM_FLAG_CREATE          1               /* create entry */
193 #define CM_FLAG_CASEFOLD        2               /* fold case in namei, lookup, etc. */
194 #define CM_FLAG_EXCLUSIVE       4               /* create exclusive */
195 #define CM_FLAG_FOLLOW          8               /* follow symlinks, even at the end (namei) */
196 #define CM_FLAG_8DOT3           0x10            /* restrict to 8.3 name */
197 #define CM_FLAG_NOMOUNTCHASE    0x20            /* don't follow mount points */
198 #define CM_FLAG_DIRSEARCH       0x40            /* for directory search */
199 #define CM_FLAG_CHECKPATH       0x80            /* Path instead of File */
200
201 /* error codes */
202 #define CM_ERROR_BASE                   0x66543200
203 #define CM_ERROR_NOSUCHCELL             (CM_ERROR_BASE+0)
204 #define CM_ERROR_NOSUCHVOLUME           (CM_ERROR_BASE+1)
205 #define CM_ERROR_TIMEDOUT               (CM_ERROR_BASE+2)
206 #define CM_ERROR_RETRY                  (CM_ERROR_BASE+3)
207 #define CM_ERROR_NOACCESS               (CM_ERROR_BASE+4)
208 #define CM_ERROR_NOSUCHFILE             (CM_ERROR_BASE+5)
209 #define CM_ERROR_STOPNOW                (CM_ERROR_BASE+6)
210 #define CM_ERROR_TOOBIG                 (CM_ERROR_BASE+7)
211 #define CM_ERROR_INVAL                  (CM_ERROR_BASE+8)
212 #define CM_ERROR_BADFD                  (CM_ERROR_BASE+9)
213 #define CM_ERROR_BADFDOP                (CM_ERROR_BASE+10)
214 #define CM_ERROR_EXISTS                 (CM_ERROR_BASE+11)
215 #define CM_ERROR_CROSSDEVLINK           (CM_ERROR_BASE+12)
216 #define CM_ERROR_BADOP                  (CM_ERROR_BASE+13)
217 #define CM_ERROR_BADSMB                 (CM_ERROR_BASE+32)
218 /* CM_ERROR_BADPASSWORD used to be here */
219 #define CM_ERROR_NOTDIR                 (CM_ERROR_BASE+15)
220 #define CM_ERROR_ISDIR                  (CM_ERROR_BASE+16)
221 #define CM_ERROR_READONLY               (CM_ERROR_BASE+17)
222 #define CM_ERROR_WOULDBLOCK             (CM_ERROR_BASE+18)
223 #define CM_ERROR_QUOTA                  (CM_ERROR_BASE+19)
224 #define CM_ERROR_SPACE                  (CM_ERROR_BASE+20)
225 #define CM_ERROR_BADSHARENAME           (CM_ERROR_BASE+21)
226 #define CM_ERROR_BADTID                 (CM_ERROR_BASE+22)
227 #define CM_ERROR_UNKNOWN                (CM_ERROR_BASE+23)
228 #define CM_ERROR_NOMORETOKENS           (CM_ERROR_BASE+24)
229 #define CM_ERROR_NOTEMPTY               (CM_ERROR_BASE+25)
230 #define CM_ERROR_USESTD                 (CM_ERROR_BASE+26)
231 #define CM_ERROR_REMOTECONN             (CM_ERROR_BASE+27)
232 #define CM_ERROR_ATSYS                  (CM_ERROR_BASE+28)
233 #define CM_ERROR_NOSUCHPATH             (CM_ERROR_BASE+29)
234
235 #define CM_ERROR_CLOCKSKEW              (CM_ERROR_BASE+31)
236
237 #define CM_ERROR_ALLBUSY                (CM_ERROR_BASE+33)
238 #define CM_ERROR_NOFILES                (CM_ERROR_BASE+34)
239 #define CM_ERROR_PARTIALWRITE           (CM_ERROR_BASE+35)
240 #define CM_ERROR_NOIPC                  (CM_ERROR_BASE+36)
241 #define CM_ERROR_BADNTFILENAME          (CM_ERROR_BASE+37)
242 #define CM_ERROR_BUFFERTOOSMALL         (CM_ERROR_BASE+38)
243
244 #endif /*  __CM_H_ENV__ */