0cc0578b1b4d3df28ffdd8102e4d486687308885
[openafs.git] / src / WINNT / afsd / cm_config.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 __CONFIG_H_ENV_
11 #define __CONFIG_H_ENV_ 1
12
13 #define CM_CONFIGDEFAULT_CACHESIZE      98304
14 #define CM_CONFIGDEFAULT_BLOCKSIZE      4096
15 #define CM_CONFIGDEFAULT_STATS          10000
16 #define CM_CONFIGDEFAULT_CHUNKSIZE      17
17 #define CM_CONFIGDEFAULT_DAEMONS        2
18 #define CM_CONFIGDEFAULT_SVTHREADS      25
19 #define CM_CONFIGDEFAULT_TRACEBUFSIZE   5000
20
21 #ifndef __CM_CONFIG_INTERFACES_ONLY__
22
23 #include <stdio.h>
24 #ifdef DJGPP
25 #include <netinet/in.h>
26 #endif /* DJGPP */
27
28 typedef FILE cm_configFile_t;
29
30 typedef long (cm_configProc_t)(void *rockp, struct sockaddr_in *addrp, char *namep);
31
32 extern long cm_GetRootCellName(char *namep);
33
34 extern long cm_SearchCellFile(char *cellNamep, char *newCellNamep,
35         cm_configProc_t *procp, void *rockp);
36
37 extern long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl,
38                cm_configProc_t *procp, void *rockp);
39
40 extern long cm_WriteConfigString(char *labelp, char *valuep);
41
42 extern long cm_WriteConfigInt(char *labelp, long value);
43
44 extern cm_configFile_t *cm_OpenCellFile(void);
45
46 extern long cm_AppendPrunedCellList(cm_configFile_t *filep, char *cellNamep);
47
48 extern long cm_AppendNewCell(cm_configFile_t *filep, char *cellNamep);
49
50 extern long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep);
51
52 extern long cm_CloseCellFile(cm_configFile_t *filep);
53
54 extern long cm_GetCellServDB(char *cellNamep);
55
56 extern void cm_GetConfigDir(char *dir);
57
58 #endif /* __CM_CONFIG_INTERFACES_ONLY__ */
59
60 #endif /* __CONFIG_H_ENV_ */