Warning cleanup for the libadmin directory
[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/cellconfig.h>
30 #include <afs/keys.h>
31 #include <ubik.h>
32 #include <afs/afsint.h>
33 #include <afs/volser.h>
34 #include <afs/volint.h>
35 #include "../../volser/lockdata.h"
36 #include <afs/vldbint.h>
37 #include <afs/com_err.h>
38 #include <rx/rxkad.h>
39 #include <afs/kautils.h>
40 #include <afs/cmd.h>
41 #include <errno.h>
42 #include <afs/afs_Admin.h>
43 #include "../adminutil/afs_AdminInternal.h"
44
45 #define CLOCKSKEW   2           /* not really skew, but resolution */
46
47 extern int UV_NukeVolume(afs_cell_handle_p cellHandle,
48                          struct rx_connection *server, unsigned int partition,
49                          afs_uint32 volumeId, afs_status_p st);
50
51 extern int UV_CreateVolume(afs_cell_handle_p cellHandle,
52                            struct rx_connection *server,
53                            unsigned int partition, const char *volumeName,
54                            unsigned int quota, afs_uint32 *volumeId,
55                            afs_status_p st);
56
57 extern int UV_DeleteVolume(afs_cell_handle_p cellHandle,
58                            struct rx_connection *server,
59                            unsigned int partition, afs_uint32 volumeId,
60                            afs_status_p st);
61
62 extern int UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
63                          afs_int32 afromserver, afs_int32 afrompart,
64                          afs_int32 atoserver, afs_int32 atopart,
65                          afs_status_p st);
66
67 extern int UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
68                            afs_int32 apart, afs_uint32 avolid,
69                            afs_status_p st);
70
71 extern int UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
72                             afs_int32 afromserver, afs_int32 afrompart,
73                             int forceflag, afs_status_p st);
74
75 extern int UV_DumpVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
76                          afs_int32 afromserver, afs_int32 afrompart,
77                          afs_int32 fromdate, const char *filename,
78                          afs_status_p st);
79
80 extern int UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
81                             afs_int32 topart, afs_uint32 tovolid,
82                             const char *tovolname, int flags,
83                             const char *dumpFile, afs_status_p st);
84
85 extern int UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server,
86                       afs_int32 part, afs_uint32 volid, afs_status_p st);
87
88 extern int UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server,
89                          afs_int32 part, afs_uint32 volid, afs_status_p st);
90
91 extern int UV_ListPartitions(struct rx_connection *server,
92                              struct partList *ptrPartList, afs_int32 * cntp,
93                              afs_status_p st);
94
95 extern int UV_XListVolumes(struct rx_connection *server, afs_int32 a_partID,
96                            int a_all, struct volintXInfo **a_resultPP,
97                            afs_int32 * a_numEntsInResultP, afs_status_p st);
98
99 extern int UV_XListOneVolume(struct rx_connection *server, afs_int32 a_partID,
100                              afs_uint32 a_volID,
101                              struct volintXInfo **a_resultPP,
102                              afs_status_p st);
103
104 extern int UV_ListOneVolume(struct rx_connection *server, afs_int32 a_partID,
105                             afs_uint32 a_volID, struct volintInfo **a_resultPP,
106                             afs_status_p st);
107                             
108 extern int UV_SyncVldb(afs_cell_handle_p cellHandle,
109                        struct rx_connection *server, afs_int32 apart,
110                        int flags, int force, afs_status_p st);
111
112 extern int CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
113                      afs_int32 * modified, afs_status_p st);
114
115 extern int UV_SyncServer(afs_cell_handle_p cellHandle,
116                          struct rx_connection *server, afs_int32 apart,
117                          int flags, afs_status_p st);
118
119
120 extern int UV_VolserStatus(struct rx_connection *server,
121                            transDebugInfo ** rpntr, afs_int32 * rcount,
122                            afs_status_p st);
123
124 extern int UV_VolumeZap(afs_cell_handle_p cellHandle,
125                         struct rx_connection *serverHandle,
126                         unsigned int partition, afs_uint32 volumeId,
127                         afs_status_p st);
128
129 extern int UV_SetVolume(struct rx_connection *server, afs_int32 partition,
130                         afs_uint32 volid, afs_int32 transflag,
131                         afs_int32 setflag, unsigned int sleep,
132                         afs_status_p st);
133
134 extern int UV_RenameVolume(afs_cell_handle_p cellHandle,
135                            struct nvldbentry *entry, const char *newname,
136                            afs_status_p st);