Windows: permit offline volume check to be disabled
[openafs.git] / src / WINNT / afsd / cm_dnlc.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 #include <ctype.h>
11
12 #define         CM_AFSNCNAMESIZE        40  /* multiple of 8 (for 64-bit) */
13 #define         NCSIZE                  512
14 #define         NHSIZE                  256 /* must be power of 2 */
15
16 #define         CM_DNLC_MAGIC           ('D' | 'N' <<8 | 'L'<<16 | 'C'<<24)
17
18 typedef struct nc {
19     afs_uint32 magic;
20     unsigned int key;
21     struct nc *next, *prev;
22     cm_scache_t *dirp, *vp;
23     normchar_t name[CM_AFSNCNAMESIZE];
24 } cm_nc_t;
25
26 typedef struct {
27     afs_int32 enters, lookups, misses, removes;
28     afs_int32 purgeds, purgevs, purgevols, purges;
29     afs_int32 cycles, lookuprace;
30 } cm_dnlcstats_t;
31
32 #define dnlcHash(ts, hval) for (hval=0; *ts; ts++) {                    \
33         hval *= 173;                                                    \
34         hval += cm_NormCharUpr(*ts);                                   \
35     }
36 extern void cm_dnlcEnter(cm_scache_t *adp, normchar_t *name, cm_scache_t *avc);
37 extern void cm_dnlcRemove(cm_scache_t *adp, normchar_t *name);
38 extern void cm_dnlcPurgedp(cm_scache_t *adp);
39 extern void cm_dnlcPurgevp(cm_scache_t *avc);
40 extern void cm_dnlcPurge(void);
41 extern void cm_dnlcPurgeVol(struct AFSFid *fidp);
42 extern void cm_dnlcInit(int);
43 extern long cm_dnlcShutdown(void);
44 extern cm_scache_t* cm_dnlcLookup(cm_scache_t *adp, cm_lookupSearch_t* sp);
45 extern long cm_dnlcValidate(void);