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.

311 lines
16 KiB

  1. //========================================================================
  2. // Copyright (C) 1997 Microsoft Corporation
  3. // Author: RameshV
  4. // Description: This file has been generated. Pl look at the .c file
  5. //========================================================================
  6. #ifndef _DHCPDS_RPCAPI2_H
  7. #define _DHCPDS_RPCAPI2_H
  8. //DOC DhcpDsAddServer adds a server's entry in the DS. Note that only the name
  9. //DOC uniquely determines the server. There can be one server with many ip addresses.
  10. //DOC If the server is created first time, a separate object is created for the
  11. //DOC server. TO DO: The newly added server should also have its data
  12. //DOC updated in the DS uploaded from the server itself if it is still up.
  13. //DOC Note that it takes as parameter the Dhcp root container.
  14. //DOC If the requested address already exists in the DS (maybe to some other
  15. //DOC server), then the function returns ERROR_DDS_SERVER_ALREADY_EXISTS
  16. DWORD
  17. DhcpDsAddServer( // add a server in DS
  18. IN OUT LPSTORE_HANDLE hDhcpC, // container for dhcp objects
  19. IN OUT LPSTORE_HANDLE hDhcpRoot, // dhcp root object handle
  20. IN DWORD Reserved, // must be zero, future use
  21. IN LPWSTR ServerName, // [DNS?] name of server
  22. IN LPWSTR ReservedPtr, // Server location? future use
  23. IN DWORD IpAddress, // ip address of server
  24. IN DWORD State // currently un-interpreted
  25. ) ;
  26. //DOC DhcpDsDelServer removes the requested servername-ipaddress pair from the ds.
  27. //DOC If this is the last ip address for the given servername, then the server
  28. //DOC is also removed from memory. But objects referred by the Server are left in
  29. //DOC the DS as they may also be referred to from else where. This needs to be
  30. //DOC fixed via references being tagged as direct and symbolic -- one causing deletion
  31. //DOC and other not causing any deletion. THIS NEEDS TO BE FIXED.
  32. DWORD
  33. DhcpDsDelServer( // Delete a server from memory
  34. IN OUT LPSTORE_HANDLE hDhcpC, // container for dhcp objects
  35. IN OUT LPSTORE_HANDLE hDhcpRoot, // dhcp root object handle
  36. IN DWORD Reserved, // must be zero, for future use
  37. IN LPWSTR ServerName, // which server to delete for
  38. IN LPWSTR ReservedPtr, // server location ? future use
  39. IN DWORD IpAddress // the IpAddress to delete..
  40. ) ;
  41. BOOL
  42. DhcpDsLookupServer( // get info abt all existing servers
  43. IN OUT LPSTORE_HANDLE hDhcpC, // container for dhcp objects
  44. IN OUT LPSTORE_HANDLE hDhcpRoot, // dhcp root object handle
  45. IN DWORD Reserved, // must be zero, for future use
  46. IN LPWSTR LookupServerIP,// Server to lookup IP
  47. IN LPWSTR HostName // Hostname to lookup
  48. );
  49. //DOC DhcpDsEnumServers retrieves a bunch of information about each server that
  50. //DOC has an entry in the Servers attribute of the root object. There are no guarantees
  51. //DOC on the order..
  52. //DOC The memory for this is allocated in ONE shot -- so the output can be freed in
  53. //DOC one shot too.
  54. //DOC
  55. DWORD
  56. DhcpDsEnumServers( // get info abt all existing servers
  57. IN OUT LPSTORE_HANDLE hDhcpC, // container for dhcp objects
  58. IN OUT LPSTORE_HANDLE hDhcpRoot, // dhcp root object handle
  59. IN DWORD Reserved, // must be zero, for future use
  60. OUT LPDHCPDS_SERVERS *ServersInfo // array of servers
  61. ) ;
  62. //DOC DhcpDsSetSScope modifies the superscope that a subnet belongs to.
  63. //DOC The function tries to set the superscope of the subnet referred by
  64. //DOC address IpAddress to SScopeName. It does not matter if the superscope
  65. //DOC by that name does not exist, it is automatically created.
  66. //DOC If the subnet already had a superscope, then the behaviour depends on
  67. //DOC the flag ChangeSScope. If this is TRUE, it sets the new superscopes.
  68. //DOC If the flag is FALSE, it returns ERROR_DDS_SUBNET_HAS_DIFF_SSCOPE.
  69. //DOC This flag is ignored if the subnet does not have a superscope already.
  70. //DOC If SScopeName is NULL, the function removes the subnet from any superscope
  71. //DOC if it belonged to one before.
  72. //DOC If the specified subnet does not exist, it returns ERROR_DDS_SUBNET_NOT_PRESENT.
  73. DWORD
  74. DhcpDsSetSScope( // change superscope of subnet
  75. IN OUT LPSTORE_HANDLE hDhcpC, // container where dhcp objects are stored
  76. IN OUT LPSTORE_HANDLE hServer, // the server object referred
  77. IN DWORD Reserved, // must be zero, for future use
  78. IN DWORD IpAddress, // subnet address to use
  79. IN LPWSTR SScopeName, // sscope it must now be in
  80. IN BOOL ChangeSScope // if it already has a SScope, change it?
  81. ) ;
  82. //DOC DhcpDsDelSScope deletes the superscope and removes all elements
  83. //DOC that belong to that superscope in one shot. There is no error if the
  84. //DOC superscope does not exist.
  85. DWORD
  86. DhcpDsDelSScope( // delete superscope off DS
  87. IN OUT LPSTORE_HANDLE hDhcpC, // container where dhcp objects are stored
  88. IN OUT LPSTORE_HANDLE hServer, // the server object referred
  89. IN DWORD Reserved, // must be zero, for future use
  90. IN LPWSTR SScopeName // sscope to delete
  91. ) ;
  92. //DOC DhcpDsGetSScopeInfo retrieves the SuperScope table for the server of interest.
  93. //DOC The table itself is allocated in one blob, so it can be freed lateron.
  94. //DOC The SuperScopeNumber is garbage (always zero) and the NextInSuperScope reflects
  95. //DOC the order in the DS which may/maynot be the same in the DHCP server.
  96. //DOC SuperScopeName is NULL in for subnets that done have a sscope.
  97. DWORD
  98. DhcpDsGetSScopeInfo( // get superscope table from ds
  99. IN OUT LPSTORE_HANDLE hDhcpC, // container where dhcp objects are stored
  100. IN OUT LPSTORE_HANDLE hServer, // the server object referred
  101. IN DWORD Reserved, // must be zero, for future use
  102. OUT LPDHCP_SUPER_SCOPE_TABLE *SScopeTbl // allocated by this func in one blob
  103. ) ;
  104. //DOC DhcpDsServerAddSubnet tries to add a subnet to a given server. Each subnet
  105. //DOC address has to be unique, but the other parameters dont have to.
  106. //DOC The subnet address being added should not belong to any other subnet.
  107. //DOC In this case it returns error ERROR_DDS_SUBNET_EXISTS
  108. DWORD
  109. DhcpDsServerAddSubnet( // create a new subnet
  110. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  111. IN OUT LPSTORE_HANDLE hServer, // server object
  112. IN DWORD Reserved, // for future use, reserved
  113. IN LPWSTR ServerName, // name of server we're using
  114. IN LPDHCP_SUBNET_INFO Info // info on new subnet to create
  115. ) ;
  116. //DOC DhcpDsServerDelSubnet removes a subnet from a given server. It removes not
  117. //DOC just the subnet, but also all dependent objects like reservations etc.
  118. //DOC This fn returns ERROR_DDS_SUBNET_NOT_PRESENT if the subnet is not found.
  119. DWORD
  120. DhcpDsServerDelSubnet( // Delete the subnet
  121. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create obj
  122. IN LPSTORE_HANDLE hServer, // server obj
  123. IN DWORD Reserved, // for future use, must be zero
  124. IN LPWSTR ServerName, // name of dhcp server 2 del off
  125. IN DWORD IpAddress // ip address of subnet to del
  126. ) ;
  127. //DOC DhcpDsServerModifySubnet changes the subnet name, comment, state, mask
  128. //DOC fields of the subnet. Actually, currently, the mask should probably not
  129. //DOC be changed, as no checks are performed in this case. The address cannot
  130. //DOC be changed.. If the subnet is not present, the error returned is
  131. //DOC ERROR_DDS_SUBNET_NOT_PRESENT
  132. DWORD
  133. DhcpDsServerModifySubnet( // modify subnet info
  134. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  135. IN OUT LPSTORE_HANDLE hServer, // server object
  136. IN DWORD Reserved, // for future use, reserved
  137. IN LPWSTR ServerName, // name of server we're using
  138. IN LPDHCP_SUBNET_INFO Info // info on new subnet to create
  139. ) ;
  140. //DOC DhcpDsServerEnumSubnets is not yet implemented.
  141. DWORD
  142. DhcpDsServerEnumSubnets( // get subnet list
  143. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  144. IN OUT LPSTORE_HANDLE hServer, // server object
  145. IN DWORD Reserved, // for future use, reserved
  146. IN LPWSTR ServerName, // name of server we're using
  147. OUT LPDHCP_IP_ARRAY *SubnetsArray // give array of subnets
  148. ) ;
  149. //DOC DhcpDsServerGetSubnetInfo is not yet implemented.
  150. DWORD
  151. DhcpDsServerGetSubnetInfo( // get info on subnet
  152. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  153. IN OUT LPSTORE_HANDLE hServer, // server object
  154. IN DWORD Reserved, // for future use, reserved
  155. IN LPWSTR ServerName, // name of server we're using
  156. IN DHCP_IP_ADDRESS SubnetAddress, // address of subnet to get info for
  157. OUT LPDHCP_SUBNET_INFO *SubnetInfo // o/p: allocated info
  158. ) ;
  159. //DOC DhcpDsSubnetAddRangeOrExcl adds a range/excl to an existing subnet.
  160. //DOC If there is a collision with between ranges, then the error code returned
  161. //DOC is ERROR_DDS_POSSIBLE_RANGE_CONFLICT. Note that no checks are made for
  162. //DOC exclusions though. Also, if a RANGE is extended via this routine, then
  163. //DOC there is no error returned, but a limitation currently is that multiple
  164. //DOC ranges (two only right) cannot be simultaneously extended.
  165. //DOC BUBGUG: The basic check of whether the range belongs in the subnet is
  166. //DOC not done..
  167. DWORD
  168. DhcpDsSubnetAddRangeOrExcl( // add a range or exclusion
  169. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  170. IN OUT LPSTORE_HANDLE hServer, // server object
  171. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  172. IN DWORD Reserved, // for future use, reserved
  173. IN LPWSTR ServerName, // name of server we're using
  174. IN DWORD Start, // start addr in range
  175. IN DWORD End, // end addr in range
  176. IN BOOL RangeOrExcl // TRUE ==> Range,FALSE ==> Excl
  177. ) ;
  178. //DOC DhcpDsSubnetDelRangeOrExcl deletes a range or exclusion from off the ds.
  179. //DOC To specify range, set the RangeOrExcl parameter to TRUE.
  180. DWORD
  181. DhcpDsSubnetDelRangeOrExcl( // del a range or exclusion
  182. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  183. IN OUT LPSTORE_HANDLE hServer, // server object
  184. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  185. IN DWORD Reserved, // for future use, reserved
  186. IN LPWSTR ServerName, // name of server we're using
  187. IN DWORD Start, // start addr in range
  188. IN DWORD End, // end addr in range
  189. IN BOOL RangeOrExcl // TRUE ==> Range,FALSE ==> Excl
  190. ) ;
  191. //DOC DhcpDsEnumRangesOrExcl is not yet implemented.
  192. DWORD
  193. DhcpDsEnumRangesOrExcl( // enum list of ranges 'n excl
  194. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  195. IN OUT LPSTORE_HANDLE hServer, // server object
  196. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  197. IN DWORD Reserved, // for future use, reserved
  198. IN LPWSTR ServerName, // name of server we're using
  199. IN BOOL RangeOrExcl, // TRUE ==> Range, FALSE ==> Excl
  200. OUT LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *pRanges
  201. ) ;
  202. //DOC DhcpDsSubnetAddReservation tries to add a reservation object in the DS.
  203. //DOC Neither the ip address not hte hw-address must exist in the DS prior to this.
  204. //DOC If they do exist, the error returned is ERROR_DDS_RESERVATION_CONFLICT.
  205. //DOC No checks are made on the sanity of the address in this subnet..
  206. DWORD
  207. DhcpDsSubnetAddReservation( // add a reservation
  208. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  209. IN OUT LPSTORE_HANDLE hServer, // server object
  210. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  211. IN DWORD Reserved, // for future use, reserved
  212. IN LPWSTR ServerName, // name of server we're using
  213. IN DWORD ReservedAddr, // reservation ip address to add
  214. IN LPBYTE HwAddr, // RAW [ethernet?] hw addr of the client
  215. IN DWORD HwAddrLen, // length in # of bytes of hw addr
  216. IN DWORD ClientType // client is BOOTP, DHCP, or both?
  217. ) ;
  218. //DOC DhcpDsSubnetDelReservation deletes a reservation from the DS.
  219. //DOC If the reservation does not exist, it returns ERROR_DDS_RESERVATION_NOT_PRESENT.
  220. //DOC Reservations cannot be deleted by anything but ip address for now.
  221. DWORD
  222. DhcpDsSubnetDelReservation( // delete a reservation
  223. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  224. IN OUT LPSTORE_HANDLE hServer, // server object
  225. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  226. IN DWORD Reserved, // for future use, reserved
  227. IN LPWSTR ServerName, // name of server we're using
  228. IN DWORD ReservedAddr // ip address to delete reserv. by
  229. ) ;
  230. //DOC DhcpDsEnumReservations enumerates the reservations..
  231. DWORD
  232. DhcpDsEnumReservations( // enumerate reservations frm DS
  233. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  234. IN OUT LPSTORE_HANDLE hServer, // server object
  235. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  236. IN DWORD Reserved, // for future use, reserved
  237. IN LPWSTR ServerName, // name of server we're using
  238. OUT LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *pReservations
  239. ) ;
  240. //DOC DhcpDsEnumSubnetElements enumerates the list of subnet elements in a
  241. //DOC subnet... such as IpRanges, Exclusions, Reservations..
  242. //DOC
  243. DWORD
  244. DhcpDsEnumSubnetElements(
  245. IN OUT LPSTORE_HANDLE hDhcpC, // root container to create objects
  246. IN OUT LPSTORE_HANDLE hServer, // server object
  247. IN OUT LPSTORE_HANDLE hSubnet, // subnet object
  248. IN DWORD Reserved, // for future use, reserved
  249. IN LPWSTR ServerName, // name of server we're using
  250. IN DHCP_SUBNET_ELEMENT_TYPE ElementType, // what kind of elt to enum?
  251. OUT LPDHCP_SUBNET_ELEMENT_INFO_ARRAY_V4 *ElementInfo
  252. ) ;
  253. //
  254. // Allow Debug prints to ntsd or kd
  255. //
  256. #ifdef DBG
  257. #define DsAuthPrint(_x_) DsAuthPrintRoutine _x_
  258. VOID DsAuthPrintRoutine(
  259. LPWSTR Format,
  260. ...
  261. );
  262. #else
  263. #define DsAuthPrint(_x_)
  264. #endif
  265. #endif
  266. //========================================================================
  267. // end of file
  268. //========================================================================