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.

455 lines
10 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. dhcpsrv.idl
  5. Abstract:
  6. Contains the DHCP Server Service API.
  7. Also contains the RPC specific data structures for these API.
  8. Author:
  9. Madan Appiah (madana) 10-Sep-1993
  10. Environment:
  11. User Mode - Win32 - MIDL
  12. Revision History:
  13. Cheng Yang (t-cheny) 12-Jun-1996 superscope
  14. Cheng Yang (t-cheny) 17-Jul-1996 vendor specific information
  15. Notes:
  16. Do not change this interface!!! The stub code produced by this interface
  17. has been hand modified and checked in to fix bug #66798. If you need to
  18. add new functions, create a v2 interface. See #66798 for details.
  19. --*/
  20. //
  21. // Interface Attributes
  22. //
  23. [
  24. uuid(6BFFD098-A112-3610-9833-46C3F874532D),
  25. version(1.0),
  26. pointer_default(unique)
  27. ]
  28. //
  29. // Interface Keyword
  30. //
  31. interface dhcpsrv
  32. //
  33. // Interface Body
  34. //
  35. {
  36. import "imports.idl";
  37. //
  38. // ---------------------------------------------------------------//
  39. //
  40. typedef [handle] LPWSTR DHCP_SRV_HANDLE;
  41. //
  42. // DHCP Server APIs
  43. //
  44. //
  45. // Subnet APIs
  46. //
  47. DWORD
  48. R_DhcpCreateSubnet(
  49. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  50. [in] DHCP_IP_ADDRESS SubnetAddress,
  51. [in, ref] LPDHCP_SUBNET_INFO SubnetInfo
  52. );
  53. DWORD
  54. R_DhcpSetSubnetInfo(
  55. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  56. [in] DHCP_IP_ADDRESS SubnetAddress,
  57. [in, ref] LPDHCP_SUBNET_INFO SubnetInfo
  58. );
  59. DWORD
  60. R_DhcpGetSubnetInfo(
  61. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  62. [in] DHCP_IP_ADDRESS SubnetAddress,
  63. [out] LPDHCP_SUBNET_INFO *SubnetInfo
  64. );
  65. DWORD
  66. R_DhcpEnumSubnets(
  67. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  68. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  69. [in] DWORD PreferredMaximum,
  70. [out] LPDHCP_IP_ARRAY *EnumInfo,
  71. [out] DWORD *ElementsRead,
  72. [out] DWORD *ElementsTotal
  73. );
  74. DWORD
  75. R_DhcpAddSubnetElement(
  76. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  77. [in] DHCP_IP_ADDRESS SubnetAddress,
  78. [in, ref] LPDHCP_SUBNET_ELEMENT_DATA AddElementInfo
  79. );
  80. DWORD
  81. R_DhcpEnumSubnetElements(
  82. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  83. [in] DHCP_IP_ADDRESS SubnetAddress,
  84. [in] DHCP_SUBNET_ELEMENT_TYPE EnumElementType,
  85. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  86. [in] DWORD PreferredMaximum,
  87. [out] LPDHCP_SUBNET_ELEMENT_INFO_ARRAY *EnumElementInfo,
  88. [out] DWORD *ElementsRead,
  89. [out] DWORD *ElementsTotal
  90. );
  91. DWORD
  92. R_DhcpRemoveSubnetElement(
  93. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  94. [in] DHCP_IP_ADDRESS SubnetAddress,
  95. [in, ref] LPDHCP_SUBNET_ELEMENT_DATA RemoveElementInfo,
  96. [in] DHCP_FORCE_FLAG ForceFlag
  97. );
  98. DWORD
  99. R_DhcpDeleteSubnet(
  100. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  101. [in] DHCP_IP_ADDRESS SubnetAddress,
  102. [in] DHCP_FORCE_FLAG ForceFlag
  103. );
  104. //
  105. // Option APIs
  106. //
  107. DWORD
  108. R_DhcpCreateOption(
  109. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  110. [in] DHCP_OPTION_ID OptionID,
  111. [in, ref] LPDHCP_OPTION OptionInfo
  112. );
  113. DWORD
  114. R_DhcpSetOptionInfo(
  115. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  116. [in] DHCP_OPTION_ID OptionID,
  117. [in, ref] LPDHCP_OPTION OptionInfo
  118. );
  119. DWORD
  120. R_DhcpGetOptionInfo(
  121. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  122. [in] DHCP_OPTION_ID OptionID,
  123. [out] LPDHCP_OPTION *OptionInfo
  124. );
  125. DWORD
  126. R_DhcpRemoveOption(
  127. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  128. [in] DHCP_OPTION_ID OptionID
  129. );
  130. DWORD
  131. R_DhcpSetOptionValue(
  132. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  133. [in] DHCP_OPTION_ID OptionID,
  134. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  135. [in, ref] LPDHCP_OPTION_DATA OptionValue
  136. );
  137. DWORD
  138. R_DhcpGetOptionValue(
  139. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  140. [in] DHCP_OPTION_ID OptionID,
  141. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  142. [out] LPDHCP_OPTION_VALUE *OptionValue
  143. );
  144. DWORD
  145. R_DhcpEnumOptionValues(
  146. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  147. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  148. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  149. [in] DWORD PreferredMaximum,
  150. [out] LPDHCP_OPTION_VALUE_ARRAY *OptionValues,
  151. [out] DWORD *OptionsRead,
  152. [out] DWORD *OptionsTotal
  153. );
  154. DWORD
  155. R_DhcpRemoveOptionValue(
  156. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  157. [in] DHCP_OPTION_ID OptionID,
  158. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo
  159. );
  160. //
  161. // Client APIs
  162. //
  163. DWORD
  164. R_DhcpCreateClientInfo(
  165. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  166. [in, ref] LPDHCP_CLIENT_INFO ClientInfo
  167. );
  168. DWORD
  169. R_DhcpSetClientInfo(
  170. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  171. [in, ref] LPDHCP_CLIENT_INFO ClientInfo
  172. );
  173. DWORD
  174. R_DhcpGetClientInfo(
  175. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  176. [in, ref] LPDHCP_SEARCH_INFO SearchInfo,
  177. [out] LPDHCP_CLIENT_INFO *ClientInfo
  178. );
  179. DWORD
  180. R_DhcpDeleteClientInfo(
  181. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  182. [in, ref] LPDHCP_SEARCH_INFO ClientInfo
  183. );
  184. DWORD
  185. R_DhcpEnumSubnetClients(
  186. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  187. [in] DHCP_IP_ADDRESS SubnetAddress,
  188. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  189. [in] DWORD PreferredMaximum,
  190. [out] LPDHCP_CLIENT_INFO_ARRAY *ClientInfo,
  191. [out] DWORD *ClientsRead,
  192. [out] DWORD *ClientsTotal
  193. );
  194. DWORD
  195. R_DhcpGetClientOptions(
  196. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  197. [in] DHCP_IP_ADDRESS ClientIpAddress,
  198. [in] DHCP_IP_MASK ClientSubnetMask,
  199. [out] LPDHCP_OPTION_LIST *ClientOptions
  200. );
  201. DWORD
  202. R_DhcpGetMibInfo(
  203. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  204. [out] LPDHCP_MIB_INFO *MibInfo
  205. );
  206. DWORD
  207. R_DhcpEnumOptions(
  208. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  209. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  210. [in] DWORD PreferredMaximum,
  211. [out] LPDHCP_OPTION_ARRAY *Options,
  212. [out] DWORD *OptionsRead,
  213. [out] DWORD *OptionsTotal
  214. );
  215. DWORD
  216. R_DhcpSetOptionValues(
  217. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  218. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  219. [in, ref] LPDHCP_OPTION_VALUE_ARRAY OptionValues
  220. );
  221. DWORD
  222. R_DhcpServerSetConfig(
  223. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  224. [in] DWORD FieldsToSet,
  225. [in, ref] LPDHCP_SERVER_CONFIG_INFO ConfigInfo
  226. );
  227. DWORD
  228. R_DhcpServerGetConfig(
  229. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  230. [out] LPDHCP_SERVER_CONFIG_INFO *ConfigInfo
  231. );
  232. DWORD
  233. R_DhcpScanDatabase(
  234. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  235. [in] DHCP_IP_ADDRESS SubnetAddress,
  236. [in] DWORD FixFlag,
  237. [out] LPDHCP_SCAN_LIST *ScanList
  238. );
  239. DWORD
  240. R_DhcpGetVersion(
  241. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  242. [out] LPDWORD MajorVersion,
  243. [out] LPDWORD MinorVersion
  244. );
  245. #ifdef VENDOR_SPECIFIC_OPTIONS_ENABLED
  246. DWORD
  247. R_DhcpSetOptionValueForVendor(
  248. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  249. [in] DHCP_OPTION_ID OptionID,
  250. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  251. [in, ref] LPWSTR VendorName,
  252. [in, ref] LPDHCP_OPTION_DATA OptionValue
  253. );
  254. DWORD
  255. R_DhcpGetOptionValueForVendor(
  256. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  257. [in] DHCP_OPTION_ID OptionID,
  258. [in, ref] LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  259. [in, ref] LPWSTR VendorName,
  260. [out] LPDHCP_OPTION_VALUE *OptionValue
  261. );
  262. #endif
  263. //
  264. // NT4 SP1 interface
  265. //
  266. //
  267. // new subnet interface
  268. //
  269. DWORD
  270. R_DhcpAddSubnetElementV4(
  271. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  272. [in] DHCP_IP_ADDRESS SubnetAddress,
  273. [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 AddElementInfo
  274. );
  275. DWORD
  276. R_DhcpEnumSubnetElementsV4(
  277. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  278. [in] DHCP_IP_ADDRESS SubnetAddress,
  279. [in] DHCP_SUBNET_ELEMENT_TYPE EnumElementType,
  280. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  281. [in] DWORD PreferredMaximum,
  282. [out] LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *EnumElementInfo,
  283. [out] DWORD *ElementsRead,
  284. [out] DWORD *ElementsTotal
  285. );
  286. DWORD
  287. R_DhcpRemoveSubnetElementV4(
  288. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  289. [in] DHCP_IP_ADDRESS SubnetAddress,
  290. [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 RemoveElementInfo,
  291. [in] DHCP_FORCE_FLAG ForceFlag
  292. );
  293. //
  294. // Client APIs
  295. //
  296. DWORD
  297. R_DhcpCreateClientInfoV4(
  298. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  299. [in, ref] LPDHCP_CLIENT_INFO_V4 ClientInfo
  300. );
  301. DWORD
  302. R_DhcpSetClientInfoV4(
  303. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  304. [in, ref] LPDHCP_CLIENT_INFO_V4 ClientInfo
  305. );
  306. DWORD
  307. R_DhcpGetClientInfoV4(
  308. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  309. [in, ref] LPDHCP_SEARCH_INFO SearchInfo,
  310. [out] LPDHCP_CLIENT_INFO_V4 *ClientInfo
  311. );
  312. DWORD
  313. R_DhcpEnumSubnetClientsV4(
  314. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  315. [in] DHCP_IP_ADDRESS SubnetAddress,
  316. [in, out] DHCP_RESUME_HANDLE *ResumeHandle,
  317. [in] DWORD PreferredMaximum,
  318. [out] LPDHCP_CLIENT_INFO_ARRAY_V4 *ClientInfo,
  319. [out] DWORD *ClientsRead,
  320. [out] DWORD *ClientsTotal
  321. );
  322. //
  323. // Superscope support
  324. //
  325. DWORD
  326. R_DhcpSetSuperScopeV4(
  327. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  328. [in] DHCP_IP_ADDRESS SubnetAddress,
  329. [in, unique, string] WCHAR *SuperScopeName,
  330. [in] BOOL ChangeExisting
  331. );
  332. DWORD
  333. R_DhcpGetSuperScopeInfoV4(
  334. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  335. [out] LPDHCP_SUPER_SCOPE_TABLE *SuperScopeTable
  336. );
  337. DWORD
  338. R_DhcpDeleteSuperScopeV4(
  339. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  340. [in, ref, string] WCHAR *SuperScopeName
  341. );
  342. //
  343. // Global configuration
  344. //
  345. DWORD
  346. R_DhcpServerSetConfigV4(
  347. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  348. [in] DWORD FieldsToSet,
  349. [in, ref] LPDHCP_SERVER_CONFIG_INFO_V4 ConfigInfo
  350. );
  351. DWORD
  352. R_DhcpServerGetConfigV4(
  353. [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
  354. [out] LPDHCP_SERVER_CONFIG_INFO_V4 *ConfigInfo
  355. );
  356. }