VirtualBox

source: vbox/trunk/include/VBox/VBoxNetCfg-win.h@ 36528

Last change on this file since 36528 was 36487, checked in by vboxsync, 14 years ago

netflt/adp/win: switch to new VBoxDrvCfg lib

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
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
43RT_C_DECLS_BEGIN
44
45VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinQueryINetCfg(OUT INetCfg **ppNetCfg,
46 IN BOOL fGetWriteLock,
47 IN LPCWSTR pszwClientDescription,
48 IN DWORD cmsTimeout,
49 OUT LPWSTR *ppszwClientDescription);
50VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinReleaseINetCfg(IN INetCfg *pNetCfg, IN BOOL fHasWriteLock);
51VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGetComponentByGuid(IN INetCfg *pNc, IN const GUID *pguidClass, IN const GUID * pComponentGuid, OUT INetCfgComponent **ppncc);
52
53VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetFltInstall(IN INetCfg *pNc, IN LPCWSTR * apInfFullPaths, IN UINT cInfFullPaths);
54VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinNetFltUninstall(IN INetCfg *pNc);
55
56VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinCreateHostOnlyNetworkInterface (IN LPCWSTR pInfPath, IN bool bIsInfPathFile,
57 OUT GUID *pGuid, OUT BSTR *lppszName, OUT BSTR *pErrMsg);
58VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveHostOnlyNetworkInterface (IN const GUID *pGUID, OUT BSTR *pErrMsg);
59VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinRemoveAllNetDevicesOfId(IN LPCWSTR lpszPnPId);
60
61VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGenHostOnlyNetworkNetworkIp(OUT PULONG pNetIp, OUT PULONG pNetMask);
62
63typedef struct _ADAPTER_SETTINGS
64{
65 ULONG ip;
66 ULONG mask;
67 BOOL bDhcp;
68}ADAPTER_SETTINGS, *PADAPTER_SETTINGS;
69
70VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnableStaticIpConfig(IN const GUID *pGuid, IN ULONG ip, IN ULONG mask);
71VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinGetAdapterSettings(IN const GUID * pGuid, OUT PADAPTER_SETTINGS pSettings);
72VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinEnableDynamicIpConfig(IN const GUID *pGuid);
73VBOXNETCFGWIN_DECL(HRESULT) VBoxNetCfgWinDhcpRediscover(IN const GUID *pGuid);
74
75
76typedef VOID (*LOG_ROUTINE) (LPCSTR szString);
77VBOXNETCFGWIN_DECL(VOID) VBoxNetCfgWinSetLogging(IN LOG_ROUTINE pfnLog);
78
79RT_C_DECLS_END
80
81/** @} */
82
83#endif /* #ifndef ___VBoxNetCfg_win_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette