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