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
10 #ifndef OPENAFS_CFG_INTERNAL_H
11 #define OPENAFS_CFG_INTERNAL_H
13 /* Define types, macros, etc., internal to the configuration library */
16 int begin_magic
; /* begin and end magic help validate cfg handle */
17 int is_valid
; /* true if cfg handle is valid */
18 char *hostName
; /* name of host being configured */
19 int is_local
; /* true if hostName specifies the local host */
20 void *cellHandle
; /* cell handle establishing working cell */
21 const char *cellName
; /* cell name in cell handle */
22 pthread_mutex_t mutex
; /* protects bosHandle initialization */
23 void *bosHandle
; /* handle for bosserver on host */
25 } cfg_host_t
, *cfg_host_p
;
28 /* Declare utility functions internal to the configuration library */
31 cfgutil_HostHandleValidate(const cfg_host_p cfg_host
, afs_status_p st
);
34 cfgutil_HostHandleBosInit(cfg_host_p cfg_host
, afs_status_p st
);
37 cfgutil_HostHandleCellNameCompatible(const cfg_host_p cfg_host
,
38 const char *cellName
);
41 cfgutil_HostNameGetFull(const char *hostName
, char *fullHostName
,
45 cfgutil_HostNameIsAlias(const char *hostName1
, const char *hostName2
,
46 short *isAlias
, afs_status_p st
);
49 cfgutil_HostNameIsLocal(const char *hostName
, short *isLocal
,
53 cfgutil_HostNameGetCellServDbAlias(const char *fsDbHost
,
55 char *hostNameAlias
, afs_status_p st
);
58 cfgutil_HostNameGetAddressString(const char *hostName
,
59 const char **hostAddr
, afs_status_p st
);
62 cfgutil_HostAddressFetchAll(const char *hostName
, int *addrCount
,
63 afs_int32
** addrList
, afs_status_p st
);
66 cfgutil_HostAddressIsValid(const char *hostName
, int hostAddr
,
67 short *isValid
, afs_status_p st
);
70 cfgutil_CleanDirectory(const char *dirName
, afs_status_p st
);
73 cfgutil_HostSetNoAuthFlag(const cfg_host_p cfg_host
, short noAuth
,
77 cfgutil_Sleep(unsigned sec
);
81 /* Service control functions */
84 cfgutil_WindowsServiceStart(LPCTSTR svcName
, DWORD svcArgc
,
85 LPCTSTR
* svcArgv
, unsigned timeout
,
86 short *wasRunning
, afs_status_p st
);
89 cfgutil_WindowsServiceStop(LPCTSTR svcName
, unsigned timeout
,
90 short *wasStopped
, afs_status_p st
);
93 cfgutil_WindowsServiceQuery(LPCTSTR svcName
, DWORD
* svcState
,
95 #endif /* AFS_NT40_ENV */
97 #endif /* OPENAFS_CFG_INTERNAL_H */