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.

720 lines
27 KiB

  1. //================================================================================
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // Author: RameshV
  4. // Description: This is the structure of the server information passed to
  5. // user via dhcpds.dll.
  6. //================================================================================
  7. #ifndef _ST_SRVR_H_
  8. #define _ST_SRVR_H_
  9. //BeginExport(typedef)
  10. typedef struct _DHCPDS_SERVER {
  11. DWORD Version; // version of this structure -- currently zero
  12. LPWSTR ServerName; // [DNS?] unique name for server
  13. DWORD ServerAddress; // ip address of server
  14. DWORD Flags; // additional info -- state
  15. DWORD State; // not used ...
  16. LPWSTR DsLocation; // ADsPath to server object
  17. DWORD DsLocType; // path relative? absolute? diff srvr?
  18. } DHCPDS_SERVER, *LPDHCPDS_SERVER, *PDHCPDS_SERVER;
  19. typedef struct _DHCPDS_SERVERS {
  20. DWORD Flags; // not used currently.
  21. DWORD NumElements; // # of elements in array
  22. LPDHCPDS_SERVER Servers; // array of server info
  23. } DHCPDS_SERVERS, *LPDHCPDS_SERVERS, *PDHCPDS_SERVERS;
  24. //EndExport(typedef)
  25. #endif _ST_SRVR_H_
  26. //================================================================================
  27. // end of file
  28. //================================================================================
  29. //========================================================================
  30. // Copyright (c) Microsoft Corporation. All rights reserved.
  31. // Author: RameshV
  32. // Description: This file has been generated. Pl look at the .c file
  33. //========================================================================
  34. #ifndef CONVERT_NAMES
  35. #define DhcpCreateSubnet DhcpCreateSubnetDS
  36. #define DhcpSetSubnetInfo DhcpSetSubnetInfoDS
  37. #define DhcpGetSubnetInfo DhcpGetSubnetInfoDS
  38. #define DhcpEnumSubnets DhcpEnumSubnetsDS
  39. #define DhcpDeleteSubnet DhcpDeleteSubnetDS
  40. #define DhcpCreateOption DhcpCreateOptionDS
  41. #define DhcpSetOptionInfo DhcpSetOptionInfoDS
  42. #define DhcpGetOptionInfo DhcpGetOptionInfoDS
  43. #define DhcpRemoveOption DhcpRemoveOptionDS
  44. #define DhcpSetOptionValue DhcpSetOptionValueDS
  45. #define DhcpGetOptionValue DhcpGetOptionValueDS
  46. #define DhcpEnumOptionValues DhcpEnumOptionValuesDS
  47. #define DhcpRemoveOptionValue DhcpRemoveOptionValueDS
  48. #define DhcpEnumOptions DhcpEnumOptionsDS
  49. #define DhcpSetOptionValues DhcpSetOptionValuesDS
  50. #define DhcpAddSubnetElement DhcpAddSubnetElementDS
  51. #define DhcpEnumSubnetElements DhcpEnumSubnetElementsDS
  52. #define DhcpRemoveSubnetElement DhcpRemoveSubnetElementDS
  53. #define DhcpAddSubnetElementV4 DhcpAddSubnetElementV4DS
  54. #define DhcpEnumSubnetElementsV4 DhcpEnumSubnetElementsV4DS
  55. #define DhcpRemoveSubnetElementV4 DhcpRemoveSubnetElementV4DS
  56. #define DhcpSetSuperScopeV4 DhcpSetSuperScopeV4DS
  57. #define DhcpGetSuperScopeInfoV4 DhcpGetSuperScopeInfoV4DS
  58. #define DhcpDeleteSuperScopeV4 DhcpDeleteSuperScopeV4DS
  59. #define DhcpSetClientInfo DhcpSetClientInfoDS
  60. #define DhcpGetClientInfo DhcpGetClientInfoDS
  61. #define DhcpSetClientInfoV4 DhcpSetClientInfoV4DS
  62. #define DhcpGetClientInfoV4 DhcpGetClientInfoV4DS
  63. #define DhcpCreateOptionV5 DhcpCreateOptionV5DS
  64. #define DhcpSetOptionInfoV5 DhcpSetOptionInfoV5DS
  65. #define DhcpGetOptionInfoV5 DhcpGetOptionInfoV5DS
  66. #define DhcpEnumOptionsV5 DhcpEnumOptionsV5DS
  67. #define DhcpRemoveOptionV5 DhcpRemoveOptionV5DS
  68. #define DhcpSetOptionValueV5 DhcpSetOptionValueV5DS
  69. #define DhcpSetOptionValuesV5 DhcpSetOptionValuesV5DS
  70. #define DhcpGetOptionValueV5 DhcpGetOptionValueV5DS
  71. #define DhcpEnumOptionValuesV5 DhcpEnumOptionValuesV5DS
  72. #define DhcpRemoveOptionValueV5 DhcpRemoveOptionValueV5DS
  73. #define DhcpCreateClass DhcpCreateClassDS
  74. #define DhcpModifyClass DhcpModifyClassDS
  75. #define DhcpDeleteClass DhcpDeleteClassDS
  76. #define DhcpGetClassInfo DhcpGetClassInfoDS
  77. #define DhcpEnumClasses DhcpEnumClassesDS
  78. #define DhcpGetAllOptions DhcpGetAllOptionsDS
  79. #define DhcpGetAllOptionValues DhcpGetAllOptionValuesDS
  80. #endif CONVERT_NAMES
  81. //DOC Create an option in DS. Checkout DhcpDsCreateOptionDef for more info...
  82. DWORD
  83. DhcpCreateOptionV5( // create a new option (must not exist)
  84. IN LPWSTR ServerIpAddress,
  85. IN DWORD Flags,
  86. IN DHCP_OPTION_ID OptionId, // must be between 0-255 or 256-511 (for vendor stuff)
  87. IN LPWSTR ClassName,
  88. IN LPWSTR VendorName,
  89. IN LPDHCP_OPTION OptionInfo
  90. ) ;
  91. //DOC Modify existing option's fields in the DS. See DhcpDsModifyOptionDef for more
  92. //DOC details
  93. DWORD
  94. DhcpSetOptionInfoV5( // Modify existing option's fields
  95. IN LPWSTR ServerIpAddress,
  96. IN DWORD Flags,
  97. IN DHCP_OPTION_ID OptionId,
  98. IN LPWSTR ClassName,
  99. IN LPWSTR VendorName,
  100. IN LPDHCP_OPTION OptionInfo
  101. ) ;
  102. //DOC not yet supported at this level... (this is supported in a
  103. //DOC DhcpDs function, no wrapper yet)
  104. DWORD
  105. DhcpGetOptionInfoV5( // retrieve option info from off ds structures
  106. IN LPWSTR ServerIpAddress,
  107. IN DWORD Flags,
  108. IN DHCP_OPTION_ID OptionId,
  109. IN LPWSTR ClassName,
  110. IN LPWSTR VendorName,
  111. OUT LPDHCP_OPTION *OptionInfo // allocate memory
  112. ) ;
  113. //DOC See DhcpDsEnumOptionDefs for more info on this function.. but essentially, all this
  114. //DOC does is to read thru the options and create a list of options..
  115. DWORD
  116. DhcpEnumOptionsV5( // create list of all options in ds
  117. IN LPWSTR ServerIpAddress,
  118. IN DWORD Flags,
  119. IN LPWSTR ClassName,
  120. IN LPWSTR VendorName,
  121. IN OUT DHCP_RESUME_HANDLE *ResumeHandle,
  122. IN DWORD PreferredMaximum,
  123. OUT LPDHCP_OPTION_ARRAY *Options,
  124. OUT DWORD *OptionsRead,
  125. OUT DWORD *OptionsTotal
  126. ) ;
  127. //DOC Delete an option from off the DS. See DhcpDsDeleteOptionDef for
  128. //DOC more details.
  129. DWORD
  130. DhcpRemoveOptionV5( // remove an option from off DS
  131. IN LPWSTR ServerIpAddress,
  132. IN DWORD Flags,
  133. IN DHCP_OPTION_ID OptionId,
  134. IN LPWSTR ClassName,
  135. IN LPWSTR VendorName
  136. ) ;
  137. //DOC Set the specified option value in the DS. For more information,
  138. //DOC see DhcpDsSetOptionValue.
  139. DWORD
  140. DhcpSetOptionValueV5( // set the option value in ds
  141. IN LPWSTR ServerIpAddress,
  142. IN DWORD Flags,
  143. IN DHCP_OPTION_ID OptionId,
  144. IN LPWSTR ClassName,
  145. IN LPWSTR VendorName,
  146. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  147. IN LPDHCP_OPTION_DATA OptionValue
  148. ) ;
  149. //DOC This function just calls the SetOptionValue function N times.. this is not
  150. //DOC atomic (), but even worse, it is highly inefficient, as it creates the
  151. //DOC required objects over and over again!!!!!
  152. //DOC This has to be fixed..
  153. DWORD
  154. DhcpSetOptionValuesV5( // set a series of option values
  155. IN LPWSTR ServerIpAddress,
  156. IN DWORD Flags,
  157. IN LPWSTR ClassName,
  158. IN LPWSTR VendorName,
  159. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  160. IN LPDHCP_OPTION_VALUE_ARRAY OptionValues
  161. ) ;
  162. //DOC This function retrives the value of an option from the DS. For more info,
  163. //DOC pl check DhcpDsGetOptionValue.
  164. DWORD
  165. DhcpGetOptionValueV5(
  166. IN LPWSTR ServerIpAddress,
  167. IN DWORD Flags,
  168. IN DHCP_OPTION_ID OptionId,
  169. IN LPWSTR ClassName,
  170. IN LPWSTR VendorName,
  171. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  172. OUT LPDHCP_OPTION_VALUE *OptionValue
  173. ) ;
  174. //DOC Get the list of option values defined in DS. For more information,
  175. //DOC check DhcpDsEnumOptionValues.
  176. DWORD
  177. DhcpEnumOptionValuesV5( // get list of options defined in DS
  178. IN LPWSTR ServerIpAddress,
  179. IN DWORD Flags,
  180. IN LPWSTR ClassName,
  181. IN LPWSTR VendorName,
  182. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  183. IN DHCP_RESUME_HANDLE *ResumeHandle,
  184. IN DWORD PreferredMaximum,
  185. OUT LPDHCP_OPTION_VALUE_ARRAY *OptionValues,
  186. OUT DWORD *OptionsRead,
  187. OUT DWORD *OptionsTotal
  188. ) ;
  189. //DOC Remove the option value from off the DS. See DhcpDsRemoveOptionValue
  190. //DOC for further information.
  191. DWORD
  192. DhcpRemoveOptionValueV5( // remove option value from DS
  193. IN LPWSTR ServerIpAddress,
  194. IN DWORD Flags,
  195. IN DHCP_OPTION_ID OptionId,
  196. IN LPWSTR ClassName,
  197. IN LPWSTR VendorName,
  198. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo
  199. ) ;
  200. //DOC Create a class in the DS. Please see DhcpDsCreateClass for more
  201. //DOC details on this function.
  202. DWORD
  203. DhcpCreateClass( // create a class in DS
  204. IN LPWSTR ServerIpAddress,
  205. IN DWORD ReservedMustBeZero,
  206. IN LPDHCP_CLASS_INFO ClassInfo
  207. ) ;
  208. //DOC Modify an existing class in DS. Please see DhcpDsModifyClass for more
  209. //DOC details on this function (this is just a wrapper).
  210. DWORD
  211. DhcpModifyClass( // modify existing class
  212. IN LPWSTR ServerIpAddress,
  213. IN DWORD ReservedMustBeZero,
  214. IN LPDHCP_CLASS_INFO ClassInfo
  215. ) ;
  216. //DOC Delete an existing class in DS. Please see DhcpDsModifyClass for more
  217. //DOC details on this function (this is just a wrapper).
  218. DWORD
  219. DhcpDeleteClass( // delete a class from off DS
  220. IN LPWSTR ServerIpAddress,
  221. IN DWORD ReservedMustBeZero,
  222. IN LPWSTR ClassName
  223. ) ;
  224. //DOC DhcpGetClassInfo completes the information provided for a class in struct
  225. //DOC PartialClassInfo. For more details pl see DhcpDsGetClassInfo.
  226. DWORD
  227. DhcpGetClassInfo( // fetch complete info frm DS
  228. IN LPWSTR ServerIpAddress,
  229. IN DWORD ReservedMustBeZero,
  230. IN LPDHCP_CLASS_INFO PartialClassInfo,
  231. OUT LPDHCP_CLASS_INFO *FilledClassInfo
  232. ) ;
  233. //DOC This is implemented in the DHCPDS module, but not exported here yet..
  234. DWORD
  235. DhcpEnumClasses(
  236. IN LPWSTR ServerIpAddress,
  237. IN DWORD ReservedMustBeZero,
  238. IN OUT DHCP_RESUME_HANDLE *ResumeHandle,
  239. IN DWORD PreferredMaximum,
  240. OUT LPDHCP_CLASS_INFO_ARRAY *ClassInfoArray,
  241. OUT DWORD *nRead,
  242. OUT DWORD *nTotal
  243. ) ;
  244. //DOC This is implemented in the DHCPDS module, but not exported here yet..
  245. DWORD
  246. DhcpGetAllOptionValues(
  247. IN LPWSTR ServerIpAddress,
  248. IN DWORD Flags,
  249. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  250. OUT LPDHCP_ALL_OPTION_VALUES *Values
  251. ) ;
  252. //DOC This is implememented in the DHCPDS module, but not exported here yet..
  253. DWORD
  254. DhcpGetAllOptions(
  255. IN LPWSTR ServerIpAddress,
  256. IN DWORD Flags,
  257. OUT LPDHCP_ALL_OPTIONS *Options
  258. ) ;
  259. DWORD // ERROR_DHCP_OPTION_EXITS if option is already there
  260. DhcpCreateOption( // create a new option (must not exist)
  261. IN LPWSTR ServerIpAddress,
  262. IN DHCP_OPTION_ID OptionId, // must be between 0-255 or 256-511 (for vendor stuff)
  263. IN LPDHCP_OPTION OptionInfo
  264. ) ;
  265. DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option does not exist
  266. DhcpSetOptionInfo( // Modify existing option's fields
  267. IN LPWSTR ServerIpAddress,
  268. IN DHCP_OPTION_ID OptionID,
  269. IN LPDHCP_OPTION OptionInfo
  270. ) ;
  271. DWORD // ERROR_DHCP_OPTION_NOT_PRESENT
  272. DhcpGetOptionInfo( // retrieve the information from off the mem structures
  273. IN LPWSTR ServerIpAddress,
  274. IN DHCP_OPTION_ID OptionID,
  275. OUT LPDHCP_OPTION *OptionInfo // allocate memory using MIDL functions
  276. ) ;
  277. DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option does not exist
  278. DhcpEnumOptions( // enumerate the options defined
  279. IN LPWSTR ServerIpAddress,
  280. IN OUT DHCP_RESUME_HANDLE *ResumeHandle, // must be zero intially and then never touched
  281. IN DWORD PreferredMaximum, // max # of bytes of info to pass along
  282. OUT LPDHCP_OPTION_ARRAY *Options, // fill this option array
  283. OUT DWORD *OptionsRead, // fill in the # of options read
  284. OUT DWORD *OptionsTotal // fill in the total # here
  285. ) ;
  286. DWORD // ERROR_DHCP_OPTION_NOT_PRESENT if option not existent
  287. DhcpRemoveOption( // remove the option definition from the registry
  288. IN LPWSTR ServerIpAddress,
  289. IN DHCP_OPTION_ID OptionID
  290. ) ;
  291. DWORD // OPTION_NOT_PRESENT if option is not defined
  292. DhcpSetOptionValue( // replace or add a new option value
  293. IN LPWSTR ServerIpAddress,
  294. IN DHCP_OPTION_ID OptionID,
  295. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  296. IN LPDHCP_OPTION_DATA OptionValue
  297. ) ;
  298. DWORD // not atomic!!!!
  299. DhcpSetOptionValues( // set a bunch of options
  300. IN LPWSTR ServerIpAddress,
  301. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  302. IN LPDHCP_OPTION_VALUE_ARRAY OptionValues
  303. ) ;
  304. DWORD
  305. DhcpGetOptionValue( // fetch the required option at required level
  306. IN LPWSTR ServerIpAddress,
  307. IN DHCP_OPTION_ID OptionID,
  308. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  309. OUT LPDHCP_OPTION_VALUE *OptionValue // allocate memory using MIDL_user_allocate
  310. ) ;
  311. DWORD
  312. DhcpEnumOptionValues(
  313. IN LPWSTR ServerIpAddress,
  314. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo,
  315. IN DHCP_RESUME_HANDLE *ResumeHandle,
  316. IN DWORD PreferredMaximum,
  317. OUT LPDHCP_OPTION_VALUE_ARRAY *OptionValues,
  318. OUT DWORD *OptionsRead,
  319. OUT DWORD *OptionsTotal
  320. ) ;
  321. DWORD
  322. DhcpRemoveOptionValue(
  323. IN LPWSTR ServerIpAddress,
  324. IN DHCP_OPTION_ID OptionID,
  325. IN LPDHCP_OPTION_SCOPE_INFO ScopeInfo
  326. ) ;
  327. //DOC This function sets the superscope of a subnet, thereby creating the superscope
  328. //DOC if required. Please see DhcpDsSetSScope for more details.
  329. DWORD
  330. DhcpSetSuperScopeV4( // set superscope in DS.
  331. IN LPWSTR ServerIpAddress,
  332. IN DHCP_IP_ADDRESS SubnetAddress,
  333. IN LPWSTR SuperScopeName,
  334. IN BOOL ChangeExisting
  335. ) ;
  336. //DOC This function removes the superscope, and resets any subnet with this
  337. //DOC superscope.. so that all those subnets end up with no superscopes..
  338. //DOC Please see DhcpDsDelSScope for more details.
  339. DWORD
  340. DhcpDeleteSuperScopeV4( // delete subnet sscope from DS
  341. IN LPWSTR ServerIpAddress,
  342. IN LPWSTR SuperScopeName
  343. ) ;
  344. //DOC This function retrievs the supercsope info for each subnet that is
  345. //DOC present for the given server. Please see DhcpDsGetSScopeInfo for more
  346. //DOC details on this..
  347. DWORD
  348. DhcpGetSuperScopeInfoV4( // get sscope tbl from DS
  349. IN LPWSTR ServerIpAddress,
  350. OUT LPDHCP_SUPER_SCOPE_TABLE *SuperScopeTable
  351. ) ;
  352. //DOC This function creates a subnet in the DS with the specified params.
  353. //DOC Please see DhcpDsServerAddSubnet for more details on this function.
  354. DWORD
  355. DhcpCreateSubnet( // add subnet 2 DS for this srvr
  356. IN LPWSTR ServerIpAddress,
  357. IN DHCP_IP_ADDRESS SubnetAddress,
  358. IN LPDHCP_SUBNET_INFO SubnetInfo
  359. ) ;
  360. //DOC Modify existing subnet with new parameters... some restrictions apply.
  361. //DOC Please see DhcpDsServerModifySubnet for further details.
  362. DWORD
  363. DhcpSetSubnetInfo( // modify existing subnet params
  364. IN LPWSTR ServerIpAddress,
  365. IN DHCP_IP_ADDRESS SubnetAddress,
  366. IN LPDHCP_SUBNET_INFO SubnetInfo
  367. ) ;
  368. //DOC Implemented in the DHCPDS module but not exported thru here
  369. DWORD
  370. DhcpGetSubnetInfo(
  371. IN LPWSTR ServerIpAddress,
  372. IN DHCP_IP_ADDRESS SubnetAddress,
  373. OUT LPDHCP_SUBNET_INFO *SubnetInfo
  374. ) ;
  375. //DOC Implemented in the DHCPDS module but not exported thru here
  376. DWORD
  377. DhcpEnumSubnets(
  378. IN LPWSTR ServerIpAddress,
  379. IN DHCP_RESUME_HANDLE *ResumeHandle,
  380. IN DWORD PreferredMaximum,
  381. IN LPDHCP_IP_ARRAY *EnumInfo,
  382. IN DWORD *ElementsRead,
  383. IN DWORD *ElementsTotal
  384. ) ;
  385. //DOC This function deletes the subnet from the DS. For further information, pl
  386. //DOC see DhcpDsServerDelSubnet..
  387. DWORD
  388. DhcpDeleteSubnet( // Del subnet from off DS
  389. IN LPWSTR ServerIpAddress,
  390. IN DHCP_IP_ADDRESS SubnetAddress,
  391. IN DHCP_FORCE_FLAG ForceFlag
  392. ) ;
  393. //DOC This function sets some particular information for RESERVATIONS only
  394. //DOC all other stuff it just ignores and returns success..
  395. DWORD
  396. DhcpSetClientInfo(
  397. IN LPWSTR ServerIpAddresess,
  398. IN LPDHCP_CLIENT_INFO ClientInfo
  399. ) ;
  400. //DOC This function retrieves some particular client's information
  401. //DOC for RESERVATIONS only.. For all other stuff it returns CALL_NOT_IMPLEMENTED
  402. DWORD
  403. DhcpGetClientInfo(
  404. IN LPWSTR ServerIpAddress,
  405. IN LPDHCP_SEARCH_INFO SearchInfo,
  406. OUT LPDHCP_CLIENT_INFO *ClientInfo
  407. ) ;
  408. //DOC This function sets the client informatoin for RESERVATIONS only in DS
  409. //DOC For all toher clients it returns ERROR_SUCCESS w/o doing anything
  410. DWORD
  411. DhcpSetClientInfoV4(
  412. IN LPWSTR ServerIpAddress,
  413. IN LPDHCP_CLIENT_INFO_V4 ClientInfo
  414. ) ;
  415. //DOC Thsi function sets the client information for RESERVATIONS only
  416. //DOC For all others it returns ERROR_CALL_NOT_IMPLEMENTED
  417. DWORD
  418. DhcpGetClientInfoV4(
  419. IN LPWSTR ServerIpAddress,
  420. IN LPDHCP_SEARCH_INFO SearchInfo,
  421. OUT LPDHCP_CLIENT_INFO_V4 *ClientInfo
  422. ) ;
  423. //DOC This function adds a subnet element to a subnet in the DS.
  424. DWORD
  425. DhcpAddSubnetElement(
  426. IN LPWSTR ServerIpAddress,
  427. IN DHCP_IP_ADDRESS SubnetAddress,
  428. IN LPDHCP_SUBNET_ELEMENT_DATA AddElementInfo
  429. ) ;
  430. //DOC This function adds a subnet element to a subnet in the DS.
  431. DWORD
  432. DhcpAddSubnetElementV4(
  433. IN LPWSTR ServerIpAddress,
  434. IN DHCP_IP_ADDRESS SubnetAddress,
  435. IN LPDHCP_SUBNET_ELEMENT_DATA_V4 AddElementInfo
  436. ) ;
  437. //DOC This is not yet implemented here..
  438. DWORD
  439. DhcpEnumSubnetElementsV4(
  440. IN LPWSTR ServerIpAddress,
  441. IN DHCP_IP_ADDRESS SubnetAddress,
  442. IN DHCP_SUBNET_ELEMENT_TYPE EnumElementType,
  443. IN OUT DHCP_RESUME_HANDLE *ResumeHandle,
  444. IN DWORD PreferredMaximum,
  445. OUT LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *EnumElementInfo,
  446. OUT DWORD *ElementsRead,
  447. OUT DWORD *ElementsTotal
  448. ) ;
  449. //DOC This is not yet implemented here..
  450. DWORD
  451. DhcpEnumSubnetElements(
  452. IN LPWSTR ServerIpAddress,
  453. IN DHCP_IP_ADDRESS SubnetAddress,
  454. IN DHCP_SUBNET_ELEMENT_TYPE EnumElementType,
  455. IN OUT DHCP_RESUME_HANDLE *ResumeHandle,
  456. IN DWORD PreferredMaximum,
  457. OUT LPDHCP_SUBNET_ELEMENT_INFO_ARRAY *EnumElementInfo,
  458. OUT DWORD *ElementsRead,
  459. OUT DWORD *ElementsTotal
  460. ) ;
  461. //DOC This function removes either an exclusion, ip range or reservation
  462. //DOC from the subnet... in the DS.
  463. DWORD
  464. DhcpRemoveSubnetElement( // remove subnet element
  465. IN LPWSTR ServerIpAddress,
  466. IN DHCP_IP_ADDRESS SubnetAddress,
  467. IN LPDHCP_SUBNET_ELEMENT_DATA RemoveElementInfo,
  468. IN DHCP_FORCE_FLAG ForceFlag
  469. ) ;
  470. //DOC This function removes either an exclusion, ip range or reservation
  471. //DOC from the subnet... in the DS.
  472. DWORD
  473. DhcpRemoveSubnetElementV4( // remove subnet element
  474. IN LPWSTR ServerIpAddress,
  475. IN DHCP_IP_ADDRESS SubnetAddress,
  476. IN LPDHCP_SUBNET_ELEMENT_DATA_V4 RemoveElementInfo,
  477. IN DHCP_FORCE_FLAG ForceFlag
  478. ) ;
  479. #ifndef CONVERT_NAMES
  480. #undef DhcpCreateSubnet
  481. #undef DhcpSetSubnetInfo
  482. #undef DhcpGetSubnetInfo
  483. #undef DhcpEnumSubnets
  484. #undef DhcpDeleteSubnet
  485. #undef DhcpCreateOption
  486. #undef DhcpSetOptionInfo
  487. #undef DhcpGetOptionInfo
  488. #undef DhcpRemoveOption
  489. #undef DhcpSetOptionValue
  490. #undef DhcpGetOptionValue
  491. #undef DhcpEnumOptionValues
  492. #undef DhcpRemoveOptionValue
  493. #undef DhcpEnumOptions
  494. #undef DhcpSetOptionValues
  495. #undef DhcpAddSubnetElementV4
  496. #undef DhcpEnumSubnetElementsV4
  497. #undef DhcpRemoveSubnetElementV4
  498. #undef DhcpAddSubnetElement
  499. #undef DhcpEnumSubnetElements
  500. #undef DhcpRemoveSubnetElement
  501. #undef DhcpSetSuperScopeV4
  502. #undef DhcpGetSuperScopeInfoV4
  503. #undef DhcpDeleteSuperScopeV4
  504. #undef DhcpSetClientInfo
  505. #undef DhcpGetClientInfo
  506. #undef DhcpSetClientInfoV4
  507. #undef DhcpGetClientInfoV4
  508. #undef DhcpCreateOptionV5
  509. #undef DhcpSetOptionInfoV5
  510. #undef DhcpGetOptionInfoV5
  511. #undef DhcpEnumOptionsV5
  512. #undef DhcpRemoveOptionV5
  513. #undef DhcpSetOptionValueV5
  514. #undef DhcpSetOptionValuesV5
  515. #undef DhcpGetOptionValueV5
  516. #undef DhcpEnumOptionValuesV5
  517. #undef DhcpRemoveOptionValueV5
  518. #undef DhcpCreateClass
  519. #undef DhcpModifyClass
  520. #undef DhcpDeleteClass
  521. #undef DhcpGetClassInfo
  522. #undef DhcpEnumClasses
  523. #undef DhcpGetAllOptions
  524. #undef DhcpGetAllOptionValues
  525. #endif CONVERT_NAMES
  526. #define DHCP_SERVER_ANOTHER_ENTERPRISE 0x01
  527. typedef DHCPDS_SERVER DHCP_SERVER_INFO;
  528. typedef PDHCPDS_SERVER PDHCP_SERVER_INFO;
  529. typedef LPDHCPDS_SERVER LPDHCP_SERVER_INFO;
  530. typedef DHCPDS_SERVERS DHCP_SERVER_INFO_ARRAY;
  531. typedef PDHCPDS_SERVERS PDHCP_SERVER_INFO_ARRAY;
  532. typedef LPDHCPDS_SERVERS LPDHCP_SERVER_INFO_ARRAY;
  533. //DOC DhcpEnumServersDS lists the servers found in the DS along with the
  534. //DOC addresses and other information. The whole server is allocated as a blob,
  535. //DOC and should be freed in one shot. No parameters are currently used, other
  536. //DOC than Servers which will be an OUT parameter only.
  537. DWORD
  538. DhcpEnumServersDS(
  539. IN DWORD Flags,
  540. IN LPVOID IdInfo,
  541. OUT LPDHCP_SERVER_INFO_ARRAY *Servers,
  542. IN LPVOID CallbackFn,
  543. IN LPVOID CallbackData
  544. ) ;
  545. //DOC DhcpAddServerDS adds a particular server to the DS. If the server exists,
  546. //DOC then, this returns error. If the server does not exist, then this function
  547. //DOC adds the server in DS, and also uploads the configuration from the server
  548. //DOC to the ds.
  549. DWORD
  550. DhcpAddServerDS(
  551. IN DWORD Flags,
  552. IN LPVOID IdInfo,
  553. IN LPDHCP_SERVER_INFO NewServer,
  554. IN LPVOID CallbackFn,
  555. IN LPVOID CallbackData
  556. ) ;
  557. //DOC DhcpDeleteServerDS deletes the servers from off the DS and recursively
  558. //DOC deletes the server object..(i.e everything belonging to the server is deleted).
  559. //DOC If the server does not exist, it returns an error.
  560. DWORD
  561. DhcpDeleteServerDS(
  562. IN DWORD Flags,
  563. IN LPVOID IdInfo,
  564. IN LPDHCP_SERVER_INFO NewServer,
  565. IN LPVOID CallbackFn,
  566. IN LPVOID CallbackData
  567. ) ;
  568. //DOC DhcpDsInitDS initializes everything in this module.
  569. DWORD
  570. DhcpDsInitDS(
  571. DWORD Flags,
  572. LPVOID IdInfo
  573. ) ;
  574. //DOC DhcpDsCleanupDS uninitiailzes everything in this module.
  575. VOID
  576. DhcpDsCleanupDS(
  577. VOID
  578. ) ;
  579. //DOC This function is defined in validate.c
  580. //DOC Only the stub is here.
  581. DWORD
  582. DhcpDsValidateService( // check to validate for dhcp
  583. IN LPWSTR Domain,
  584. IN DWORD *Addresses OPTIONAL,
  585. IN ULONG nAddresses,
  586. IN LPWSTR UserName,
  587. IN LPWSTR Password,
  588. IN DWORD AuthFlags,
  589. OUT LPBOOL Found,
  590. OUT LPBOOL IsStandAlone
  591. );
  592. //DOC DhcpDsGetLastUpdateTime is defined in upndown.c --> see there for more details.
  593. DWORD
  594. DhcpDsGetLastUpdateTime( // last update time for server
  595. IN LPWSTR ServerName, // this is server of interest
  596. IN OUT LPFILETIME Time // fill in this w./ the time
  597. );
  598. //========================================================================
  599. // end of file
  600. //========================================================================