windows-volume-status-plugin-20070705
[openafs.git] / src / WINNT / afsd / cm.h
index 8d2043b..379d2a3 100644 (file)
 #ifndef __CM_H_ENV__
 #define __CM_H_ENV__ 1
 
+#ifndef AFS_PTHREAD_ENV
+#define AFS_PTHREAD_ENV 1
+#endif
 #include <rx/rx.h>
 
 /* from .xg file */
-long VL_GetEntryByID(struct rx_connection *, long, long, struct vldbentry *);
-long VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
-long VL_ProbeServer(struct rx_connection *);
-long VL_GetEntryBYIDN(struct rx_connection *, long, long, struct nvldbentry *);
-long VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
+/* FIXME: these were "long" but Windows NT wants "int" */
+int VL_GetEntryByID(struct rx_connection *, afs_int32, afs_int32, struct vldbentry *);
+int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
+int VL_ProbeServer(struct rx_connection *);
+int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbentry *);
+int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
 
 /* from .xg file */
-extern StartRXAFS_FetchData (struct rx_call *,
+int StartRXAFS_FetchData (struct rx_call *,
        struct AFSFid *Fid,
        afs_int32 Pos, 
        afs_int32 Length);
-extern EndRXAFS_FetchData (struct rx_call *,
+int EndRXAFS_FetchData (struct rx_call *,
        struct AFSFetchStatus *OutStatus, 
        struct AFSCallBack *CallBack, 
        struct AFSVolSync *Sync);
 
-extern RXAFS_FetchACL(struct rx_connection *,
+int RXAFS_FetchACL(struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSOpaque *AccessList, 
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-extern RXAFS_FetchStatus (struct rx_connection *,
+int RXAFS_FetchStatus (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSFetchStatus *OutStatus, 
        struct AFSCallBack *CallBack, 
        struct AFSVolSync *Sync);
 
-StartRXAFS_StoreData (struct rx_call *,
+int StartRXAFS_StoreData (struct rx_call *,
        struct AFSFid *Fid, 
        struct AFSStoreStatus *InStatus, 
-       afs_int32 Pos, 
-       afs_int32 Length, 
-       afs_int32 FileLength);
+       afs_uint32 Pos, 
+       afs_uint32 Length, 
+       afs_uint32 FileLength);
 
-EndRXAFS_StoreData(struct rx_call *,
+int EndRXAFS_StoreData(struct rx_call *,
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_StoreACL (struct rx_connection *,
+int StartRXAFS_FetchData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       afs_int64 Pos,
+       afs_int64 Length);
+
+int EndRXAFS_FetchData64(struct rx_call *z_call,
+        struct AFSFetchStatus * OutStatus,
+       struct AFSCallBack * CallBack,
+       struct AFSVolSync * Sync);
+
+afs_int32 SRXAFS_FetchData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       afs_int64 Pos,
+       afs_int64 Length,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSCallBack * CallBack,
+       struct AFSVolSync * Sync);
+
+int StartRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       struct AFSStoreStatus * InStatus,
+       afs_uint64 Pos,
+       afs_uint64 Length,
+       afs_uint64 FileLength);
+
+int EndRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSVolSync * Sync);
+
+afs_int32 SRXAFS_StoreData64(struct rx_call *z_call,
+       struct AFSFid * Fid,
+       struct AFSStoreStatus * InStatus,
+       afs_uint64 Pos,
+       afs_uint64 Length,
+       afs_uint64 FileLength,
+       struct AFSFetchStatus * OutStatus,
+       struct AFSVolSync * Sync);
+
+int RXAFS_StoreACL (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSOpaque *AccessList,  
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_StoreStatus(struct rx_connection *,
+int RXAFS_StoreStatus(struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSStoreStatus *InStatus, 
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_RemoveFile (struct rx_connection *,
+int RXAFS_RemoveFile (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *namep,
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_CreateFile (struct rx_connection *,
+int RXAFS_CreateFile (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *Name,
        struct AFSStoreStatus *InStatus, 
@@ -80,7 +122,7 @@ RXAFS_CreateFile (struct rx_connection *,
        struct AFSCallBack *CallBack, 
        struct AFSVolSync *Sync);
 
-RXAFS_Rename (struct rx_connection *,
+int RXAFS_Rename (struct rx_connection *,
        struct AFSFid *OldDirFid, 
        char *OldName,
        struct AFSFid *NewDirFid, 
@@ -89,7 +131,7 @@ RXAFS_Rename (struct rx_connection *,
        struct AFSFetchStatus *OutNewDirStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_Symlink (struct rx_connection *,
+int RXAFS_Symlink (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *name,
        char *LinkContents,
@@ -99,7 +141,7 @@ RXAFS_Symlink (struct rx_connection *,
        struct AFSFetchStatus *OutDirStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_Link (struct rx_connection *,
+int RXAFS_Link (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *Name,
        struct AFSFid *ExistingFid, 
@@ -107,7 +149,7 @@ RXAFS_Link (struct rx_connection *,
        struct AFSFetchStatus *OutDirStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_MakeDir (struct rx_connection *,
+int RXAFS_MakeDir (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *name,
        struct AFSStoreStatus *InStatus, 
@@ -117,69 +159,69 @@ RXAFS_MakeDir (struct rx_connection *,
        struct AFSCallBack *CallBack, 
        struct AFSVolSync *Sync);
 
-RXAFS_RemoveDir (struct rx_connection *,
+int RXAFS_RemoveDir (struct rx_connection *,
        struct AFSFid *DirFid, 
        char *Name,
        struct AFSFetchStatus *OutDirStatus, 
        struct AFSVolSync *Sync);
 
-RXAFS_GetStatistics (struct rx_connection *,
+int RXAFS_GetStatistics (struct rx_connection *,
        struct ViceStatistics *Statistics);
 
-RXAFS_GiveUpCallBacks (struct rx_connection *,
+int RXAFS_GiveUpCallBacks (struct rx_connection *,
        struct AFSCBFids *Fids_Array,
        struct AFSCBs *CallBacks_Array);
 
-RXAFS_GetVolumeInfo (struct rx_connection *,
+int RXAFS_GetVolumeInfo (struct rx_connection *,
        char *VolumeName,
        struct VolumeInfo *Volumeinfo);
 
-RXAFS_GetVolumeStatus (struct rx_connection *,
+int RXAFS_GetVolumeStatus (struct rx_connection *,
        afs_int32 Volumeid, 
        struct AFSFetchVolumeStatus *Volumestatus, 
        char **name,
         char **offlineMsg,
         char **motd);
 
-RXAFS_SetVolumeStatus (struct rx_connection *,
+int RXAFS_SetVolumeStatus (struct rx_connection *,
        afs_int32 Volumeid, 
        struct AFSStoreVolumeStatus *Volumestatus,
        char *name,
        char *olm,
        char *motd);
 
-RXAFS_GetRootVolume (struct rx_connection *,
+int RXAFS_GetRootVolume (struct rx_connection *,
        char **VolumeName);
 
-RXAFS_CheckToken (struct rx_connection *,
+int RXAFS_CheckToken (struct rx_connection *,
        afs_int32 ViceId,
        struct AFSOpaque *token);
 
-RXAFS_GetTime (struct rx_connection *,
+int RXAFS_GetTime (struct rx_connection *,
        afs_uint32 *Seconds, 
        afs_uint32 *USeconds);
 
-RXAFS_BulkStatus (struct rx_connection *,
+int RXAFS_BulkStatus (struct rx_connection *,
        struct AFSCBFids *FidsArray,
        struct AFSBulkStats *StatArray,
        struct AFSCBs *CBArray,
        struct AFSVolSync *Sync);
 
-RXAFS_SetLock (struct rx_connection *,
+int RXAFS_SetLock (struct rx_connection *,
        struct AFSFid *Fid, 
        int Type, 
        struct AFSVolSync *Sync);
 
-RXAFS_ExtendLock (struct rx_connection *,
+int RXAFS_ExtendLock (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSVolSync *Sync);
 
-RXAFS_ReleaseLock (struct rx_connection *,
+int RXAFS_ReleaseLock (struct rx_connection *,
        struct AFSFid *Fid, 
        struct AFSVolSync *Sync);
 
 /* This interface is to supported the AFS/DFS Protocol Translator */
-RXAFS_Lookup (struct rx_connection *,
+int RXAFS_Lookup (struct rx_connection *,
        struct AFSFid *DirFid,
        char *Name,
        struct AFSFid *OutFid,
@@ -188,6 +230,8 @@ RXAFS_Lookup (struct rx_connection *,
        struct AFSCallBack *CallBack,
        struct AFSVolSync *Sync);
 
+#define CM_DEFAULT_CALLBACKPORT         7001
+
 /* common flags to many procedures */
 #define CM_FLAG_CREATE         1               /* create entry */
 #define CM_FLAG_CASEFOLD       2               /* fold case in namei, lookup, etc. */
@@ -214,8 +258,7 @@ RXAFS_Lookup (struct rx_connection *,
 #define CM_ERROR_EXISTS                        (CM_ERROR_BASE+11)
 #define CM_ERROR_CROSSDEVLINK          (CM_ERROR_BASE+12)
 #define CM_ERROR_BADOP                 (CM_ERROR_BASE+13)
-#define CM_ERROR_BADSMB                        (CM_ERROR_BASE+32)
-/* CM_ERROR_BADPASSWORD used to be here */
+#define CM_ERROR_BADPASSWORD            (CM_ERROR_BASE+14)
 #define CM_ERROR_NOTDIR                        (CM_ERROR_BASE+15)
 #define CM_ERROR_ISDIR                 (CM_ERROR_BASE+16)
 #define CM_ERROR_READONLY              (CM_ERROR_BASE+17)
@@ -231,14 +274,32 @@ RXAFS_Lookup (struct rx_connection *,
 #define CM_ERROR_REMOTECONN            (CM_ERROR_BASE+27)
 #define CM_ERROR_ATSYS                 (CM_ERROR_BASE+28)
 #define CM_ERROR_NOSUCHPATH            (CM_ERROR_BASE+29)
-
 #define CM_ERROR_CLOCKSKEW             (CM_ERROR_BASE+31)
-
+#define CM_ERROR_BADSMB                        (CM_ERROR_BASE+32)
 #define CM_ERROR_ALLBUSY               (CM_ERROR_BASE+33)
 #define CM_ERROR_NOFILES               (CM_ERROR_BASE+34)
 #define CM_ERROR_PARTIALWRITE          (CM_ERROR_BASE+35)
 #define CM_ERROR_NOIPC                 (CM_ERROR_BASE+36)
 #define CM_ERROR_BADNTFILENAME         (CM_ERROR_BASE+37)
 #define CM_ERROR_BUFFERTOOSMALL                (CM_ERROR_BASE+38)
-
+#define CM_ERROR_RENAME_IDENTICAL      (CM_ERROR_BASE+39)
+#define CM_ERROR_ALLOFFLINE             (CM_ERROR_BASE+40)
+#define CM_ERROR_AMBIGUOUS_FILENAME     (CM_ERROR_BASE+41)
+#define CM_ERROR_BADLOGONTYPE          (CM_ERROR_BASE+42)
+#define CM_ERROR_GSSCONTINUE            (CM_ERROR_BASE+43)
+#define CM_ERROR_TIDIPC                 (CM_ERROR_BASE+44)
+#define CM_ERROR_TOO_MANY_SYMLINKS      (CM_ERROR_BASE+45)
+#define CM_ERROR_PATH_NOT_COVERED       (CM_ERROR_BASE+46)
+#define CM_ERROR_LOCK_CONFLICT          (CM_ERROR_BASE+47)
+#define CM_ERROR_SHARING_VIOLATION      (CM_ERROR_BASE+48)
+#define CM_ERROR_ALLDOWN                (CM_ERROR_BASE+49)
+#define CM_ERROR_TOOFEWBUFS            (CM_ERROR_BASE+50)
+#define CM_ERROR_TOOMANYBUFS           (CM_ERROR_BASE+51)
+#define CM_ERROR_BAD_LEVEL             (CM_ERROR_BASE+52)
+#define CM_ERROR_NOT_A_DFSLINK          (CM_ERROR_BASE+53)
+
+/* Used by cm_FollowMountPoint and cm_GetVolumeByName */
+#define RWVOL  0
+#define ROVOL  1
+#define BACKVOL        2
 #endif /*  __CM_H_ENV__ */