1 | /* $Id: VBoxNetCfg-win.h 36487 2011-04-01 08:21:30Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxNetCfg-win.h - Network Configuration API for Windows platforms.
|
---|
4 | */
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2011 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | */
|
---|
16 | #ifndef ___VBoxNetCfg_win_h___
|
---|
17 | #define ___VBoxNetCfg_win_h___
|
---|
18 |
|
---|
19 | #include <winsock2.h>
|
---|
20 | #include <Windows.h>
|
---|
21 | #include <Netcfgn.h>
|
---|
22 | #include <Setupapi.h>
|
---|
23 | #include <iprt/cdefs.h>
|
---|
24 |
|
---|
25 | /** @defgroup grp_vboxnetcfgwin The Windows Network Configration Library
|
---|
26 | * @{ */
|
---|
27 |
|
---|
28 | /** @def VBOXNETCFGWIN_DECL
|
---|
29 | * The usual declaration wrapper.
|
---|
30 | */
|
---|
31 | #if 0
|
---|
32 | /* enable this in case we include this in a dll*/
|
---|
33 | # ifdef IN_VBOXDDU
|
---|
34 | # define VBOXNETCFGWIN_DECL(_type) DECLEXPORT(_type)
|
---|
35 | # else
|
---|
36 | # define VBOXNETCFGWIN_DECL(_type) DECLIMPORT(_type)
|
---|
37 | # endif
|
---|
38 | #else
|
---|
39 | /*enable this in case we include this in a static lib*/
|
---|
40 | # define VBOXNETCFGWIN_DECL(_type) _type
|
---|
41 | #endif
|
---|
42 |
|
---|
43 | RT_C_DECLS_BEGIN
|
---|
44 |
|
---|
45 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinQueryINetCfg(OUT INetCfg **ppNetCfg,
|
---|
46 | IN BOOL fGetWriteLock,
|
---|
47 | IN LPCWSTR pszwClientDescription,
|
---|
48 | IN DWORD cmsTimeout,
|
---|
49 | OUT LPWSTR *ppszwClientDescription);
|
---|
50 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinReleaseINetCfg(IN INetCfg *pNetCfg, IN BOOL fHasWriteLock);
|
---|
51 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGetComponentByGuid(IN INetCfg *pNc, IN const GUID *pguidClass, IN const GUID * pComponentGuid, OUT INetCfgComponent **ppncc);
|
---|
52 |
|
---|
53 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetFltInstall(IN INetCfg *pNc, IN LPCWSTR * apInfFullPaths, IN UINT cInfFullPaths);
|
---|
54 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetFltUninstall(IN INetCfg *pNc);
|
---|
55 |
|
---|
56 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinCreateHostOnlyNetworkInterface (IN LPCWSTR pInfPath, IN bool bIsInfPathFile,
|
---|
57 | OUT GUID *pGuid, OUT BSTR *lppszName, OUT BSTR *pErrMsg);
|
---|
58 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface (IN const GUID *pGUID, OUT BSTR *pErrMsg);
|
---|
59 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveAllNetDevicesOfId(IN LPCWSTR lpszPnPId);
|
---|
60 |
|
---|
61 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostOnlyNetworkNetworkIp(OUT PULONG pNetIp, OUT PULONG pNetMask);
|
---|
62 |
|
---|
63 | typedef struct _ADAPTER_SETTINGS
|
---|
64 | {
|
---|
65 | ULONG ip;
|
---|
66 | ULONG mask;
|
---|
67 | BOOL bDhcp;
|
---|
68 | }ADAPTER_SETTINGS, *PADAPTER_SETTINGS;
|
---|
69 |
|
---|
70 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnableStaticIpConfig(IN const GUID *pGuid, IN ULONG ip, IN ULONG mask);
|
---|
71 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGetAdapterSettings(IN const GUID * pGuid, OUT PADAPTER_SETTINGS pSettings);
|
---|
72 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnableDynamicIpConfig(IN const GUID *pGuid);
|
---|
73 | VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinDhcpRediscover(IN const GUID *pGuid);
|
---|
74 |
|
---|
75 |
|
---|
76 | typedef VOID (*LOG_ROUTINE) (LPCSTR szString);
|
---|
77 | VBOXNETCFGWIN_DECL(VOID) VBoxNetCfgWinSetLogging(IN LOG_ROUTINE pfnLog);
|
---|
78 |
|
---|
79 | RT_C_DECLS_END
|
---|
80 |
|
---|
81 | /** @} */
|
---|
82 |
|
---|
83 | #endif /* #ifndef ___VBoxNetCfg_win_h___ */
|
---|