new-loopback-dll-20040622
[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 #ifdef  __cplusplus
37 }
38 #endif
39
40 #define DRIVER_DESC "Microsoft Loopback Adapter"
41 #define DRIVER _T("loopback")
42 #define MANUFACTURE _T("microsoft")
43 #define DEFAULT_NAME _T("AFS")
44 #define DEFAULT_IP _T("10.254.254.253")
45 #define DEFAULT_MASK _T("255.255.255.252")
46
47 #ifdef USE_PAUSE
48 #define PAUSE                                          \
49     do {                                               \
50         char c;                                        \
51         printf("PAUSED - PRESS ENTER TO CONTINUE\n");  \
52         scanf("%c", &c);                               \
53     } while(0)
54 #else
55 #define PAUSE
56 #endif
57
58 /*#define USE_SLEEP*/
59
60 #ifdef USE_SLEEP
61 #define SLEEP Sleep(10*1000)
62 #else
63 #define SLEEP
64 #endif
65