~ubuntu-branches/ubuntu/warty/openafs/warty

« back to all changes in this revision

Viewing changes to src/WINNT/afsd/cm_dnlc.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-01-10 16:37:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040110163733-jvr0n1uahshlb1uu
Tags: upstream-1.2.11
ImportĀ upstreamĀ versionĀ 1.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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        36 /* multiple of 4 */
 
13
#define         NCSIZE                  300
 
14
#define         NHSIZE                  256 /* must be power of 2== NHASHENT */
 
15
 
 
16
 
 
17
struct nc {
 
18
  unsigned int key;
 
19
  struct nc *next, *prev;
 
20
  cm_scache_t *dirp, *vp;
 
21
  unsigned char name[CM_AFSNCNAMESIZE];   
 
22
};
 
23
 
 
24
typedef struct {
 
25
  unsigned int enters, lookups, misses, removes;
 
26
  unsigned int purgeds, purgevs, purgevols, purges;
 
27
  unsigned int cycles, lookuprace;
 
28
} cm_dnlcstats_t;
 
29
 
 
30
#define dnlcHash(ts, hval) for (hval=0; *ts; ts++) {    \
 
31
                                hval *= 173;            \
 
32
                                hval += cm_foldUpper[(unsigned char)(*ts)]; \
 
33
                           }
 
34
extern void cm_dnlcEnter(cm_scache_t *adp, char *name, cm_scache_t *avc);
 
35
extern void cm_dnlcRemove(cm_scache_t *adp, char *name);
 
36
extern void cm_dnlcPurgedp(cm_scache_t *adp);
 
37
extern void cm_dnlcPurgevp(cm_scache_t *avc);
 
38
extern void cm_dnlcPurge(void);
 
39
extern void cm_dnlcPurgeVol(struct AFSFid *fidp);
 
40
extern void cm_dnlcInit(void);
 
41
extern void cm_dnlcShutdown(void);
 
42
extern cm_scache_t* cm_dnlcLookup(cm_scache_t *adp, cm_lookupSearch_t* sp);