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 __CONFIG_H_ENV_
11 #define __CONFIG_H_ENV_ 1
13 #define CM_CONFIGDEFAULT_CACHESIZE 98304
14 #define CM_CONFIGDEFAULT_BLOCKSIZE 4096
15 #define CM_CONFIGDEFAULT_ASYNCSTORESIZE 131072 /* 128K */
16 #define CM_CONFIGDEFAULT_STATS 10000
17 #define CM_CONFIGDEFAULT_CHUNKSIZE 18 /* 256KB */
18 #define CM_CONFIGDEFAULT_DAEMONS 1
19 #define CM_CONFIGDEFAULT_SVTHREADS 25
20 #define CM_CONFIGDEFAULT_TRACEBUFSIZE 5000
22 #ifndef __CM_CONFIG_INTERFACES_ONLY__
26 typedef FILE cm_configFile_t;
28 typedef long (cm_configProc_t)(void *rockp, struct sockaddr_in *addrp, char *namep);
30 extern long cm_GetRootCellName(char *namep);
32 extern long cm_SearchCellFile(char *cellNamep, char *newCellNamep,
33 cm_configProc_t *procp, void *rockp);
35 extern long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl,
36 cm_configProc_t *procp, void *rockp);
38 extern long cm_WriteConfigString(char *labelp, char *valuep);
40 extern long cm_WriteConfigInt(char *labelp, long value);
42 extern cm_configFile_t *cm_OpenCellFile(void);
44 extern long cm_AppendPrunedCellList(cm_configFile_t *filep, char *cellNamep);
46 extern long cm_AppendNewCell(cm_configFile_t *filep, char *cellNamep);
48 extern long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep);
50 extern long cm_CloseCellFile(cm_configFile_t *filep);
52 extern long cm_GetCellServDB(char *cellNamep, afs_uint32 len);
54 extern void cm_GetConfigDir(char *dir, afs_uint32 len);
56 /* TODO: these should be pulled in from dirpath.h */
57 #define AFS_THISCELL "ThisCell"
58 #define AFS_CELLSERVDB_UNIX "CellServDB"
59 #define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
61 #endif /* __CM_CONFIG_INTERFACES_ONLY__ */
63 #endif /* __CONFIG_H_ENV_ */