prototypes-fixes-20020821
[openafs.git] / src / libadmin / adminutil / afs_utilAdmin.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 #ifndef TRANSARC_AFS_UTIL_ADMIN_H
11 #define TRANSARC_AFS_UTIL_ADMIN_H
12
13 #include <afs/afs_Admin.h>
14 #include <afs/afs_AdminErrors.h>
15
16 #define UTIL_MAX_DATABASE_SERVER_NAME 64
17 #define UTIL_MAX_CELL_NAME_LEN 256
18 #define UTIL_MAX_CELL_HOSTS 8
19 #define UTIL_MAX_RXDEBUG_VERSION_LEN 64
20
21
22 typedef struct util_databaseServerEntry {
23     int serverAddress;
24     char serverName[ UTIL_MAX_DATABASE_SERVER_NAME ];
25 } util_databaseServerEntry_t, *util_databaseServerEntry_p;
26
27 extern int ADMINAPI util_AdminErrorCodeTranslate(
28    afs_status_t errorCode,
29    int langId,
30    const char **errorTextP,
31    afs_status_p st
32 );
33
34 extern int ADMINAPI util_DatabaseServerGetBegin(
35   const char *cellName,
36   void **iterationIdP,
37   afs_status_p st
38 );
39
40 extern int ADMINAPI util_DatabaseServerGetNext(
41   const void *iterationId,
42   util_databaseServerEntry_p serverP,
43   afs_status_p st
44 );
45
46 extern int ADMINAPI util_DatabaseServerGetDone(
47   const void *iterationId,
48   afs_status_p st
49 );
50
51 extern int ADMINAPI util_AdminServerAddressGetFromName(
52   const char *serverName,
53   int *serverAddress,
54   afs_status_p st
55 );
56
57 extern int ADMINAPI CellHandleIsValid(
58   const void *cellHandle,
59   afs_status_p st
60 );
61
62 extern int ADMINAPI util_RPCStatsGetBegin(
63   struct rx_connection *conn,
64   int (*rpc)(),
65   void **iterationIdP,
66   afs_status_p st
67 );
68
69 extern int ADMINAPI util_RPCStatsGetNext(
70   const void *iterationId,
71   afs_RPCStats_p stats,
72   afs_status_p st
73 );
74
75 extern int ADMINAPI util_RPCStatsGetDone(
76   const void *iterationId,
77   afs_status_p st
78 );
79
80 extern int ADMINAPI util_RPCStatsStateGet(
81   struct rx_connection *conn,
82   int (*rpc)(),
83   afs_RPCStatsState_p state,
84   afs_status_p st
85 );
86
87 extern int ADMINAPI util_RPCStatsStateEnable(
88   struct rx_connection *conn,
89   int (*rpc)(),
90   afs_status_p st
91 );
92
93 extern int ADMINAPI util_RPCStatsStateDisable(
94   struct rx_connection *conn,
95   int (*rpc)(),
96   afs_status_p st
97 );
98
99 extern int ADMINAPI util_RPCStatsClear(
100   struct rx_connection *conn,
101   int (*rpc)(),
102   afs_RPCStatsClearFlag_t flag,
103   afs_status_p st
104 );
105
106 extern int ADMINAPI util_RPCStatsVersionGet(
107   struct rx_connection *conn,
108   afs_RPCStatsVersion_p version,
109   afs_status_p st
110 );
111
112 typedef struct afs_CMServerPref {
113     afs_int32 ipAddr;
114     afs_int32 ipRank;
115 } afs_CMServerPref_t, *afs_CMServerPref_p;
116
117 extern int ADMINAPI util_CMGetServerPrefsBegin(
118   struct rx_connection *conn,
119   void **iterationIdP,
120   afs_status_p st
121 );
122
123 extern int ADMINAPI util_CMGetServerPrefsNext(
124   const void *iterationId,
125   afs_CMServerPref_p prefs,
126   afs_status_p st
127 );
128
129 extern int ADMINAPI util_CMGetServerPrefsDone(
130   const void *iterationId,
131   afs_status_p st
132 );
133
134 typedef struct afs_CMListCell {
135     char cellname[UTIL_MAX_CELL_NAME_LEN];
136     afs_int32 serverAddr[UTIL_MAX_CELL_HOSTS];
137 } afs_CMListCell_t, *afs_CMListCell_p;
138
139 extern int ADMINAPI util_CMListCellsBegin(
140   struct rx_connection *conn,
141   void **iterationIdP,
142   afs_status_p st
143 );
144
145 extern int ADMINAPI util_CMListCellsNext(
146   const void *iterationId,
147   afs_CMListCell_p prefs,
148   afs_status_p st
149 );
150
151 extern int ADMINAPI util_CMListCellsDone(
152   const void *iterationId,
153   afs_status_p st
154 );
155
156 typedef char afs_CMCellName_t[UTIL_MAX_CELL_NAME_LEN], *afs_CMCellName_p;
157
158 extern int ADMINAPI util_CMLocalCell(
159   struct rx_connection *conn,
160   afs_CMCellName_p cellName,
161   afs_status_p st
162 );
163
164 extern int ADMINAPI util_CMClientConfig(
165   struct rx_connection *conn,
166   afs_ClientConfig_p config,
167   afs_status_p st
168 );
169
170 typedef char rxdebugVersion_t[UTIL_MAX_RXDEBUG_VERSION_LEN], *rxdebugVersion_p;
171
172 extern int ADMINAPI util_RXDebugVersionString(
173   rxdebugHandle_p handle,
174   rxdebugVersion_p version,
175   afs_status_p st
176 );
177
178 extern int ADMINAPI util_RXDebugSupportedStats(
179   rxdebugHandle_p handle,
180   afs_uint32 *supportedStats,
181   afs_status_p st
182 );
183
184 extern int ADMINAPI util_RXDebugBasicStats(
185   rxdebugHandle_p handle,
186   struct rx_debugStats *stats,
187   afs_status_p st
188 );
189
190 extern int ADMINAPI util_RXDebugRxStats(
191   rxdebugHandle_p handle,
192   struct rx_stats *stats,
193   afs_uint32 *supportedStats,
194   afs_status_p st
195 );
196
197 extern int ADMINAPI util_RXDebugConnectionsBegin(
198   rxdebugHandle_p handle,
199   int allconns,
200   void **iterationIdP,
201   afs_status_p st
202 );
203
204 extern int ADMINAPI util_RXDebugConnectionsNext(
205   const void *iterationId,
206   struct rx_debugConn *conn,
207   afs_uint32 *supportedValues,
208   afs_status_p st
209 );
210
211 extern int ADMINAPI util_RXDebugConnectionsDone(
212   const void *iterationId,
213   afs_status_p st
214 );
215
216 extern int ADMINAPI util_RXDebugPeersBegin(
217   rxdebugHandle_p handle,
218   void **iterationIdP,
219   afs_status_p st
220 );
221
222 extern int ADMINAPI util_RXDebugPeersNext(
223   const void *iterationId,
224   struct rx_debugPeer *peer,
225   afs_uint32 *supportedValues,
226   afs_status_p st
227 );
228
229 extern int ADMINAPI util_RXDebugPeersDone(
230   const void *iterationId,
231   afs_status_p st
232 );
233
234 #endif /* TRANSARC_AFS_UTIL_ADMIN_H */