Leaked source code of windows server 2003
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.

131 lines
3.3 KiB

  1. /*++
  2. Copyright(c) 2001 Microsoft Corporation
  3. Module Name:
  4. NLB Manager
  5. File Name:
  6. nlbclient.h
  7. Abstract:
  8. Header file for NLB client-side WMI utility functions to configure
  9. an NLB host.
  10. Lib which implements the functionality is in
  11. nlbmgr\nlbclientlib.
  12. History:
  13. 07/23/01 JosephJ Created (used to be nlbmgr\provider\tests\nlbhost.h)
  14. --*/
  15. typedef struct
  16. {
  17. LPCWSTR szMachine; // Must be non-NULL
  18. LPCWSTR szUserName; // NULL == use current
  19. LPCWSTR szPassword; // NULL == use current
  20. } WMI_CONNECTION_INFO, *PWMI_CONNECTION_INFO;
  21. //
  22. // Specify this value for hashed remote control pwd
  23. //
  24. #define INVALID_HASHED_REMOTE_CONTROL_PASSWORD_VALUE 1783995a
  25. typedef
  26. VOID
  27. (*PFN_LOGGER)(
  28. PVOID Context,
  29. const WCHAR * Text
  30. );
  31. VOID
  32. NlbHostFake(
  33. VOID)
  34. ;
  35. /*
  36. Makes the NlbHostXXX apis operate in "fake mode", where they don't
  37. actually connect to any real machines.
  38. */
  39. WBEMSTATUS
  40. NlbHostGetConfiguration(
  41. IN PWMI_CONNECTION_INFO pConnInfo, // NULL implies local
  42. IN LPCWSTR szNicGuid,
  43. OUT PNLB_EXTENDED_CLUSTER_CONFIGURATION pCurrentCfg
  44. );
  45. WBEMSTATUS
  46. NlbHostGetCompatibleNics(
  47. IN PWMI_CONNECTION_INFO pConnInfo, // NULL implies local
  48. OUT LPWSTR **ppszNics, // free using delete
  49. OUT UINT *pNumNics, // free using delete
  50. OUT UINT *pNumBoundToNlb
  51. );
  52. WBEMSTATUS
  53. NlbHostGetMachineIdentification(
  54. IN PWMI_CONNECTION_INFO pConnInfo, // NULL implies local
  55. OUT LPWSTR *pszMachineName, // free using delete
  56. OUT LPWSTR *pszMachineGuid, OPTIONAL // free using delete -- may be null
  57. OUT BOOL *pfNlbMgrProviderInstalled // If nlb manager provider is installed.
  58. );
  59. WBEMSTATUS
  60. NlbHostDoUpdate(
  61. IN PWMI_CONNECTION_INFO pConnInfo, // NULL implies local
  62. IN LPCWSTR szNicGuid,
  63. IN LPCWSTR szClientDescription,
  64. IN PNLB_EXTENDED_CLUSTER_CONFIGURATION pNewState,
  65. OUT UINT *pGeneration,
  66. OUT WCHAR **ppLog // free using delete operator.
  67. );
  68. WBEMSTATUS
  69. NlbHostGetUpdateStatus(
  70. IN PWMI_CONNECTION_INFO pConnInfo, // NULL implies local
  71. IN LPCWSTR szNicGuid,
  72. IN UINT Generation,
  73. OUT WBEMSTATUS *pCompletionStatus,
  74. OUT WCHAR **ppLog // free using delete operator.
  75. );
  76. WBEMSTATUS
  77. NlbHostControlCluster(
  78. IN PWMI_CONNECTION_INFO pConnInfo,
  79. IN LPCWSTR szNicGuid,
  80. IN LPCWSTR szVip,
  81. IN DWORD *pdwPortNum,
  82. IN WLBS_OPERATION_CODES Operation,
  83. OUT DWORD *pdwOperationStatus,
  84. OUT DWORD *pdwClusterOrPortStatus,
  85. OUT DWORD *pdwHostMap
  86. );
  87. WBEMSTATUS
  88. NlbHostGetClusterMembers(
  89. IN PWMI_CONNECTION_INFO pConnInfo,
  90. IN LPCWSTR szNicGuid,
  91. OUT DWORD *pNumMembers,
  92. OUT NLB_CLUSTER_MEMBER_INFO **ppMembers // free using delete[]
  93. );
  94. //
  95. // Attempts to resolve the ip address and ping the host.
  96. //
  97. WBEMSTATUS
  98. NlbHostPing(
  99. LPCWSTR szBindString,
  100. UINT Timeout, // In milliseconds.
  101. OUT ULONG *pResolvedIpAddress // in network byte order.
  102. );