Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / uss / uss_fs.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 /*
11 * Interface to the AFS system operations exported by the
12 * Cache Manager.
13 */
14
15 #ifndef _USS_FS_H_
16 #define _USS_FS_H_ 1
17
18 /*
19 * --------------------- Exported definitions ---------------------
20 */
21 #define USS_FS_MAX_SIZE 2048
22
23
24 /*
25 * ---------------------- Exported variables ----------------------
26 */
27 extern char *uss_fs_InBuff; /*Cache Manager input buff */
28 extern char *uss_fs_OutBuff; /*Cache Manager output buff */
29
30
31 /*
32 * ------------------------ Exported functions -----------------------
33 */
34 extern afs_int32 uss_fs_GetACL(char *a_dirPath, char *a_aclBuff,
35 afs_int32 a_aclBuffBytes);
36 /*
37 * Summary:
38 * Given the pathname for a directory, return its ACL.
39 *
40 * Args:
41 * char *a_dirPath : Directory pathname.
42 * char *a_aclBuff : Ptr to the buffer in which to put
43 * the directory's ACL.
44 * afs_int32 a_aclBuffBytes : Size of the above.
45 *
46 * Returns:
47 * 0 if everything went well,
48 * -1 otherwise, with errno set to the error.
49 */
50
51 extern afs_int32 uss_fs_SetACL(char *a_dirPath, char *a_aclBuff,
52 afs_int32 a_aclBuffBytes);
53 /*
54 * Summary:
55 * Set the ACL on the specified directory.
56 *
57 * Args:
58 * char *a_dirpath : Directory pathname.
59 * char *a_aclBuff : Ptr to the buffer from which to get
60 * the directory's ACL.
61 * afs_int32 a_aclBuffBytes : Size of the above.
62 *
63 * Returns:
64 * 0 if everything went well,
65 * -1 otherwise, with errno set to the error.
66 */
67
68 extern afs_int32 uss_fs_GetVolStat(char *a_mountpoint, char *a_volStatBuff,
69 afs_int32 a_volStatBuffBytes);
70 /*
71 * Summary:
72 * Given the pathname of an AFS mountpoint, find out what you
73 * can about the volume mounted there.
74 *
75 * Args:
76 * char *a_mountpoint : Mountpoint pathname.
77 * char *a_volStatBuff : Buffer to hold the status.
78 * afs_int32 a_volStatBuffBytes : Length of above.
79 *
80 * Returns:
81 * 0 if everything went well,
82 * -1 otherwise, with errno set to the error.
83 */
84
85 extern afs_int32 uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff,
86 afs_int32 a_volStatBuffBytes);
87 /*
88 * Summary:
89 * Given the pathname of an AFS mountpoint, set the status info
90 * for the volume mounted there.
91 *
92 * Args:
93 * char *a_mountpoint : Mountpoint pathname.
94 * char *a_volStatBuff : Buffer holding the status.
95 * afs_int32 a_volStatBuffBytes : Length of above.
96 *
97 * Returns:
98 * 0 if everything went well,
99 * -1 otherwise, with errno set to the error.
100 */
101
102 extern afs_int32 uss_fs_CkBackups(void);
103 /*
104 * Summary:
105 * Make sure the CacheManager doesn't have any stale volume
106 * mappings.
107 *
108 * Args:
109 * None.
110 *
111 * Returns:
112 * 0 if everything went well,
113 * -1 otherwise, with errno set to the error.
114 */
115
116 extern afs_int32 uss_fs_MkMountPoint(char *a_volname, char *a_cellname,
117 afs_int32 a_rw, char *a_mountpoint);
118 /*
119 * Summary: *NEW*
120 * Given the name of the volume, the cell it lives in,
121 * whether we want the read/write version mounted, and
122 * the pathname for the desired mountpoint, go ahead and
123 * create it.
124 *
125 * Args:
126 * char *a_volname : Name of volume to mount.
127 * char *a_cellname : Name of cell where volume lives.
128 * afs_int32 a_rw : Read/write mount?
129 * char *a_mountpoint : Name desired for the mountpoint.
130 *
131 * Returns:
132 * 0 if everything went well,
133 * -1 otherwise, with errno set to the error.
134 */
135
136 extern afs_int32 uss_fs_RmMountPoint(char *a_mountpoint);
137 /*
138 * Summary:
139 * Delete the given mountpoint.
140 *
141 * Args:
142 * char *a_mountpoint : Name of the mountpoint to delete.
143 *
144 * Returns:
145 * 0 if everything went well,
146 * -1 otherwise, with errno set to the error.
147 */
148
149 extern int uss_fs_UnlogToken(char *celln);
150
151 #endif /* _USS_FS_H_ */