Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.2 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: param.h
  4. //
  5. // Module: WLBS API
  6. //
  7. // Description: Function here are used by API internally and by notifier object
  8. // externally
  9. //
  10. // Copyright (C) Microsoft Corporation. All rights reserved.
  11. //
  12. // Author: fengsun Created 3/9/00
  13. //
  14. //+----------------------------------------------------------------------------
  15. #pragma once
  16. #include "wlbsconfig.h"
  17. #define WLBS_FIELD_LOW 0
  18. #define WLBS_FIELD_HIGH 255
  19. #define WLBS_IP_FIELD_ZERO_LOW 1
  20. #define WLBS_IP_FIELD_ZERO_HIGH 223
  21. bool WINAPI ParamReadReg
  22. (
  23. const GUID& AdapterGuid, /* IN - Adapter GUID */
  24. PWLBS_REG_PARAMS reg_data, /* OUT - Registry parameters */
  25. bool fUpgradeFromWin2k = false,
  26. bool *pfPortRulesInBinaryForm = NULL
  27. );
  28. bool WINAPI ParamValidate
  29. (
  30. PWLBS_REG_PARAMS paramp /* IN OUT - Registry parameters */
  31. );
  32. bool WINAPI ParamWriteReg
  33. (
  34. const GUID& AdapterGuid, /* IN - Adapter GUID */
  35. PWLBS_REG_PARAMS reg_data /* IN - Registry parameters */
  36. );
  37. bool WINAPI ParamDeleteReg
  38. (
  39. const GUID& AdapterGuid, /* IN - Adapter GUID */
  40. bool fDeleteObsoleteEntries = false
  41. );
  42. DWORD WINAPI ParamSetDefaults(PWLBS_REG_PARAMS reg_data);
  43. bool WINAPI RegChangeNetworkAddress(const GUID& AdapterGuid, const WCHAR* mac_address, BOOL fRemove);
  44. void WINAPI NotifyAdapterAddressChange (const WCHAR * driver_name);
  45. void WINAPI GetDriverNameFromGUID (const GUID & AdapterGuid, OUT TCHAR * driver_name, DWORD size);
  46. void WINAPI NotifyAdapterPropertyChange (const WCHAR * driver_name, DWORD eventFlag);
  47. DWORD WINAPI NotifyDriverConfigChanges(HANDLE hDeviceWlbs, const GUID& AdapterGuid);
  48. bool WINAPI RegReadAdapterIp(const GUID& AdapterGuid,
  49. OUT DWORD& dwClusterIp, OUT DWORD& dwDedicatedIp);
  50. HKEY WINAPI RegOpenWlbsSetting(const GUID& AdapterGuid, bool fReadOnly = false);
  51. DWORD WINAPI IpAddressFromAbcdWsz(IN const WCHAR* wszIpAddress);
  52. VOID WINAPI AbcdWszFromIpAddress(IN DWORD IpAddress, OUT WCHAR* wszIpAddress);
  53. /* Copied largely from net/config/netcfg/tcpipcfg/ and defined in utils.cpp */
  54. extern BOOL IsValidIPAddressSubnetMaskPair(PCWSTR szIp, PCWSTR szSubnet);
  55. extern BOOL IsContiguousSubnetMask(PCWSTR pszSubnet);