libadmin-vsprocs-use-volint-prototyping-20020702
[openafs.git] / src / libadmin / vos / vsprocs.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 #include <stdio.h>
11 #include <sys/types.h>
12 #include <sys/stat.h>
13 #ifdef  AFS_AIX_ENV
14 #include <sys/statfs.h>
15 #endif
16 #ifdef AFS_NT40_ENV
17 #include <fcntl.h>
18 #include <winsock2.h>
19 #else
20 #include <sys/file.h>
21 #include <netinet/in.h>
22 #endif
23 #include <lock.h>
24 #include <afs/voldefs.h>
25 #include <rx/xdr.h>
26 #include <rx/rx.h>
27 #include <afs/vlserver.h>
28 #include <afs/nfs.h>
29 #include <afs/auth.h>
30 #include <afs/cellconfig.h>
31 #include <afs/keys.h>
32 #include <ubik.h>
33 #include <afs/afsint.h>
34 #include <afs/volser.h>
35 #include <afs/volint.h>
36 #include "../../volser/lockdata.h"
37 #include "../../vlserver/vlclient.h"
38 #include <afs/com_err.h>
39 #include <rx/rxkad.h>
40 #include <afs/kautils.h>
41 #include <afs/cmd.h>
42 #include <errno.h>
43 #include <afs/afs_Admin.h>
44 #include "../adminutil/afs_AdminInternal.h"
45
46 #define CLOCKSKEW   2                   /* not really skew, but resolution */
47
48 extern int ubik_Call();
49 extern int ubik_Call_New();
50
51
52 extern int UV_NukeVolume(
53   afs_cell_handle_p cellHandle,
54   struct rx_connection *server,
55   unsigned int partition,
56   unsigned int volumeId,
57   afs_status_p st
58 );
59
60 extern int UV_CreateVolume(
61   afs_cell_handle_p cellHandle,
62   struct rx_connection *server,
63   unsigned int partition,
64   const char *volumeName,
65   unsigned int quota,
66   unsigned int *volumeId,
67   afs_status_p st
68 );
69
70 extern int UV_DeleteVolume(
71   afs_cell_handle_p cellHandle,
72   struct rx_connection *server,
73   unsigned int partition,
74   unsigned int volumeId,
75   afs_status_p st
76 );
77
78 extern int UV_MoveVolume(
79   afs_cell_handle_p cellHandle,
80   afs_int32 afromvol,
81   afs_int32 afromserver,
82   afs_int32 afrompart,
83   afs_int32 atoserver,
84   afs_int32 atopart,
85   afs_status_p st
86 );
87
88 extern int UV_BackupVolume(
89   afs_cell_handle_p cellHandle,
90   afs_int32 aserver,
91   afs_int32 apart,
92   afs_int32 avolid,
93   afs_status_p st
94 );
95
96 extern int UV_ReleaseVolume(
97   afs_cell_handle_p cellHandle,
98   afs_int32 afromvol,
99   afs_int32 afromserver,
100   afs_int32 afrompart,
101   int forceflag,
102   afs_status_p st
103 );
104
105 extern int UV_DumpVolume(
106   afs_cell_handle_p cellHandle,
107   afs_int32 afromvol,
108   afs_int32 afromserver,
109   afs_int32 afrompart,
110   afs_int32 fromdate,
111   const char *filename,
112   afs_status_p st
113 );
114
115 extern int UV_RestoreVolume(
116   afs_cell_handle_p cellHandle,
117   afs_int32 toserver,
118   afs_int32 topart,
119   afs_int32 tovolid,
120   const char *tovolname,
121   int flags,
122   const char *dumpFile,
123   afs_status_p st
124 );
125
126 extern int UV_AddSite(
127   afs_cell_handle_p cellHandle,
128   afs_int32 server,
129   afs_int32 part,
130   afs_int32 volid,
131   afs_status_p st
132 );
133
134 extern int UV_RemoveSite(
135   afs_cell_handle_p cellHandle,
136   afs_int32 server,
137   afs_int32 part,
138   afs_int32 volid,
139   afs_status_p st
140 );
141
142 extern int UV_ListPartitions(
143   struct rx_connection *server,
144   struct partList *ptrPartList,
145   afs_int32 *cntp,
146   afs_status_p st
147 );
148
149 extern int UV_XListVolumes(
150   struct rx_connection *server,
151   afs_int32 a_partID,
152   int a_all,
153   struct volintXInfo **a_resultPP,
154   afs_int32 *a_numEntsInResultP,
155   afs_status_p st
156 );
157
158 extern int UV_XListOneVolume(
159   struct rx_connection *server,
160   afs_int32 a_partID,
161   afs_int32 a_volID,
162   struct volintXInfo **a_resultPP,
163   afs_status_p st
164 );
165
166 extern int UV_SyncVldb(
167   afs_cell_handle_p cellHandle,
168   struct rx_connection *server,
169   afs_int32 apart,
170   int flags,
171   int force,
172   afs_status_p st
173 );
174
175 extern int CheckVldb(
176   afs_cell_handle_p cellHandle,
177   struct nvldbentry *entry,
178   afs_int32 *modified,
179   afs_status_p st
180 );
181
182 extern int UV_SyncServer(
183   afs_cell_handle_p cellHandle,
184   struct rx_connection *server,
185   afs_int32 apart,
186   int flags,
187   afs_status_p st
188 );
189
190
191 extern int UV_VolserStatus(
192   struct rx_connection *server,
193   transDebugInfo **rpntr,
194   afs_int32 *rcount,
195   afs_status_p st
196 );
197
198 extern int UV_VolumeZap(
199   afs_cell_handle_p cellHandle,
200   struct rx_connection *serverHandle,
201   unsigned int partition,
202   unsigned int volumeId,
203   afs_status_p st
204 );
205
206 extern int UV_SetVolume(
207   struct rx_connection *server,
208   afs_int32 partition,
209   afs_int32 volid,
210   afs_int32 transflag,
211   afs_int32 setflag,
212   unsigned int sleep,
213   afs_status_p st
214 );
215
216 extern int UV_RenameVolume(
217   afs_cell_handle_p cellHandle,
218   struct nvldbentry *entry,
219   const char *newname,
220   afs_status_p st
221 );