down-before-busy-20040723
[openafs.git] / src / WINNT / afsd / cm_cell.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 __CELL_H_ENV_
11 #define __CELL_H_ENV_ 1
12
13 #include "cm_server.h"
14
15 /* a cell structure */
16 typedef struct cm_cell {
17         long cellID;                    /* cell ID */
18         struct cm_cell *nextp;          /* locked by cm_cellLock */
19         char *namep;                    /* cell name; never changes */
20         struct cm_serverRef *vlServersp;        /* locked by cm_serverLock */
21         osi_mutex_t mx;                 /* mutex locking fields (flags) */
22         long flags;                     /* locked by mx */
23         long timeout;                   /* if dns, time at which the server addrs expire */
24 } cm_cell_t;
25
26 /* These are bit flag values */
27 #define CM_CELLFLAG_SUID            1   /* setuid flag; not yet used */
28 #define CM_CELLFLAG_DNS         2   /* cell servers are from DNS */
29 #define CM_CELLFLAG_VLSERVER_INVALID 4  /* cell servers are invalid */
30
31 extern void cm_InitCell(void);
32
33 extern cm_cell_t *cm_GetCell(char *namep, long flags);
34
35 extern cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, long flags);
36
37 extern cm_cell_t *cm_FindCellByID(long cellID);
38
39 extern void cm_ChangeRankCellVLServer(cm_server_t       *tsp);
40
41 extern osi_rwlock_t cm_cellLock;
42
43 extern cm_cell_t *cm_allCellsp;
44
45 #endif /* __CELL_H_ENV_ */