2 * Copyright 2000, International Business Machines Corporation and others.
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
11 #define __CELL_H_ENV_ 1
13 #include "cm_server.h"
15 #define CELL_MAXNAMELEN 256
17 #define CM_CELL_MAGIC ('C' | 'E' <<8 | 'L'<<16 | 'L'<<24)
19 /* a cell structure */
20 typedef struct cm_cell {
22 long cellID; /* cell ID */
23 struct cm_cell *nextp; /* locked by cm_cellLock */
24 char name[CELL_MAXNAMELEN]; /* cell name; never changes */
25 cm_serverRef_t *vlServersp; /* locked by cm_serverLock */
26 osi_mutex_t mx; /* mutex locking fields (flags) */
27 long flags; /* locked by mx */
28 time_t timeout; /* if dns, time at which the server addrs expire */
31 /* These are bit flag values */
32 #define CM_CELLFLAG_SUID 1 /* setuid flag; not yet used */
33 #define CM_CELLFLAG_DNS 2 /* cell servers are from DNS */
34 #define CM_CELLFLAG_VLSERVER_INVALID 4 /* cell servers are invalid */
35 #define CM_CELLFLAG_FREELANCE 8 /* local freelance fake cell */
37 extern void cm_InitCell(int newFile, long maxCells);
39 extern long cm_ShutdownCell(void);
41 extern long cm_ValidateCell(void);
43 extern cm_cell_t *cm_GetCell(char *namep, long flags);
45 extern cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, long flags);
47 extern cm_cell_t *cm_FindCellByID(long cellID);
49 extern void cm_ChangeRankCellVLServer(cm_server_t *tsp);
51 extern osi_rwlock_t cm_cellLock;
53 extern cm_cell_t *cm_allCellsp;
55 #endif /* __CELL_H_ENV_ */