Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / libadmin / afs_Admin.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_ADMIN_H
11 #define OPENAFS_ADMIN_H
12
13 #include <afs/param.h>
14 #include <afs/afs_args.h>
15 #include <rx/rx.h>
16
17 #ifdef AFS_NT40_ENV
18 /* NT definitions */
19 #define ADMINAPI __cdecl
20
21 #ifndef ADMINEXPORT
22 #define ADMINEXPORT __declspec(dllimport)
23 #endif
24
25 #else
26 /* Unix definitions */
27 #define ADMINAPI
28 #define ADMINEXPORT
29 #endif /* AFS_NT40_ENV */
30
31
32 typedef unsigned int afs_status_t, *afs_status_p;
33
34 typedef enum {
35 AFS_RPC_STATS_DISABLED,
36 AFS_RPC_STATS_ENABLED
37 } afs_RPCStatsState_t, *afs_RPCStatsState_p;
38
39 typedef afs_uint32 afs_RPCStatsVersion_t, *afs_RPCStatsVersion_p;
40
41 #define AFS_RX_STATS_CLEAR_ALL 0xffffffff
42 #define AFS_RX_STATS_CLEAR_INVOCATIONS 0x1
43 #define AFS_RX_STATS_CLEAR_TIME_SUM 0x2
44 #define AFS_RX_STATS_CLEAR_TIME_SQUARE 0x4
45 #define AFS_RX_STATS_CLEAR_TIME_MIN 0x8
46 #define AFS_RX_STATS_CLEAR_TIME_MAX 0x10
47
48 typedef afs_uint32 afs_RPCStatsClearFlag_t, *afs_RPCStatsClearFlag_p;
49
50 typedef union {
51 rx_function_entry_v1_t stats_v1;
52 /* add new stat structures here when required */
53 } afs_RPCUnion_t, *afs_RPCUnion_p;
54
55 typedef struct afs_RPCStats {
56 afs_uint32 clientVersion;
57 afs_uint32 serverVersion;
58 afs_uint32 statCount;
59 afs_RPCUnion_t s;
60 } afs_RPCStats_t, *afs_RPCStats_p;
61
62 typedef union {
63 cm_initparams_v1 config_v1;
64 /* add new client config structures here when required */
65 } afs_ClientConfigUnion_t, *afs_ClientConfigUnion_p;
66
67 typedef struct afs_ClientConfig {
68 afs_uint32 clientVersion;
69 afs_uint32 serverVersion;
70 afs_ClientConfigUnion_t c;
71 } afs_ClientConfig_t, *afs_ClientConfig_p;
72
73 #if AFS_NT40_ENV
74 typedef SOCKET rxdebugSocket_t;
75 #define INVALID_RXDEBUG_SOCKET INVALID_SOCKET
76 #else /* AFS_NT40_ENV */
77 typedef int rxdebugSocket_t;
78 #define INVALID_RXDEBUG_SOCKET ((rxdebugSocket_t)-1)
79 #endif /* AFS_NT40_ENV */
80
81 typedef struct {
82 rxdebugSocket_t sock;
83 int ipAddr;
84 int udpPort;
85 int firstFlag;
86 afs_uint32 supportedStats;
87 } rxdebugHandle_t, *rxdebugHandle_p;
88
89 #define AFS_STATUS_OK 0
90
91 #endif /* OPENAFS_ADMIN_H */