0067a7cedd503c9d503458e21c5af8ecb7a9ff1d
[openafs.git] / src / WINNT / afsd / afsd.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 __AFSD_H_ENV__
11 #define __AFSD_H_ENV__ 1
12
13 #define USE_BPLUS 1
14
15 #include <afs/param.h>
16
17 BOOL InitClass(HANDLE);
18 BOOL InitInstance(HANDLE, int);
19
20 LONG APIENTRY MainWndProc(HWND, unsigned int, unsigned int, long);
21 BOOL APIENTRY About(HWND, unsigned int, unsigned int, long);
22
23 #include <nb30.h>
24
25 #include "cm.h"
26
27 #include <osi.h>
28 #include <afs/vldbint.h>
29 #include <afs/afsint.h>
30 #include <afs/prs_fs.h>
31
32 #include "cm_config.h"
33 #include "cm_user.h"
34 #include "cm_scache.h"
35 #include "cm_callback.h"
36 #ifdef DISKCACHE95
37 #include "cm_diskcache95.h"
38 #endif /* DISKCACHE95 */
39 #include "cm_conn.h"
40 #include "cm_aclent.h"
41 #include "cm_server.h"
42 #include "cm_cell.h"
43 #include "cm_volstat.h"
44 #include "cm_volume.h"
45 #include "cm_dcache.h"
46 #include "cm_access.h"
47 #include "cm_utils.h"
48 #include "cm_vnodeops.h"
49 #include "cm_dir.h"
50 #include "cm_btree.h"
51 #include "cm_daemon.h"
52 #include "cm_ioctl.h"
53 #include "cm_dnlc.h"
54 #include "cm_buf.h"
55 #include "cm_memmap.h"
56 #include "cm_freelance.h"
57 #include "cm_performance.h"
58 #include "cm_nls.h"
59 #include "smb_ioctl.h"
60 #include "afsd_init.h"
61 #include "afsd_eventlog.h"
62
63
64 #define AFS_DAEMON_SERVICE_NAME AFSREG_CLT_SVC_NAME
65 #define AFS_DAEMON_EVENT_NAME   AFSREG_CLT_SW_NAME
66
67 void afs_exit();
68
69 extern void afsi_log(char *pattern, ...);
70
71 /* globals from the base afsd */
72
73 extern int cm_logChunkSize;
74 extern int cm_chunkSize;
75
76 extern cm_volume_t *cm_rootVolumep;
77
78 extern cm_cell_t *cm_rootCellp;
79
80 extern cm_fid_t cm_rootFid;
81
82 extern cm_scache_t *cm_rootSCachep;
83
84 extern osi_log_t *afsd_logp;
85
86 extern char cm_mountRoot[];
87 extern DWORD cm_mountRootLen;
88
89 extern char cm_CachePath[];
90
91 extern BOOL isGateway;
92
93 extern BOOL reportSessionStartups;
94
95 #ifdef AFS_FREELANCE_CLIENT
96 extern char *cm_FakeRootDir;                            // the fake root.afs directory
97
98 extern int cm_noLocalMountPoints;                       // no. of fake mountpoints
99
100 extern cm_localMountPoint_t* cm_localMountPoints;       // array of fake mountpoints
101
102 extern int cm_fakeDirSize;                              // size (in bytes) of fake root.afs directory
103
104 extern int cm_fakeDirCallback;                          // state of the fake root.afs directory. indicates
105                                                         // if it needs to be refreshed
106
107 extern int cm_fakeGettingCallback;                      // 1 if currently updating the fake root.afs directory,
108                                                         // 0 otherwise
109 #endif /* AFS_FREELANCE_CLIENT */
110
111 extern int cm_dnsEnabled;
112 extern int cm_freelanceEnabled;
113
114 extern long rx_mtu;
115
116 extern HANDLE WaitToTerminate;
117
118 #define DFS_SUPPORT 1
119 #define LOG_PACKET 1
120 #undef  NOTSERVICE
121 #define LOCK_TESTING 1
122
123 #define WORKER_THREADS 10
124
125 #define AFSD_HOOK_DLL  "afsdhook.dll"
126 #define AFSD_INIT_HOOK "AfsdInitHook"
127 typedef BOOL ( APIENTRY * AfsdInitHook )(void);
128 #define AFSD_RX_STARTED_HOOK "AfsdRxStartedHook"
129 typedef BOOL ( APIENTRY * AfsdRxStartedHook )(void);
130 #define AFSD_SMB_STARTED_HOOK "AfsdSmbStartedHook"
131 typedef BOOL ( APIENTRY * AfsdSmbStartedHook )(void);
132 #define AFSD_STARTED_HOOK "AfsdStartedHook"
133 typedef BOOL ( APIENTRY * AfsdStartedHook )(void);
134 #define AFSD_DAEMON_HOOK "AfsdDaemonHook"
135 typedef BOOL ( APIENTRY * AfsdDaemonHook )(void);
136 #define AFSD_STOPPING_HOOK "AfsdStoppingHook"
137 typedef BOOL ( APIENTRY * AfsdStoppingHook )(void);
138 #define AFSD_STOPPED_HOOK "AfsdStoppedHook"
139 typedef BOOL ( APIENTRY * AfsdStoppedHook )(void);
140
141 #define SERVICE_CONTROL_CUSTOM_DUMP 128
142 #endif /* AFSD_H_ENV */