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.

200 lines
4.6 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. mdhcpapi.h
  5. Abstract:
  6. This file contains the MDHCP APIs proto-type and description. Also
  7. contains the data structures used by the MDHCP APIs.
  8. Author:
  9. Munil Shah (munils) 01-Oct-1997
  10. Environment:
  11. User Mode - Win32 - MIDL
  12. Revision History:
  13. --*/
  14. #ifndef _MDHCSAPI_H_
  15. #define _MDHCSAPI_H_
  16. #if defined(MIDL_PASS)
  17. #define LPWSTR [string] wchar_t *
  18. #endif
  19. typedef struct _DHCP_MSCOPE_INFO {
  20. LPWSTR MScopeName;
  21. LPWSTR MScopeComment;
  22. DWORD MScopeId;
  23. DWORD MScopeAddressPolicy;
  24. DHCP_HOST_INFO PrimaryHost;
  25. DHCP_SUBNET_STATE MScopeState;
  26. DWORD MScopeFlags;
  27. DATE_TIME ExpiryTime;
  28. LPWSTR LangTag;
  29. BYTE TTL;
  30. } DHCP_MSCOPE_INFO, *LPDHCP_MSCOPE_INFO;
  31. typedef struct _DHCP_MSCOPE_TABLE {
  32. DWORD NumElements;
  33. #if defined( MIDL_PASS )
  34. [ size_is( NumElements ) ]
  35. #endif;
  36. LPWSTR *pMScopeNames; // scope name
  37. } DHCP_MSCOPE_TABLE, *LPDHCP_MSCOPE_TABLE;
  38. typedef struct _DHCP_MCLIENT_INFO {
  39. DHCP_IP_ADDRESS ClientIpAddress; // currently assigned IP address.
  40. DWORD MScopeId;
  41. DHCP_CLIENT_UID ClientId;
  42. LPWSTR ClientName; // optional.
  43. DATE_TIME ClientLeaseStarts; // UTC time in FILE_TIME format.
  44. DATE_TIME ClientLeaseEnds; // UTC time in FILE_TIME format.
  45. DHCP_HOST_INFO OwnerHost; // host that distributed this IP address.
  46. DWORD AddressFlags;
  47. BYTE AddressState;
  48. } DHCP_MCLIENT_INFO, *LPDHCP_MCLIENT_INFO;
  49. typedef struct _DHCP_MCLIENT_INFO_ARRAY {
  50. DWORD NumElements;
  51. #if defined(MIDL_PASS)
  52. [size_is(NumElements)]
  53. #endif // MIDL_PASS
  54. LPDHCP_MCLIENT_INFO *Clients; // array of pointers
  55. } DHCP_MCLIENT_INFO_ARRAY, *LPDHCP_MCLIENT_INFO_ARRAY;
  56. typedef struct _MSCOPE_MIB_INFO {
  57. DWORD MScopeId;
  58. LPWSTR MScopeName;
  59. DWORD NumAddressesInuse;
  60. DWORD NumAddressesFree;
  61. DWORD NumPendingOffers;
  62. } MSCOPE_MIB_INFO, *LPMSCOPE_MIB_INFO;
  63. typedef struct _DHCP_MCAST_MIB_INFO {
  64. DWORD Discovers;
  65. DWORD Offers;
  66. DWORD Requests;
  67. DWORD Renews;
  68. DWORD Acks;
  69. DWORD Naks;
  70. DWORD Releases;
  71. DWORD Informs;
  72. DATE_TIME ServerStartTime;
  73. DWORD Scopes;
  74. #if defined(MIDL_PASS)
  75. [size_is(Scopes)]
  76. #endif // MIDL_PASS
  77. LPMSCOPE_MIB_INFO ScopeInfo; // array.
  78. } DHCP_MCAST_MIB_INFO, *LPDHCP_MCAST_MIB_INFO;
  79. // The APIs
  80. #ifndef DHCPAPI_NO_PROTOTYPES
  81. DWORD DHCP_API_FUNCTION
  82. DhcpSetMScopeInfo(
  83. DHCP_CONST WCHAR * ServerIpAddress,
  84. WCHAR * MScopeName,
  85. LPDHCP_MSCOPE_INFO MScopeInfo,
  86. BOOL NewScope
  87. );
  88. DWORD DHCP_API_FUNCTION
  89. DhcpGetMScopeInfo(
  90. DHCP_CONST WCHAR * ServerIpAddress,
  91. WCHAR * MScopeName,
  92. LPDHCP_MSCOPE_INFO *MScopeInfo
  93. );
  94. DWORD DHCP_API_FUNCTION
  95. DhcpEnumMScopes(
  96. DHCP_CONST WCHAR *ServerIpAddress,
  97. DHCP_RESUME_HANDLE *ResumeHandle,
  98. DWORD PreferredMaximum,
  99. LPDHCP_MSCOPE_TABLE *MScopeTable,
  100. DWORD *ElementsRead,
  101. DWORD *ElementsTotal
  102. );
  103. DWORD DHCP_API_FUNCTION
  104. DhcpAddMScopeElement(
  105. WCHAR * ServerIpAddress,
  106. WCHAR * MScopeName,
  107. LPDHCP_SUBNET_ELEMENT_DATA_V4 AddElementInfo
  108. );
  109. DWORD DHCP_API_FUNCTION
  110. DhcpEnumMScopeElements(
  111. WCHAR * ServerIpAddress,
  112. WCHAR * MScopeName,
  113. DHCP_SUBNET_ELEMENT_TYPE EnumElementType,
  114. DHCP_RESUME_HANDLE *ResumeHandle,
  115. DWORD PreferredMaximum,
  116. LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *EnumElementInfo,
  117. DWORD *ElementsRead,
  118. DWORD *ElementsTotal
  119. );
  120. DWORD DHCP_API_FUNCTION
  121. DhcpRemoveMScopeElement(
  122. WCHAR * ServerIpAddress,
  123. WCHAR * MScopeName,
  124. LPDHCP_SUBNET_ELEMENT_DATA_V4 RemoveElementInfo,
  125. DHCP_FORCE_FLAG ForceFlag
  126. );
  127. DWORD DHCP_API_FUNCTION
  128. DhcpDeleteMScope(
  129. WCHAR * ServerIpAddress,
  130. WCHAR * MScopeName,
  131. DHCP_FORCE_FLAG ForceFlag
  132. );
  133. DWORD DHCP_API_FUNCTION
  134. DhcpGetMClientInfo(
  135. WCHAR * ServerIpAddress,
  136. LPDHCP_SEARCH_INFO SearchInfo,
  137. LPDHCP_MCLIENT_INFO *ClientInfo
  138. );
  139. DWORD DHCP_API_FUNCTION
  140. DhcpDeleteMClientInfo(
  141. WCHAR * ServerIpAddress,
  142. LPDHCP_SEARCH_INFO ClientInfo
  143. );
  144. DWORD DHCP_API_FUNCTION
  145. DhcpEnumMScopeClients(
  146. WCHAR * ServerIpAddress,
  147. WCHAR * MScopeName,
  148. DHCP_RESUME_HANDLE *ResumeHandle,
  149. DWORD PreferredMaximum,
  150. LPDHCP_MCLIENT_INFO_ARRAY *ClientInfo,
  151. DWORD *ClientsRead,
  152. DWORD *ClientsTotal
  153. );
  154. DWORD DHCP_API_FUNCTION
  155. DhcpScanMDatabase(
  156. DHCP_CONST WCHAR *ServerIpAddress,
  157. WCHAR * MScopeName,
  158. DWORD FixFlag,
  159. LPDHCP_SCAN_LIST *ScanList
  160. );
  161. DWORD DHCP_API_FUNCTION
  162. DhcpGetMCastMibInfo(
  163. DHCP_CONST WCHAR *ServerIpAddress,
  164. LPDHCP_MCAST_MIB_INFO *MibInfo
  165. );
  166. #endif DHCPAPI_NO_PROTOTYPES
  167. #endif _MDHCSAPI_H_