winnt-dont-display-ibm-legal-message-20040326
[openafs.git] / src / WINNT / afsreg / afsreg.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 AFSREG_H_
11 #define AFSREG_H_
12
13 /* Registry keys and values accessed by AFS server processes and
14  * the AFS software installation and configuration utilities.
15  */
16
17 #define AFSREG_NULL_KEY  ((HKEY)0)
18
19 #define AFSREG_SVR_SVC_NAME  "TransarcAFSServer"
20 #define AFSREG_SVR_SW_NAME   "AFS Server"
21
22 #define AFSREG_CLT_SVC_NAME  "TransarcAFSDaemon"
23 #define AFSREG_CLT_SW_NAME   "AFS Client"
24
25
26
27 /* ---- NT system configuration information ---- */
28
29 /* TCP/IP registry keys and values of interest:
30  *
31  * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
32  *
33  *     Tcpip\Linkage
34  *         Bind:REG_MULTI_SZ:<interface adapter list>
35  *
36  *     <adapter name>\Parameters\Tcpip
37  *         IPAddress:REG_MULTI_SZ:<list of dotted decimal IP addresses>
38  *         SubnetMask:REG_MULTI_SZ:<list of dotted decimal IP address masks>
39  *         DhcpIPAddress:REG_SZ:<dotted decimal IP address>
40  *         DhcpSubnetMask:REG_SZ:<dotted decimal IP address mask>
41  */
42
43 #define AFSREG_IPSRV_KEY \
44 "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services"
45
46 /* Adapter list subkey  and subkey values */
47 #define AFSREG_IPSRV_IFACELIST_SUBKEY         "Tcpip\\Linkage"
48 #define AFSREG_IPSRV_IFACELIST_BIND_VALUE     "Bind"
49
50 /* Per-adapter subkey and subkey values */
51 #define AFSREG_IPSRV_ADAPTER_PARAM_SUBKEY          "Parameters\\Tcpip"
52 #define AFSREG_IPSRV_ADAPTER_PARAM_ADDR_VALUE      "IPAddress"
53 #define AFSREG_IPSRV_ADAPTER_PARAM_MASK_VALUE      "SubnetMask"
54 #define AFSREG_IPSRV_ADAPTER_PARAM_DHCPADDR_VALUE  "DhcpIPAddress"
55 #define AFSREG_IPSRV_ADAPTER_PARAM_DHCPMASK_VALUE  "DhcpSubnetMask"
56
57 /*
58  * Event logging registry keys and values of interest:
59  *
60  * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
61  *
62  *     Application\AFSREG_SVR_APPLOG_SUBKEY
63  *         EventMessageFile:REG_EXPAND_SZ:<AFS event message file path>
64  *         TypesSupported:REG_DWORD:<EVENTLOG_ERROR_TYPE |
65  *                                   EVENTLOG_WARNING_TYPE |
66  *                                   EVENTLOG_INFORMATION_TYPE>
67  */
68
69 #define AFSREG_APPLOG_KEY \
70 "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\EventLog\\Application"
71
72 /* AFS event source subkey and subkey values -- client and server services */
73 #define AFSREG_SVR_APPLOG_SUBKEY         "AFS Service"
74 #define AFSREG_SVR_APPLOG_MSGFILE_VALUE  "EventMessageFile"
75 #define AFSREG_SVR_APPLOG_MSGTYPE_VALUE  "TypesSupported"
76
77
78
79
80 /* ---- AFS software configuration information ---- */
81
82 /* HKEY_LOCAL_MACHINE\SOFTWARE\TransarcCorporation\AFSREG_SVR_SW_NAME
83  *
84  *     CurrentVersion
85  *         PathName:REG_SZ:<AFS installation directory>
86  *         MajorVersion:REG_DWORD:<major version number>
87  *         MinorVersion:REG_DWORD:<minor version number>
88  *         PatchLevel:REG_DWORD:<patch level>
89  */
90
91 #define AFSREG_SVR_SW_KEY \
92 "HKEY_LOCAL_MACHINE\\Software\\TransarcCorporation\\" AFSREG_SVR_SW_NAME
93
94 #define AFSREG_SVR_SW_VERSION_KEY  AFSREG_SVR_SW_KEY "\\CurrentVersion"
95
96 /* AFSREG_SVR_SW_VERSION_KEY values */
97 #define AFSREG_SVR_SW_VERSION_DIR_VALUE   "PathName"
98 #define AFSREG_SVR_SW_VERSION_MAJOR_VALUE    "MajorVersion"
99 #define AFSREG_SVR_SW_VERSION_MINOR_VALUE    "MinorVersion"
100 #define AFSREG_SVR_SW_VERSION_PATCH_VALUE    "PatchLevel"
101
102
103 /* HKEY_LOCAL_MACHINE\SOFTWARE\TransarcCorporation\AFSREG_CLT_SW_NAME
104  *
105  *     CurrentVersion
106  *         PathName:REG_SZ:<AFS installation directory>
107  *         MajorVersion:REG_DWORD:<major version number>
108  *         MinorVersion:REG_DWORD:<minor version number>
109  *         PatchLevel:REG_DWORD:<patch level>
110  */
111
112 #define AFSREG_CLT_SW_KEY \
113 "HKEY_LOCAL_MACHINE\\Software\\TransarcCorporation\\" AFSREG_CLT_SW_NAME
114
115 #define AFSREG_CLT_SW_VERSION_KEY  AFSREG_CLT_SW_KEY "\\CurrentVersion"
116
117 /* AFSREG_CLT_SW_VERSION_KEY values */
118 #define AFSREG_CLT_SW_VERSION_DIR_VALUE   "PathName"
119 #define AFSREG_CLT_SW_VERSION_MAJOR_VALUE    "MajorVersion"
120 #define AFSREG_CLT_SW_VERSION_MINOR_VALUE    "MinorVersion"
121 #define AFSREG_CLT_SW_VERSION_PATCH_VALUE    "PatchLevel"
122
123
124
125 /* ---- AFS service configuration information ---- */
126
127 /* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFSREG_SVR_SVC_NAME
128  *
129  *     DisplayName:REG_SZ:<service display name>
130  *     ImagePath:REG_EXPAND_SZ:<service binary path>
131  *
132  *     Afstab
133  *         <vice partition name>
134  *             DeviceName:REG_SZ:<device hosting device partition>
135  */
136
137 #define AFSREG_SVR_SVC_DISPLAYNAME_DATA  "IBM AFS Server"
138 #define AFSREG_SVR_SVC_IMAGENAME_DATA "bosctlsvc.exe"
139
140
141 #define AFSREG_SVR_SVC_KEY \
142 "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\" AFSREG_SVR_SVC_NAME
143
144 #define AFSREG_SVR_SVC_AFSTAB_KEY   AFSREG_SVR_SVC_KEY "\\Afstab"
145
146 /* AFSREG_SVR_SVC_AFSTAB_KEY partition subkey values */
147 #define AFSREG_SVR_SVC_AFSTAB_DEVNAME_VALUE      "DeviceName"
148
149
150 /* HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFSREG_CLT_SVC_NAME
151  *
152  *     DisplayName:REG_SZ:<service display name>
153  *     ImagePath:REG_EXPAND_SZ:<service binary path>
154  *
155  *     Parameters
156  *         Cell:REG_SZ:<client cell>
157  */
158
159 #define AFSREG_CLT_SVC_DISPLAYNAME_DATA  "IBM AFS Client"
160 #define AFSREG_CLT_SVC_IMAGENAME_DATA "afsd_service.exe"
161
162
163 #define AFSREG_CLT_SVC_KEY \
164 "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\" AFSREG_CLT_SVC_NAME
165
166 #define AFSREG_CLT_SVC_PARAM_KEY   AFSREG_CLT_SVC_KEY "\\Parameters"
167
168 /* AFSREG_CLT_SVC_PARAM_KEY values */
169 #define AFSREG_CLT_SVC_PARAM_CELL_VALUE      "Cell"
170
171
172
173
174
175 /* Extended (alternative) versions of registry access functions */
176
177 #ifdef __cplusplus
178 extern "C" {
179 #endif
180
181 typedef enum {
182     REGENTRY_KEY,
183     REGENTRY_VALUE
184 } regentry_t;
185
186 extern long
187 RegOpenKeyAlt(HKEY key,
188               const char *subKeyName,
189               DWORD mode,
190               int create,
191               HKEY *resultKeyP,
192               DWORD *resultKeyDispP);
193
194 extern long
195 RegQueryValueAlt(HKEY key,
196                  const char *valueName,
197                  DWORD *dataTypeP,
198                  void **dataPP,
199                  DWORD *dataSizeP);
200
201 extern long
202 RegEnumKeyAlt(HKEY key,
203               char **subkeyNames);
204
205 extern long
206 RegDeleteKeyAlt(HKEY key,
207                 const char *subKeyName);
208
209 extern long
210 RegDeleteEntryAlt(const char *entryName,
211                   regentry_t entryType);
212
213 extern long
214 RegDupKeyAlt(const char *sourceKey,
215              const char *targetKey);
216
217 #ifdef __cplusplus
218 };
219 #endif
220
221 #endif /* AFSREG_H_ */