Windows: cm_ShutdownSCache corrections
[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 OPENAFS_WINNT_AFSD_CONFIG_H
11 #define OPENAFS_WINNT_AFSD_CONFIG_H 1
12
13 #define CM_CONFIGDEFAULT_CACHESIZE      98304
14 #define CM_CONFIGDEFAULT_BLOCKSIZE      4096
15 #define CM_CONFIGDEFAULT_ASYNCSTORESIZE 131072  /* 128K */
16 #define CM_CONFIGDEFAULT_CELLS          1024
17 #define CM_CONFIGDEFAULT_STATS          10000
18 #define CM_CONFIGDEFAULT_CHUNKSIZE      18      /* 256KB */
19 #define CM_CONFIGDEFAULT_DAEMONS        4
20 #define CM_CONFIGDEFAULT_SVTHREADS      25
21 #define CM_CONFIGDEFAULT_TRACEBUFSIZE   10000
22
23 #ifndef __CM_CONFIG_INTERFACES_ONLY__
24
25 #include <stdio.h>
26
27 typedef FILE cm_configFile_t;
28
29 typedef long (cm_configProc_t)(void *rockp, struct sockaddr_in *addrp, char *namep, unsigned short);
30
31 typedef long (cm_enumCellProc_t)(void *rockp, char *cellNamep);
32
33 extern long cm_GetRootCellName(char *namep);
34
35 extern long cm_SearchCellFile(char *cellNamep, char *newCellNamep,
36                               cm_configProc_t *procp, void *rockp);
37
38 extern long cm_SearchCellFileEx(char *cellNamep, char *newCellNamep,
39                                 char *linkedNamep,
40                                 cm_configProc_t *procp, void *rockp);
41
42 extern long cm_EnumerateCellFile(afs_uint32 client,
43                                  cm_enumCellProc_t *procp,
44                                  void *rockp);
45
46 extern long cm_SearchCellRegistry(afs_uint32 client,
47                                   char *cellNamep, char *newCellNamep,
48                                   char *linkedNamep,
49                                   cm_configProc_t *procp, void *rockp);
50
51 extern long cm_EnumerateCellRegistry(afs_uint32 client,
52                                      cm_enumCellProc_t *procp,
53                                      void *rockp);
54
55 extern long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl,
56                                cm_configProc_t *procp, void *rockp);
57
58 extern long cm_WriteConfigString(char *labelp, char *valuep);
59
60 extern long cm_WriteConfigInt(char *labelp, long value);
61
62 extern cm_configFile_t *cm_OpenCellFile(void);
63
64 extern long cm_AppendPrunedCellList(cm_configFile_t *filep, char *cellNamep);
65
66 extern long cm_AppendNewCell(cm_configFile_t *filep, char *cellNamep);
67
68 extern long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep);
69
70 extern long cm_CloseCellFile(cm_configFile_t *filep);
71
72 extern long cm_AddCellToRegistry( char * cellname,
73                                   char * linked_cellname,
74                                   unsigned short vlport,
75                                   afs_uint32 host_count,
76                                   char *hostname[],
77                                   afs_uint32 flags);
78
79 extern long cm_GetCellServDB(char *cellNamep, afs_uint32 len);
80
81 extern void cm_GetConfigDir(char *dir, afs_uint32 len);
82
83 /* TODO: these should be pulled in from dirpath.h */
84 #define AFS_THISCELL "ThisCell"
85 #define AFS_CELLSERVDB_UNIX "CellServDB"
86 #define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
87
88 #endif /* __CM_CONFIG_INTERFACES_ONLY__ */
89
90 #endif /* OPENAFS_WINNT_AFSD_CONFIG_H */