2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef OPENAFS_CLIENT_ADMIN_H
11 #define OPENAFS_CLIENT_ADMIN_H
13 #include <afs/afs_Admin.h>
19 typedef enum { READ_ONLY, READ_WRITE } vol_type_t, *vol_type_p;
20 typedef enum { CHECK_VOLUME, DONT_CHECK_VOLUME } vol_check_t, *vol_check_p;
22 typedef enum { READ, NO_READ } acl_read_t, *acl_read_p;
23 typedef enum { WRITE, NO_WRITE } acl_write_t, *acl_write_p;
24 typedef enum { LOOKUP, NO_LOOKUP } acl_lookup_t, *acl_lookup_p;
25 typedef enum { DELETE, NO_DELETE } acl_delete_t, *acl_delete_p;
26 typedef enum { INSERT, NO_INSERT } acl_insert_t, *acl_insert_p;
27 typedef enum { LOCK, NO_LOCK } acl_lock_t, *acl_lock_p;
28 typedef enum { ADMIN, NO_ADMIN } acl_admin_t, *acl_admin_p;
40 #define AFS_MAX_SERVER_NAME_LEN 128
41 #define AFS_MAX_SERVER_ADDRESS 16
44 DATABASE_SERVER = 0x1,
46 } afs_server_type_t, *afs_server_type_p;
56 } afs_stat_source_t, *afs_stat_source_p;
59 char serverName[AFS_MAX_SERVER_NAME_LEN];
60 afs_server_type_t serverType;
61 int serverAddress[AFS_MAX_SERVER_ADDRESS];
62 } afs_serverEntry_t, *afs_serverEntry_p;
64 extern int ADMINAPI afsclient_TokenGetExisting(const char *cellName,
68 extern int ADMINAPI afsclient_TokenSet(const void *tokenHandle,
71 extern int ADMINAPI afsclient_TokenGetNew(const char *cellName,
72 const char *principal,
77 extern int ADMINAPI afsclient_TokenClose(const void *tokenHandle,
80 extern int ADMINAPI afsclient_TokenQuery(void *tokenHandle,
81 unsigned long *expirationDateP,
82 char *principal, char *instance,
83 char *cell, int *hasKasTokens,
86 extern int ADMINAPI afsclient_CellOpen(const char *cellName,
87 const void *tokenHandle,
88 void **cellHandleP, afs_status_p st);
90 extern int ADMINAPI afsclient_NullCellOpen(void **cellHandleP,
93 extern int ADMINAPI afsclient_CellClose(const void *cellHandle,
96 extern int ADMINAPI afsclient_CellNameGet(const void *cellHandle,
97 const char **cellNameP,
100 extern int ADMINAPI afsclient_LocalCellGet(char *cellName, afs_status_p st);
102 extern int ADMINAPI afsclient_MountPointCreate(const void *cellHandle,
103 const char *directory,
104 const char *volumeName,
106 vol_check_t volCheck,
109 extern int ADMINAPI afsclient_ACLEntryAdd(const char *directory,
110 const char *user, const acl_p acl,
113 extern int ADMINAPI afsclient_Init(afs_status_p st);
115 extern int ADMINAPI afsclient_AFSServerGet(const void *cellHandle,
116 const char *serverName,
117 afs_serverEntry_p serverEntryP,
120 extern int ADMINAPI afsclient_AFSServerGetBegin(const void *cellHandle,
124 extern int ADMINAPI afsclient_AFSServerGetNext(void *iterationId,
125 afs_serverEntry_p serverEntryP,
128 extern int ADMINAPI afsclient_AFSServerGetDone(void *iterationId,
131 extern int ADMINAPI afsclient_RPCStatOpen(const void *cellHandle,
132 const char *serverName,
133 afs_stat_source_t type,
135 **rpcStatHandleP, afs_status_p st);
137 extern int ADMINAPI afsclient_RPCStatOpenPort(const void *cellHandle,
138 const char *serverName,
139 const int serverPort,
144 extern int ADMINAPI afsclient_RPCStatClose(struct rx_connection
145 *rpcStatHandle, afs_status_p st);
147 extern int ADMINAPI afsclient_CMStatOpen(const void *cellHandle,
148 const char *serverName,
150 **rpcStatHandleP, afs_status_p st);
152 extern int ADMINAPI afsclient_CMStatOpenPort(const void *cellHandle,
153 const char *serverName,
154 const int serverPort,
159 extern int ADMINAPI afsclient_CMStatClose(struct rx_connection *rpcStatHandle,
162 extern int ADMINAPI afsclient_RXDebugOpen(const char *serverName,
163 afs_stat_source_t type,
164 rxdebugHandle_p * rxdebugHandleP,
167 extern int ADMINAPI afsclient_RXDebugOpenPort(const char *serverName,
168 const int serverPort,
173 extern int ADMINAPI afsclient_RXDebugClose(rxdebugHandle_p rxdebugHandle,
176 #endif /* OPENAFS_CLIENT_ADMIN_H */