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