OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/afs/UKERNEL/afs_usrops.h
00001 /*
00002  * Copyright 2000, International Business Machines Corporation and others.
00003  * All Rights Reserved.
00004  *
00005  * This software has been released under the terms of the IBM Public
00006  * License.  For details, see the LICENSE file in the top-level source
00007  * directory or online at http://www.openafs.org/dl/license10.html
00008  */
00009 
00010 #ifndef __AFS_USROPS_H__
00011 #define __AFS_USROPS_H__ 1
00012 
00013 #ifdef KERNEL
00014 # include "afs/sysincludes.h"
00015 # include "afsincludes.h"
00016 #endif /* KERNEL */
00017 
00018 /*
00019  * Macros to manipulate doubly linked lists
00020  */
00021 #define DLL_INIT_LIST(_HEAD, _TAIL) \
00022     { _HEAD = NULL ; _TAIL = NULL; }
00023 
00024 #define DLL_INSERT_TAIL(_ELEM, _HEAD, _TAIL, _NEXT, _PREV) \
00025 { \
00026     if (_HEAD == NULL) { \
00027         _ELEM->_NEXT = NULL; \
00028         _ELEM->_PREV = NULL; \
00029         _HEAD = _ELEM; \
00030         _TAIL = _ELEM; \
00031     } else { \
00032         _ELEM->_NEXT = NULL; \
00033         _ELEM->_PREV = _TAIL; \
00034         _TAIL->_NEXT = _ELEM; \
00035         _TAIL = _ELEM; \
00036     } \
00037 }
00038 
00039 #define DLL_DELETE(_ELEM, _HEAD, _TAIL, _NEXT, _PREV) \
00040 { \
00041     if (_ELEM->_NEXT == NULL) { \
00042         _TAIL = _ELEM->_PREV; \
00043     } else { \
00044         _ELEM->_NEXT->_PREV = _ELEM->_PREV; \
00045     } \
00046     if (_ELEM->_PREV == NULL) { \
00047         _HEAD = _ELEM->_NEXT; \
00048     } else { \
00049         _ELEM->_PREV->_NEXT = _ELEM->_NEXT; \
00050     } \
00051     _ELEM->_NEXT = NULL; \
00052     _ELEM->_PREV = NULL; \
00053 }
00054 
00055 extern char *uafs_mountDir;
00056 
00057 extern struct afsconf_dir *afs_cdir;
00058 extern char afs_LclCellName[64];
00059 
00060 extern int afs_osicred_Initialized;
00061 
00062 extern void uafs_InitClient(void);
00063 extern void uafs_InitThread(void);
00064 extern int uafs_Setup(const char *mount);
00065 extern int uafs_ParseArgs(int argc, char **argv);
00066 extern int uafs_Run(void);
00067 extern const char* uafs_MountDir(void);
00068 extern void uafs_RxServerProc(void);
00069 extern int uafs_LookupLink(struct usr_vnode *vp, struct usr_vnode *parentP,
00070                            struct usr_vnode **vpp);
00071 extern int uafs_LookupName(char *path, struct usr_vnode *parentP,
00072                            struct usr_vnode **vpp, int follow,
00073                            int no_eval_mtpt);
00074 extern int uafs_LookupParent(char *path, struct usr_vnode **vpp);
00075 extern int uafs_GetAttr(struct usr_vnode *vp, struct stat *stats);
00076 
00077 extern int uafs_SetTokens(char *buf, int len);
00078 extern int uafs_SetTokens_r(char *buf, int len);
00079 extern int uafs_mkdir(char *path, int mode);
00080 extern int uafs_mkdir_r(char *path, int mode);
00081 extern int uafs_chdir(char *path);
00082 extern int uafs_chdir_r(char *path);
00083 extern int uafs_open(char *path, int flags, int mode);
00084 extern int uafs_open_r(char *path, int flags, int mode);
00085 extern int uafs_creat(char *path, int mode);
00086 extern int uafs_creat_r(char *path, int mode);
00087 extern int uafs_write(int fd, char *buf, int len);
00088 extern int uafs_pwrite(int fd, char *buf, int len, off_t offset);
00089 extern int uafs_pwrite_r(int fd, char *buf, int len, off_t offset);
00090 extern int uafs_read(int fd, char *buf, int len);
00091 extern int uafs_pread(int fd, char *buf, int leni, off_t offset);
00092 extern int uafs_pread_r(int fd, char *buf, int len, off_t offset);
00093 extern int uafs_pread_nocache(int fd, char *buf, int leni, off_t offset);
00094 extern int uafs_pread_nocache_r(int fd, char *buf, int len, off_t offset);
00095 extern int uafs_fsync(int fd);
00096 extern int uafs_fsync_r(int fd);
00097 extern int uafs_close(int fd);
00098 extern int uafs_close_r(int fd);
00099 extern int uafs_stat(char *path, struct stat *stats);
00100 extern int uafs_stat_r(char *path, struct stat *stats);
00101 extern int uafs_lstat(char *path, struct stat *stats);
00102 extern int uafs_lstat_r(char *path, struct stat *stats);
00103 extern int uafs_fstat(int fd, struct stat *stats);
00104 extern int uafs_fstat_r(int fd, struct stat *stats);
00105 extern int uafs_truncate(char *path, int len);
00106 extern int uafs_truncate_r(char *path, int len);
00107 extern int uafs_ftruncate(int fd, int len);
00108 extern int uafs_ftruncate_r(int fd, int len);
00109 extern int uafs_lseek(int fd, int offset, int whence);
00110 extern int uafs_lseek_r(int fd, int offset, int whence);
00111 extern int uafs_chmod(char *path, int mode);
00112 extern int uafs_chmod_r(char *path, int mode);
00113 extern int uafs_fchmod(int fd, int mode);
00114 extern int uafs_fchmod_r(int fd, int mode);
00115 extern int uafs_symlink(char *target, char *source);
00116 extern int uafs_symlink_r(char *target, char *source);
00117 extern int uafs_unlink(char *path);
00118 extern int uafs_unlink_r(char *path);
00119 extern int uafs_rmdir(char *path);
00120 extern int uafs_rmdir_r(char *path);
00121 extern int uafs_readlink(char *path, char *buf, int len);
00122 extern int uafs_readlink_r(char *path, char *buf, int len);
00123 extern int uafs_link(char *existing, char *newfile);
00124 extern int uafs_link_r(char *existing, char *newfile);
00125 extern int uafs_rename(char *old, char *newfile);
00126 extern int uafs_rename_r(char *old, char *newfile);
00127 extern int uafs_FlushFile(char *path);
00128 extern int uafs_FlushFile_r(char *path);
00129 extern usr_DIR *uafs_opendir(char *path);
00130 extern usr_DIR *uafs_opendir_r(char *path);
00131 extern struct usr_dirent *uafs_readdir(usr_DIR * dirp);
00132 extern struct usr_dirent *uafs_readdir_r(usr_DIR * dirp);
00133 extern int uafs_getdents(int fd, struct min_direct *buf, int len);
00134 extern int uafs_getdents_r(int fd, struct min_direct *buf, int len);
00135 extern int uafs_closedir(usr_DIR * dirp);
00136 extern int uafs_closedir_r(usr_DIR * dirp);
00137 extern void uafs_ThisCell(char *namep);
00138 extern void uafs_ThisCell_r(char *namep);
00139 extern int uafs_klog(char *user, char *cell, char *passwd, char **reason);
00140 extern int uafs_klog_r(char *user, char *cell, char *passwd, char **reason);
00141 extern int uafs_unlog(void);
00142 extern int uafs_unlog_r(void);
00143 extern void uafs_SetRxPort(int);
00144 extern char *uafs_afsPathName(char *);
00145 extern int uafs_RPCStatsEnableProc(void);
00146 extern int uafs_RPCStatsDisableProc(void);
00147 extern int uafs_RPCStatsEnablePeer(void);
00148 extern int uafs_RPCStatsDisablePeer(void);
00149 extern int uafs_IsRoot(char *path);
00150 extern int uafs_statmountpoint_r(char *path);
00151 extern int uafs_statvfs(struct statvfs *buf);
00152 extern void uafs_Shutdown(void);
00153 extern void uafs_mount(void);
00154 extern void uafs_setMountDir(const char *dir);
00155 extern int uafs_fork(int wait, void* (*cbf) (void *), void *rock);
00156 extern int uafs_access(char *path, int amode);
00157 
00158 #endif /* __AFS_USROPS_H__ */
 All Data Structures Files Functions Variables