bozo: Introduce bnode_Wait()
[openafs.git] / src / WINNT / install / loopback / loopbackutils.h
1 /*
2
3 Copyright 2004 by the Massachusetts Institute of Technology
4
5 All rights reserved.
6
7 Permission to use, copy, modify, and distribute this software and its
8 documentation for any purpose and without fee is hereby granted,
9 provided that the above copyright notice appear in all copies and that
10 both that copyright notice and this permission notice appear in
11 supporting documentation, and that the name of the Massachusetts
12 Institute of Technology (M.I.T.) not be used in advertising or publicity
13 pertaining to distribution of the software without specific, written
14 prior permission.
15
16 M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18 M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 SOFTWARE.
23
24 */
25
26 #ifdef  __cplusplus
27 extern "C" {
28 #endif
29 DWORD InstallLoopBack(LPCTSTR pConnectionName, LPCTSTR ip, LPCTSTR mask);
30 BOOL IsLoopbackInstalled(void);
31 DWORD UnInstallLoopBack(void);
32 int RenameConnection(PCWSTR GuidString, PCWSTR pszNewName);
33 DWORD SetIpAddress(LPCWSTR guid, LPCWSTR ip, LPCWSTR mask);
34 HRESULT LoopbackBindings (LPCWSTR loopback_guid);
35 BOOL UpdateHostsFile( LPCWSTR swName, LPCWSTR swIp, LPCSTR szFilename, BOOL bPre );
36 void ReportMessage(int level, LPCSTR msg, LPCSTR str, LPCWSTR wstr, DWORD dw);
37 void SetMsiReporter(LPCSTR strAction, LPCSTR strDesc, DWORD h);
38 #ifdef  __cplusplus
39 }
40 #endif
41
42 #define DRIVER_DESC "Microsoft Loopback Adapter"
43 #define DRIVER _T("loopback")
44 #define DRIVERHWID _T("*msloop")
45 #define MANUFACTURE _T("microsoft")
46 #define DEFAULT_NAME _T("AFS")
47 #define DEFAULT_IP _T("10.254.254.253")
48 #define DEFAULT_MASK _T("255.255.255.252")
49
50 #ifdef USE_PAUSE
51 #define PAUSE                                          \
52     do {                                               \
53         char c;                                        \
54         printf("PAUSED - PRESS ENTER TO CONTINUE\n");  \
55         scanf("%c", &c);                               \
56     } while(0)
57 #else
58 #define PAUSE
59 #endif
60
61 /*#define USE_SLEEP*/
62
63 #ifdef USE_SLEEP
64 #define SLEEP Sleep(10*1000)
65 #else
66 #define SLEEP
67 #endif
68
69 /* Reporting mechanisms */
70 #define REPORT_PRINTF 1
71 #define REPORT_MSI 2
72 #define REPORT_IGNORE 3
73
74 extern DWORD dwReporterType;
75 extern DWORD hMsiHandle;