libadmin: minor warning fix
[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 OPENAFS_UTIL_ADMIN_H
11 #define OPENAFS_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(afs_status_t errorCode,
28                                                  int langId,
29                                                  const char **errorTextP,
30                                                  afs_status_p st);
31
32 extern int ADMINAPI util_DatabaseServerGetBegin(const char *cellName,
33                                                 void **iterationIdP,
34                                                 afs_status_p st);
35
36 extern int ADMINAPI util_DatabaseServerGetNext(const void *iterationId,
37                                                util_databaseServerEntry_p
38                                                serverP, afs_status_p st);
39
40 extern int ADMINAPI util_DatabaseServerGetDone(const void *iterationId,
41                                                afs_status_p st);
42
43 extern int ADMINAPI util_AdminServerAddressGetFromName(const char *serverName,
44                                                        int *serverAddress,
45                                                        afs_status_p st);
46
47 extern int ADMINAPI CellHandleIsValid(const void *cellHandle,
48                                       afs_status_p st);
49
50 struct rpcStats;
51 extern int ADMINAPI util_RPCStatsGetBegin(struct rx_connection *conn,
52                                           int (*rpc) (struct rx_connection *,
53                                                       afs_uint32, afs_uint32 *,
54                                                       afs_uint32 *, afs_uint32 *,
55                                                       afs_uint32 *,
56                                                       struct rpcStats *),
57                                           void **iterationIdP,
58                                           afs_status_p st);
59
60 extern int ADMINAPI util_RPCStatsGetNext(const void *iterationId,
61                                          afs_RPCStats_p stats,
62                                          afs_status_p st);
63
64 extern int ADMINAPI util_RPCStatsGetDone(const void *iterationId,
65                                          afs_status_p st);
66
67 extern int ADMINAPI util_RPCStatsStateGet(struct rx_connection *conn,
68                                           int (*rpc) (struct rx_connection *,
69                                                       afs_RPCStatsState_p),
70                                           afs_RPCStatsState_p state,
71                                           afs_status_p st);
72
73 extern int ADMINAPI util_RPCStatsStateEnable(struct rx_connection *conn,
74                                              int (*rpc) (struct rx_connection *),
75                                              afs_status_p st);
76
77 extern int ADMINAPI util_RPCStatsStateDisable(struct rx_connection *conn,
78                                               int (*rpc) (struct rx_connection *),
79                                               afs_status_p st);
80
81 extern int ADMINAPI util_RPCStatsClear(struct rx_connection *conn,
82                                        int (*rpc) (struct rx_connection *,
83                                                    afs_RPCStatsClearFlag_t),
84                                        afs_RPCStatsClearFlag_t flag,
85                                        afs_status_p st);
86
87 extern int ADMINAPI util_RPCStatsVersionGet(struct rx_connection *conn,
88                                             afs_RPCStatsVersion_p version,
89                                             afs_status_p st);
90
91 typedef struct afs_CMServerPref {
92     afs_int32 ipAddr;
93     afs_int32 ipRank;
94 } afs_CMServerPref_t, *afs_CMServerPref_p;
95
96 extern int ADMINAPI util_CMGetServerPrefsBegin(struct rx_connection *conn,
97                                                void **iterationIdP,
98                                                afs_status_p st);
99
100 extern int ADMINAPI util_CMGetServerPrefsNext(const void *iterationId,
101                                               afs_CMServerPref_p prefs,
102                                               afs_status_p st);
103
104 extern int ADMINAPI util_CMGetServerPrefsDone(const void *iterationId,
105                                               afs_status_p st);
106
107 typedef struct afs_CMListCell {
108     char cellname[UTIL_MAX_CELL_NAME_LEN];
109     afs_int32 serverAddr[UTIL_MAX_CELL_HOSTS];
110 } afs_CMListCell_t, *afs_CMListCell_p;
111
112 extern int ADMINAPI util_CMListCellsBegin(struct rx_connection *conn,
113                                           void **iterationIdP,
114                                           afs_status_p st);
115
116 extern int ADMINAPI util_CMListCellsNext(const void *iterationId,
117                                          afs_CMListCell_p prefs,
118                                          afs_status_p st);
119
120 extern int ADMINAPI util_CMListCellsDone(const void *iterationId,
121                                          afs_status_p st);
122
123 typedef char afs_CMCellName_t[UTIL_MAX_CELL_NAME_LEN], *afs_CMCellName_p;
124
125 extern int ADMINAPI util_CMLocalCell(struct rx_connection *conn,
126                                      afs_CMCellName_p cellName,
127                                      afs_status_p st);
128
129 extern int ADMINAPI util_CMClientConfig(struct rx_connection *conn,
130                                         afs_ClientConfig_p config,
131                                         afs_status_p st);
132
133 typedef char rxdebugVersion_t[UTIL_MAX_RXDEBUG_VERSION_LEN],
134     *rxdebugVersion_p;
135
136 extern int ADMINAPI util_RXDebugVersion(rxdebugHandle_p handle,
137                                         rxdebugVersion_p version,
138                                         afs_status_p st);
139
140 extern int ADMINAPI util_RXDebugSupportedStats(rxdebugHandle_p handle,
141                                                afs_uint32 * supportedStats,
142                                                afs_status_p st);
143
144 extern int ADMINAPI util_RXDebugBasicStats(rxdebugHandle_p handle,
145                                            struct rx_debugStats *stats,
146                                            afs_status_p st);
147
148 extern int ADMINAPI util_RXDebugRxStats(rxdebugHandle_p handle,
149                                         struct rx_statistics *stats,
150                                         afs_uint32 * supportedStats,
151                                         afs_status_p st);
152
153 extern int ADMINAPI util_RXDebugConnectionsBegin(rxdebugHandle_p handle,
154                                                  int allconns,
155                                                  void **iterationIdP,
156                                                  afs_status_p st);
157
158 extern int ADMINAPI util_RXDebugConnectionsNext(const void *iterationId,
159                                                 struct rx_debugConn *conn,
160                                                 afs_uint32 * supportedValues,
161                                                 afs_status_p st);
162
163 extern int ADMINAPI util_RXDebugConnectionsDone(const void *iterationId,
164                                                 afs_status_p st);
165
166 extern int ADMINAPI util_RXDebugPeersBegin(rxdebugHandle_p handle,
167                                            void **iterationIdP,
168                                            afs_status_p st);
169
170 extern int ADMINAPI util_RXDebugPeersNext(const void *iterationId,
171                                           struct rx_debugPeer *peer,
172                                           afs_uint32 * supportedValues,
173                                           afs_status_p st);
174
175 extern int ADMINAPI util_RXDebugPeersDone(const void *iterationId,
176                                           afs_status_p st);
177
178 #endif /* OPENAFS_UTIL_ADMIN_H */