DEVEL15-windows-freelance-improved-dfs-handling-20080127
[openafs.git] / src / WINNT / afsd / cm.h
index 28aa545..c17d987 100644 (file)
@@ -10,6 +10,9 @@
 #ifndef __CM_H_ENV__
 #define __CM_H_ENV__ 1
 
+#ifndef AFS_PTHREAD_ENV
+#define AFS_PTHREAD_ENV 1
+#endif
 #include <rx/rx.h>
 #ifdef DJGPP      /* we need these for vldbentry decl., etc. */
 #include <afs/vldbint.h>
@@ -25,22 +28,22 @@ int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbe
 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, 
@@ -57,6 +60,44 @@ int EndRXAFS_StoreData(struct rx_call *,
        struct AFSFetchStatus *OutStatus, 
        struct AFSVolSync *Sync);
 
+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,  
@@ -193,6 +234,8 @@ int 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. */
@@ -202,6 +245,8 @@ int RXAFS_Lookup (struct rx_connection *,
 #define CM_FLAG_NOMOUNTCHASE   0x20            /* don't follow mount points */
 #define CM_FLAG_DIRSEARCH      0x40            /* for directory search */
 #define CM_FLAG_CHECKPATH      0x80            /* Path instead of File */
+#define CM_FLAG_NOPROBE         0x100           /* For use with cm_GetCellxxx - do not probe server status */
+#define CM_FLAG_DFS_REFERRAL    0x200           /* The request is a DFS Referral - the last char of the lookup name may be missing */
 
 /* error codes */
 #define CM_ERROR_BASE                  0x66543200
@@ -254,4 +299,16 @@ int RXAFS_Lookup (struct rx_connection *,
 #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)
+#define CM_ERROR_INEXACT_MATCH          (CM_ERROR_BASE+54)
+#define CM_ERROR_BPLUS_NOMATCH          (CM_ERROR_BASE+55)
+#define CM_ERROR_EAS_NOT_SUPPORTED      (CM_ERROR_BASE+56)
+
+/* Used by cm_FollowMountPoint and cm_GetVolumeByName */
+#define RWVOL  0
+#define ROVOL  1
+#define BACKVOL        2
 #endif /*  __CM_H_ENV__ */