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.

1393 lines
29 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. rpcstub.c
  5. Abstract:
  6. Domain Name System (DNS) Server -- Admin Client API
  7. Client stubs for NT4 RPC API.
  8. Note: some RPC calls were never used by the admin:
  9. - R_DnsResetBootMethod
  10. - R_DnsGetZoneWinsInfo
  11. - R_DnsUpdateWinsRecord
  12. They can not be removed from the IDL as order in the interface is
  13. important. However the corresponding stub API are tossed.
  14. In addition the R_DnsEnumNodeRecords call is completely
  15. subsumed by the current behavior of the server by the old
  16. DnsEnumChildNodesAndRecords call (renamed DnsEnumRecords)
  17. with proper (no children) setting of select flag.
  18. The old admin source has been updated, so that it sets the flag
  19. to get the desired behavior. Hence the DnsEnumNodeRecords() call
  20. is a no-op stub.
  21. Author:
  22. Jim Gilroy (jamesg) September 1995
  23. Environment:
  24. User Mode - Win32
  25. Revision History:
  26. jamesg April 1997 -- remove dead code
  27. --*/
  28. #include "dnsclip.h"
  29. //
  30. // Server configuration API
  31. //
  32. DNS_STATUS
  33. DNS_API_FUNCTION
  34. Dns4_GetServerInfo(
  35. IN LPCSTR Server,
  36. OUT PDNS_SERVER_INFO * ppServerInfo
  37. )
  38. {
  39. DNS_STATUS status;
  40. IF_DNSDBG( STUB )
  41. {
  42. DNS_PRINT((
  43. "Enter R_Dns4_GetServerInfo()\n"
  44. "\tServer = %s\n"
  45. "\tppServerInfo = %p\n"
  46. "\t*ppServerInfo = %p\n",
  47. Server,
  48. ppServerInfo,
  49. (ppServerInfo ? *ppServerInfo : NULL) ));
  50. }
  51. RpcTryExcept
  52. {
  53. status = R_Dns4_GetServerInfo(
  54. Server,
  55. ppServerInfo
  56. );
  57. IF_DNSDBG( STUB )
  58. {
  59. DNS_PRINT((
  60. "Leave R_Dns4_GetServerInfo(): status %d / %p\n"
  61. "\tServer = %s\n"
  62. "\tppServerInfo = %p\n"
  63. "\t*ppServerInfo = %p\n",
  64. status,
  65. status,
  66. Server,
  67. ppServerInfo,
  68. (ppServerInfo ? *ppServerInfo : NULL) ));
  69. if ( ppServerInfo )
  70. {
  71. Dns4_Dbg_RpcServerInfo(
  72. NULL,
  73. *ppServerInfo );
  74. }
  75. }
  76. }
  77. RpcExcept (1)
  78. {
  79. status = RpcExceptionCode();
  80. IF_DNSDBG( STUB )
  81. {
  82. DNS_PRINT((
  83. "RpcExcept: code = %d / %p\n",
  84. status,
  85. status ));
  86. }
  87. }
  88. RpcEndExcept
  89. return( status );
  90. }
  91. DNS_STATUS
  92. DNS_API_FUNCTION
  93. Dns4_ResetServerListenAddresses(
  94. IN LPCSTR Server,
  95. IN DWORD cListenAddrs,
  96. IN PIP_ADDRESS aipListenAddrs
  97. )
  98. {
  99. DNS_STATUS status;
  100. IF_DNSDBG( STUB )
  101. {
  102. DNS_PRINT((
  103. "Enter R_Dns4_ResetListenIpAddrs()\n"
  104. "\tServer = %s\n"
  105. "\tcListenAddrs = %d\n"
  106. "\taipListenAddrs = %p\n",
  107. Server,
  108. cListenAddrs,
  109. aipListenAddrs ));
  110. }
  111. RpcTryExcept
  112. {
  113. status = R_Dns4_ResetServerListenAddresses(
  114. Server,
  115. cListenAddrs,
  116. aipListenAddrs );
  117. IF_DNSDBG( STUB )
  118. {
  119. DNS_PRINT((
  120. "R_Dns4_ResetListenIpAddrs: status = %d / %p\n",
  121. status,
  122. status ));
  123. }
  124. }
  125. RpcExcept (1)
  126. {
  127. status = RpcExceptionCode();
  128. IF_DNSDBG( STUB )
  129. {
  130. DNS_PRINT((
  131. "RpcExcept: code = %d / %p\n",
  132. status,
  133. status ));
  134. }
  135. }
  136. RpcEndExcept
  137. return( status );
  138. }
  139. DNS_STATUS
  140. DNS_API_FUNCTION
  141. Dns4_ResetForwarders(
  142. IN LPCSTR Server,
  143. IN DWORD cForwarders,
  144. IN PIP_ADDRESS aipForwarders,
  145. IN DNS_HANDLE dwForwardTimeout,
  146. IN DWORD fSlave
  147. )
  148. {
  149. DNS_STATUS status;
  150. IF_DNSDBG( STUB )
  151. {
  152. DNS_PRINT((
  153. "Enter R_Dns4_ResetForwarders()\n"
  154. "\tServer = %s\n"
  155. "\tcForwarders = %d\n"
  156. "\taipForwarders = %p\n"
  157. "\tdwForwardTimeout = %d\n"
  158. "\tfSlave = %d\n",
  159. Server,
  160. cForwarders,
  161. aipForwarders,
  162. dwForwardTimeout,
  163. fSlave ));
  164. }
  165. RpcTryExcept
  166. {
  167. status = R_Dns4_ResetForwarders(
  168. Server,
  169. cForwarders,
  170. aipForwarders,
  171. dwForwardTimeout,
  172. fSlave );
  173. IF_DNSDBG( STUB )
  174. {
  175. DNS_PRINT((
  176. "R_Dns4_ResetForwarders: status = %d / %p\n",
  177. status,
  178. status ));
  179. }
  180. }
  181. RpcExcept (1)
  182. {
  183. status = RpcExceptionCode();
  184. IF_DNSDBG( STUB )
  185. {
  186. DNS_PRINT((
  187. "RpcExcept: code = %d / %p\n",
  188. status,
  189. status ));
  190. }
  191. }
  192. RpcEndExcept
  193. return( status );
  194. }
  195. //
  196. // Server Statistics API
  197. //
  198. DNS_STATUS
  199. DNS_API_FUNCTION
  200. Dns4_GetStatistics(
  201. IN LPCSTR Server,
  202. OUT PDNS4_STATISTICS * ppStatistics
  203. )
  204. {
  205. DNS_STATUS status;
  206. IF_DNSDBG( STUB )
  207. {
  208. DNS_PRINT((
  209. "Enter R_Dns4_GetStatistics()\n"
  210. "\tServer = %s\n"
  211. "\tppStatistics = %p\n"
  212. "\t*ppStatistics = %p\n",
  213. Server,
  214. ppStatistics,
  215. (ppStatistics ? *ppStatistics : NULL) ));
  216. }
  217. RpcTryExcept
  218. {
  219. status = R_Dns4_GetStatistics(
  220. Server,
  221. ppStatistics
  222. );
  223. IF_DNSDBG( STUB )
  224. {
  225. DNS_PRINT((
  226. "Leave R_Dns4_GetStatistics(): status %d / %p\n"
  227. "\tServer = %s\n"
  228. "\tppStatistics = %p\n"
  229. "\t*ppStatistics = %p\n",
  230. status,
  231. status,
  232. Server,
  233. ppStatistics,
  234. (ppStatistics ? *ppStatistics : NULL) ));
  235. if ( ppStatistics )
  236. {
  237. Dns4_Dbg_RpcStatistics(
  238. "After R_Dns4_GetStatistics ",
  239. *ppStatistics );
  240. }
  241. }
  242. }
  243. RpcExcept (1)
  244. {
  245. status = RpcExceptionCode();
  246. IF_DNSDBG( STUB )
  247. {
  248. DNS_PRINT((
  249. "RpcExcept: code = %d / %p\n",
  250. status,
  251. status ));
  252. }
  253. }
  254. RpcEndExcept
  255. return( status );
  256. }
  257. DNS_STATUS
  258. DNS_API_FUNCTION
  259. Dns4_ClearStatistics(
  260. IN LPCSTR Server
  261. )
  262. {
  263. DNS_STATUS status;
  264. IF_DNSDBG( STUB )
  265. {
  266. DNS_PRINT((
  267. "Enter R_Dns4_ClearStatistics()\n"
  268. "\tServer = %s\n",
  269. Server ));
  270. }
  271. RpcTryExcept
  272. {
  273. status = R_Dns4_ClearStatistics(
  274. Server
  275. );
  276. IF_DNSDBG( STUB )
  277. {
  278. DNS_PRINT((
  279. "Leave R_Dns4_ClearStatistics(): status %d / %p\n"
  280. "\tServer = %s\n",
  281. status,
  282. status,
  283. Server ));
  284. }
  285. }
  286. RpcExcept (1)
  287. {
  288. status = RpcExceptionCode();
  289. IF_DNSDBG( STUB )
  290. {
  291. DNS_PRINT((
  292. "RpcExcept: code = %d / %p\n",
  293. status,
  294. status ));
  295. }
  296. }
  297. RpcEndExcept
  298. return( status );
  299. }
  300. //
  301. // Zone configuration API
  302. //
  303. DNS_STATUS
  304. DNS_API_FUNCTION
  305. Dns4_EnumZoneHandles(
  306. IN LPCSTR Server,
  307. OUT PDWORD pdwZoneCount,
  308. IN DWORD dwArrayCount,
  309. OUT DNS_HANDLE ahZones[]
  310. )
  311. {
  312. DNS_STATUS status;
  313. IF_DNSDBG( STUB )
  314. {
  315. DNS_PRINT((
  316. "Enter R_Dns4_EnumZoneHandles()\n"
  317. "\tServer = %s\n"
  318. "\tpdwZoneCount = %p\n"
  319. "\tdwArrayCount = %p\n"
  320. "\tahZones = %p\n",
  321. Server,
  322. pdwZoneCount,
  323. dwArrayCount,
  324. ahZones
  325. ));
  326. }
  327. RpcTryExcept
  328. {
  329. status = R_Dns4_EnumZoneHandles(
  330. Server,
  331. pdwZoneCount,
  332. dwArrayCount,
  333. ahZones
  334. );
  335. IF_DNSDBG( STUB )
  336. {
  337. DNS_PRINT((
  338. "R_Dns4_EnumZoneHandles: status = %d / %p\n",
  339. status,
  340. status ));
  341. Dns4_Dbg_RpcZoneHandleList(
  342. "After R_Dns4_EnumZoneHandles ",
  343. *pdwZoneCount,
  344. ahZones );
  345. }
  346. }
  347. RpcExcept (1)
  348. {
  349. status = RpcExceptionCode();
  350. IF_DNSDBG( STUB )
  351. {
  352. DNS_PRINT((
  353. "RpcExcept: code = %d / %p\n",
  354. status,
  355. status ));
  356. }
  357. }
  358. RpcEndExcept
  359. return( status );
  360. }
  361. DNS_STATUS
  362. DNS_API_FUNCTION
  363. Dns4_GetZoneInfo(
  364. IN LPCSTR Server,
  365. IN DNS_HANDLE hZone,
  366. OUT PDNS4_ZONE_INFO * ppZoneInfo
  367. )
  368. {
  369. DNS_STATUS status;
  370. IF_DNSDBG( STUB )
  371. {
  372. DNS_PRINT((
  373. "Enter R_Dns4_GetZoneInfo()\n"
  374. "\tServer = %s\n"
  375. "\thZone = %p\n"
  376. "\tppZoneInfo = %p\n"
  377. "\t*ppZoneInfo = %p\n",
  378. Server,
  379. hZone,
  380. ppZoneInfo,
  381. (ppZoneInfo ? *ppZoneInfo : 0) ));
  382. }
  383. RpcTryExcept
  384. {
  385. status = R_Dns4_GetZoneInfo(
  386. Server,
  387. hZone,
  388. ppZoneInfo
  389. );
  390. IF_DNSDBG( STUB )
  391. {
  392. DNS_PRINT((
  393. "Leave R_Dns4_GetZoneInfo(): status %d / %p\n"
  394. "\tServer = %s\n"
  395. "\thZone = %p\n"
  396. "\tppZoneInfo = %p\n"
  397. "\t*ppZoneInfo = %p\n",
  398. status,
  399. status,
  400. Server,
  401. hZone,
  402. ppZoneInfo,
  403. (ppZoneInfo ? *ppZoneInfo : 0) ));
  404. if ( ppZoneInfo )
  405. {
  406. Dns4_Dbg_RpcZoneInfo(
  407. "After R_Dns4_GetZoneInfo ",
  408. *ppZoneInfo );
  409. }
  410. }
  411. }
  412. RpcExcept (1)
  413. {
  414. status = RpcExceptionCode();
  415. IF_DNSDBG( STUB )
  416. {
  417. DNS_PRINT((
  418. "RpcExcept: code = %d / %p\n",
  419. status,
  420. status ));
  421. }
  422. }
  423. RpcEndExcept
  424. return (status);
  425. }
  426. DNS_STATUS
  427. DNS_API_FUNCTION
  428. Dns4_ResetZoneType(
  429. IN LPCSTR Server,
  430. IN DNS_HANDLE hZone,
  431. IN DWORD dwZoneType,
  432. IN DWORD cMasters,
  433. IN PIP_ADDRESS aipMasters
  434. )
  435. {
  436. DNS_STATUS status;
  437. IF_DNSDBG( STUB )
  438. {
  439. DNS_PRINT((
  440. "Enter R_Dns4_ResetZoneType()\n"
  441. "\tServer = %s\n"
  442. "\thZone = %p\n"
  443. "\tdwZoneType = %d\n"
  444. "\tcMasters = %d\n"
  445. "\taipMasters = %p\n",
  446. Server,
  447. hZone,
  448. dwZoneType,
  449. cMasters,
  450. aipMasters ));
  451. }
  452. RpcTryExcept
  453. {
  454. status = R_Dns4_ResetZoneType(
  455. Server,
  456. hZone,
  457. dwZoneType,
  458. cMasters,
  459. aipMasters );
  460. IF_DNSDBG( STUB )
  461. {
  462. DNS_PRINT((
  463. "R_Dns4_ResetZoneType: status = %d / %p\n",
  464. status,
  465. status ));
  466. }
  467. }
  468. RpcExcept (1)
  469. {
  470. status = RpcExceptionCode();
  471. IF_DNSDBG( STUB )
  472. {
  473. DNS_PRINT((
  474. "RpcExcept: code = %d / %p\n",
  475. status,
  476. status ));
  477. }
  478. }
  479. RpcEndExcept
  480. return( status );
  481. }
  482. DNS_STATUS
  483. DNS_API_FUNCTION
  484. Dns4_ResetZoneDatabase(
  485. IN LPCSTR Server,
  486. IN DNS_HANDLE hZone,
  487. IN DWORD fUseDatabase,
  488. IN LPCSTR pszDataFile
  489. )
  490. {
  491. DNS_STATUS status;
  492. IF_DNSDBG( STUB )
  493. {
  494. DNS_PRINT((
  495. "Enter R_Dns4_ResetZoneDatabase()\n"
  496. "\tServer = %s\n"
  497. "\thZone = %p\n"
  498. "\tfUseDatabase = %d\n"
  499. "\tpszDataFile = %p\n",
  500. Server,
  501. hZone,
  502. fUseDatabase,
  503. pszDataFile ));
  504. }
  505. RpcTryExcept
  506. {
  507. status = R_Dns4_ResetZoneDatabase(
  508. Server,
  509. hZone,
  510. fUseDatabase,
  511. pszDataFile );
  512. IF_DNSDBG( STUB )
  513. {
  514. DNS_PRINT((
  515. "R_Dns4_ResetZoneDatabase: status = %d / %p\n",
  516. status,
  517. status ));
  518. }
  519. }
  520. RpcExcept (1)
  521. {
  522. status = RpcExceptionCode();
  523. IF_DNSDBG( STUB )
  524. {
  525. DNS_PRINT((
  526. "RpcExcept: code = %d / %p\n",
  527. status,
  528. status ));
  529. }
  530. }
  531. RpcEndExcept
  532. return( status );
  533. }
  534. DNS_STATUS
  535. DNS_API_FUNCTION
  536. Dns4_ResetZoneMasters(
  537. IN LPCSTR Server,
  538. IN DNS_HANDLE hZone,
  539. IN DWORD cMasters,
  540. IN PIP_ADDRESS aipMasters
  541. )
  542. {
  543. DNS_STATUS status;
  544. IF_DNSDBG( STUB )
  545. {
  546. DNS_PRINT((
  547. "Enter R_Dns4_ResetZoneMasters()\n"
  548. "\tServer = %s\n"
  549. "\thZone = %p\n"
  550. "\tcMasters = %d\n"
  551. "\taipMasters = %p\n",
  552. Server,
  553. hZone,
  554. cMasters,
  555. aipMasters ));
  556. }
  557. RpcTryExcept
  558. {
  559. status = R_Dns4_ResetZoneMasters(
  560. Server,
  561. hZone,
  562. cMasters,
  563. aipMasters );
  564. IF_DNSDBG( STUB )
  565. {
  566. DNS_PRINT((
  567. "R_Dns4_ResetZoneMasters: status = %d / %p\n",
  568. status,
  569. status ));
  570. }
  571. }
  572. RpcExcept (1)
  573. {
  574. status = RpcExceptionCode();
  575. IF_DNSDBG( STUB )
  576. {
  577. DNS_PRINT((
  578. "RpcExcept: code = %d / %p\n",
  579. status,
  580. status ));
  581. }
  582. }
  583. RpcEndExcept
  584. return( status );
  585. }
  586. DNS_STATUS
  587. DNS_API_FUNCTION
  588. Dns4_ResetZoneSecondaries(
  589. IN LPCSTR Server,
  590. IN DNS_HANDLE hZone,
  591. IN DWORD fSecureSecondaries,
  592. IN DWORD cSecondaries,
  593. IN PIP_ADDRESS aipSecondaries
  594. )
  595. {
  596. DNS_STATUS status;
  597. IF_DNSDBG( STUB )
  598. {
  599. DNS_PRINT((
  600. "Enter R_Dns4_ResetZoneSecondaries()\n"
  601. "\tServer = %s\n"
  602. "\thZone = %p\n"
  603. "\tfSecureSecs = %d\n"
  604. "\tcSecondaries = %d\n"
  605. "\taipSecondaries = %p\n",
  606. Server,
  607. hZone,
  608. fSecureSecondaries,
  609. cSecondaries,
  610. aipSecondaries ));
  611. }
  612. RpcTryExcept
  613. {
  614. status = R_Dns4_ResetZoneSecondaries(
  615. Server,
  616. hZone,
  617. fSecureSecondaries,
  618. cSecondaries,
  619. aipSecondaries );
  620. IF_DNSDBG( STUB )
  621. {
  622. DNS_PRINT((
  623. "R_Dns4_ResetZoneSecondaries: status = %d / %p\n",
  624. status,
  625. status ));
  626. }
  627. }
  628. RpcExcept (1)
  629. {
  630. status = RpcExceptionCode();
  631. IF_DNSDBG( STUB )
  632. {
  633. DNS_PRINT((
  634. "RpcExcept: code = %d / %p\n",
  635. status,
  636. status ));
  637. }
  638. }
  639. RpcEndExcept
  640. return( status );
  641. }
  642. //
  643. // Zone management API
  644. //
  645. DNS_STATUS
  646. DNS_API_FUNCTION
  647. Dns4_CreateZone(
  648. IN LPCSTR Server,
  649. OUT PDNS_HANDLE phZone,
  650. IN LPCSTR pszZoneName,
  651. IN DWORD dwZoneType,
  652. IN LPCSTR pszAdminEmailName,
  653. IN DWORD cMasters,
  654. IN PIP_ADDRESS aipMasters,
  655. IN DWORD dwUseDatabase,
  656. IN LPCSTR pszDataFile
  657. )
  658. {
  659. DNS_STATUS status;
  660. IF_DNSDBG( STUB )
  661. {
  662. DNS_PRINT((
  663. "Enter R_Dns4_CreateZone()\n"
  664. "\tServer = %s\n"
  665. "\tphZone = %p\n"
  666. "\tpszZoneName = %s\n"
  667. "\tdwZoneType = %d\n"
  668. "\tpszAdminEmail = %s\n"
  669. "\tcMasters = %d\n"
  670. "\taipMasters = %p\n"
  671. "\tdwUseDatabase = %d\n"
  672. "\tpszDataFile = %s\n",
  673. Server,
  674. phZone,
  675. pszZoneName,
  676. dwZoneType,
  677. pszAdminEmailName,
  678. cMasters,
  679. aipMasters,
  680. dwUseDatabase,
  681. pszDataFile ));
  682. }
  683. RpcTryExcept
  684. {
  685. status = R_Dns4_CreateZone(
  686. Server,
  687. phZone,
  688. pszZoneName,
  689. dwZoneType,
  690. pszAdminEmailName,
  691. cMasters,
  692. aipMasters,
  693. dwUseDatabase,
  694. pszDataFile );
  695. IF_DNSDBG( STUB )
  696. {
  697. DNS_PRINT((
  698. "R_Dns4_CreateZone: status = %d / %p\n"
  699. "\tphZone = %p\n"
  700. "\thZone = %p\n",
  701. status,
  702. status,
  703. phZone,
  704. *phZone ));
  705. }
  706. }
  707. RpcExcept (1)
  708. {
  709. status = RpcExceptionCode();
  710. IF_DNSDBG( STUB )
  711. {
  712. DNS_PRINT((
  713. "RpcExcept: code = %d / %p\n",
  714. status,
  715. status ));
  716. }
  717. }
  718. RpcEndExcept
  719. return( status );
  720. }
  721. DNS_STATUS
  722. DNS_API_FUNCTION
  723. Dns4_IncrementZoneVersion(
  724. IN LPCSTR Server,
  725. IN DNS_HANDLE hZone
  726. )
  727. {
  728. DNS_STATUS status;
  729. IF_DNSDBG( STUB )
  730. {
  731. DNS_PRINT((
  732. "Enter R_Dns4_IncrementZoneVersion()\n"
  733. "\tServer = %s\n"
  734. "\thZone = %p\n",
  735. Server,
  736. hZone ));
  737. }
  738. RpcTryExcept
  739. {
  740. status = R_Dns4_IncrementZoneVersion(
  741. Server,
  742. hZone );
  743. IF_DNSDBG( STUB )
  744. {
  745. DNS_PRINT((
  746. "Leave R_Dns4_IncrementZoneVersion(): status %d / %p\n",
  747. status,
  748. status ));
  749. }
  750. }
  751. RpcExcept (1)
  752. {
  753. status = RpcExceptionCode();
  754. IF_DNSDBG( STUB )
  755. {
  756. DNS_PRINT((
  757. "RpcExcept: code = %d / %p\n",
  758. status,
  759. status ));
  760. }
  761. }
  762. RpcEndExcept
  763. return( status );
  764. }
  765. DNS_STATUS
  766. DNS_API_FUNCTION
  767. Dns4_DeleteZone(
  768. IN LPCSTR Server,
  769. IN DNS_HANDLE hZone
  770. )
  771. {
  772. DNS_STATUS status;
  773. IF_DNSDBG( STUB )
  774. {
  775. DNS_PRINT((
  776. "Enter R_Dns4_DeleteZone()\n"
  777. "\tServer = %s\n"
  778. "\thZone = %p\n",
  779. Server,
  780. hZone ));
  781. }
  782. RpcTryExcept
  783. {
  784. status = R_Dns4_DeleteZone(
  785. Server,
  786. hZone );
  787. IF_DNSDBG( STUB )
  788. {
  789. DNS_PRINT((
  790. "Leave R_Dns4_DeleteZone(): status %d / %p\n",
  791. status,
  792. status ));
  793. }
  794. }
  795. RpcExcept (1)
  796. {
  797. status = RpcExceptionCode();
  798. IF_DNSDBG( STUB )
  799. {
  800. DNS_PRINT((
  801. "RpcExcept: code = %d / %p\n",
  802. status,
  803. status ));
  804. }
  805. }
  806. RpcEndExcept
  807. return( status );
  808. }
  809. DNS_STATUS
  810. DNS_API_FUNCTION
  811. Dns4_PauseZone(
  812. IN LPCSTR Server,
  813. IN DNS_HANDLE hZone
  814. )
  815. {
  816. DNS_STATUS status;
  817. IF_DNSDBG( STUB )
  818. {
  819. DNS_PRINT((
  820. "Enter R_Dns4_PauseZone()\n"
  821. "\tServer = %s\n"
  822. "\thZone = %p\n",
  823. Server,
  824. hZone ));
  825. }
  826. RpcTryExcept
  827. {
  828. status = R_Dns4_PauseZone(
  829. Server,
  830. hZone );
  831. IF_DNSDBG( STUB )
  832. {
  833. DNS_PRINT((
  834. "Leave R_Dns4_PauseZone(): status %d / %p\n",
  835. status,
  836. status ));
  837. }
  838. }
  839. RpcExcept (1)
  840. {
  841. status = RpcExceptionCode();
  842. IF_DNSDBG( STUB )
  843. {
  844. DNS_PRINT((
  845. "RpcExcept: code = %d / %p\n",
  846. status,
  847. status ));
  848. }
  849. }
  850. RpcEndExcept
  851. return( status );
  852. }
  853. DNS_STATUS
  854. DNS_API_FUNCTION
  855. Dns4_ResumeZone(
  856. IN LPCSTR Server,
  857. IN DNS_HANDLE hZone
  858. )
  859. {
  860. DNS_STATUS status;
  861. IF_DNSDBG( STUB )
  862. {
  863. DNS_PRINT((
  864. "Enter R_Dns4_ResumeZone()\n"
  865. "\tServer = %s\n"
  866. "\thZone = %p\n",
  867. Server,
  868. hZone ));
  869. }
  870. RpcTryExcept
  871. {
  872. status = R_Dns4_ResumeZone(
  873. Server,
  874. hZone );
  875. IF_DNSDBG( STUB )
  876. {
  877. DNS_PRINT((
  878. "Leave R_Dns4_ResumeZone(): status %d / %p\n",
  879. status,
  880. status ));
  881. }
  882. }
  883. RpcExcept (1)
  884. {
  885. status = RpcExceptionCode();
  886. IF_DNSDBG( STUB )
  887. {
  888. DNS_PRINT((
  889. "RpcExcept: code = %d / %p\n",
  890. status,
  891. status ));
  892. }
  893. }
  894. RpcEndExcept
  895. return( status );
  896. }
  897. //
  898. // Record viewing API
  899. //
  900. DNS_STATUS
  901. DNS_API_FUNCTION
  902. Dns4_EnumNodeRecords(
  903. IN LPCSTR Server,
  904. IN LPCSTR pszNodeName,
  905. IN WORD wRecordType,
  906. IN DWORD fNoCacheData,
  907. IN OUT PDWORD pdwBufferLength,
  908. OUT BYTE aBuffer[]
  909. )
  910. {
  911. DNS_PRINT(( "Dns4_EnumNodeRecords() API retired!!!\n" ));
  912. // don't assert yet to protect old admin in NT builds
  913. // ASSERT( FALSE );
  914. *pdwBufferLength = 0;
  915. return( ERROR_SUCCESS );
  916. }
  917. DNS_STATUS
  918. DNS_API_FUNCTION
  919. Dns4_EnumRecords(
  920. IN LPCSTR Server,
  921. IN LPCSTR pszNodeName,
  922. IN LPCSTR pszStartChild,
  923. IN WORD wRecordType,
  924. IN DWORD dwSelectFlag,
  925. IN OUT PDWORD pdwBufferLength,
  926. OUT BYTE aBuffer[]
  927. )
  928. {
  929. DNS_STATUS status;
  930. IF_DNSDBG( STUB )
  931. {
  932. DNS_PRINT((
  933. "Enter R_Dns4_EnumRecords()\n"
  934. "\tServer = %s\n"
  935. "\tpszNodeName = %s\n"
  936. "\tpszStartChild = %s\n"
  937. "\twRecordType = %d\n"
  938. "\tdwSelectFlag = %p\n"
  939. "\tdwBufferLength = %d\n"
  940. "\taBuffer = %p\n",
  941. Server,
  942. pszNodeName,
  943. pszStartChild,
  944. wRecordType,
  945. dwSelectFlag,
  946. *pdwBufferLength,
  947. aBuffer ));
  948. }
  949. RpcTryExcept
  950. {
  951. status = R_Dns4_EnumRecords(
  952. Server,
  953. pszNodeName,
  954. pszStartChild,
  955. wRecordType,
  956. dwSelectFlag,
  957. pdwBufferLength,
  958. aBuffer );
  959. IF_DNSDBG( STUB )
  960. {
  961. DNS_PRINT((
  962. "R_Dns4_EnumRecords: status = %d / %p\n",
  963. status,
  964. status ));
  965. if ( status == ERROR_SUCCESS )
  966. {
  967. DnsDbg_RpcRecordsInBuffer(
  968. "Returned records: ",
  969. *pdwBufferLength,
  970. aBuffer );
  971. }
  972. }
  973. }
  974. RpcExcept (1)
  975. {
  976. status = RpcExceptionCode();
  977. IF_DNSDBG( STUB )
  978. {
  979. DNS_PRINT((
  980. "RpcExcept: code = %d / %p\n",
  981. status,
  982. status ));
  983. }
  984. }
  985. RpcEndExcept
  986. return( status );
  987. }
  988. DNS_STATUS
  989. DNS_API_FUNCTION
  990. Dns4_GetZoneWinsInfo(
  991. IN LPCSTR Server,
  992. IN DNS_HANDLE hZone,
  993. OUT PDWORD pfUsingWins,
  994. IN OUT PDWORD pdwBufferLength,
  995. OUT BYTE aBuffer[]
  996. )
  997. {
  998. DNS_STATUS status;
  999. IF_DNSDBG( STUB )
  1000. {
  1001. DNS_PRINT((
  1002. "Enter R_Dns4_GetZoneWinsInfo()\n"
  1003. "\tServer = %s\n"
  1004. "\thZone = %p\n"
  1005. "\tpfUsingWins = %p\n"
  1006. "\tdwBufferLength = %d\n"
  1007. "\taBuffer = %p\n",
  1008. Server,
  1009. hZone,
  1010. pfUsingWins,
  1011. *pdwBufferLength,
  1012. aBuffer ));
  1013. }
  1014. RpcTryExcept
  1015. {
  1016. status = R_Dns4_GetZoneWinsInfo(
  1017. Server,
  1018. hZone,
  1019. pfUsingWins,
  1020. pdwBufferLength,
  1021. aBuffer );
  1022. IF_DNSDBG( STUB )
  1023. {
  1024. DNS_PRINT((
  1025. "R_Dns4_GetZoneWinsInfo: status = %d / %p\n",
  1026. status,
  1027. status ));
  1028. if ( status == ERROR_SUCCESS )
  1029. {
  1030. DnsDbg_RpcRecordsInBuffer(
  1031. "Returned records: ",
  1032. *pdwBufferLength,
  1033. aBuffer );
  1034. }
  1035. }
  1036. }
  1037. RpcExcept (1)
  1038. {
  1039. status = RpcExceptionCode();
  1040. IF_DNSDBG( STUB )
  1041. {
  1042. DNS_PRINT((
  1043. "RpcExcept: code = %d / %p\n",
  1044. status,
  1045. status ));
  1046. }
  1047. }
  1048. RpcEndExcept
  1049. return( status );
  1050. }
  1051. //
  1052. // Record management API
  1053. //
  1054. DNS_STATUS
  1055. DNS_API_FUNCTION
  1056. Dns4_UpdateRecord(
  1057. IN LPCSTR Server,
  1058. IN DNS_HANDLE hZone,
  1059. IN LPCSTR pszNodeName,
  1060. IN OUT PDNS_HANDLE phRecord,
  1061. IN DWORD dwDataLength,
  1062. OUT BYTE abData[]
  1063. )
  1064. {
  1065. DNS_STATUS status;
  1066. IF_DNSDBG( STUB )
  1067. {
  1068. DNS_PRINT((
  1069. "Enter R_Dns4_UpdateRecord()\n"
  1070. "\tServer = %s\n"
  1071. "\thZone = %d\n"
  1072. "\tpszNodeName = %s\n"
  1073. "\tphRecord = %p\n"
  1074. "\t*phRecord = %p\n"
  1075. "\tdwDataLength = %d\n"
  1076. "\tabData = %p\n",
  1077. Server,
  1078. hZone,
  1079. pszNodeName,
  1080. phRecord,
  1081. ( phRecord ? *phRecord : 0 ),
  1082. dwDataLength,
  1083. abData ));
  1084. }
  1085. RpcTryExcept
  1086. {
  1087. status = R_Dns4_UpdateRecord(
  1088. Server,
  1089. hZone,
  1090. pszNodeName,
  1091. phRecord,
  1092. dwDataLength,
  1093. abData );
  1094. IF_DNSDBG( STUB )
  1095. {
  1096. DNS_PRINT((
  1097. "R_Dns4_UpdateRecord: status = %d / %p\n",
  1098. status,
  1099. status ));
  1100. }
  1101. }
  1102. RpcExcept (1)
  1103. {
  1104. status = RpcExceptionCode();
  1105. IF_DNSDBG( STUB )
  1106. {
  1107. DNS_PRINT((
  1108. "RpcExcept: code = %d / %p\n",
  1109. status,
  1110. status ));
  1111. }
  1112. }
  1113. RpcEndExcept
  1114. return( status );
  1115. }
  1116. DNS_STATUS
  1117. DNS_API_FUNCTION
  1118. Dns4_DeleteRecord(
  1119. IN LPCSTR Server,
  1120. IN LPCSTR pszNodeName,
  1121. OUT DNS_HANDLE hRecord
  1122. )
  1123. {
  1124. DNS_STATUS status;
  1125. IF_DNSDBG( STUB )
  1126. {
  1127. DNS_PRINT((
  1128. "Enter R_Dns4_DeleteRecord()\n"
  1129. "\tServer = %s\n"
  1130. "\tpszNodeName = %s\n"
  1131. "\thRecord = %d\n",
  1132. Server,
  1133. pszNodeName,
  1134. hRecord ));
  1135. }
  1136. RpcTryExcept
  1137. {
  1138. status = R_Dns4_DeleteRecord(
  1139. Server,
  1140. pszNodeName,
  1141. hRecord );
  1142. IF_DNSDBG( STUB )
  1143. {
  1144. DNS_PRINT((
  1145. "R_Dns4_DeleteRecord: status = %d / %p\n",
  1146. status,
  1147. status ));
  1148. }
  1149. }
  1150. RpcExcept (1)
  1151. {
  1152. status = RpcExceptionCode();
  1153. IF_DNSDBG( STUB )
  1154. {
  1155. DNS_PRINT((
  1156. "RpcExcept: code = %d / %p\n",
  1157. status,
  1158. status ));
  1159. }
  1160. }
  1161. RpcEndExcept
  1162. return( status );
  1163. }
  1164. DNS_STATUS
  1165. DNS_API_FUNCTION
  1166. Dns4_DeleteName(
  1167. IN LPCSTR Server,
  1168. IN LPCSTR pszNodeName,
  1169. OUT DNS_HANDLE fDeleteSubtree
  1170. )
  1171. {
  1172. DNS_STATUS status;
  1173. IF_DNSDBG( STUB )
  1174. {
  1175. DNS_PRINT((
  1176. "Enter R_Dns4_DeleteName()\n"
  1177. "\tServer = %s\n"
  1178. "\tpszNodeName = %s\n"
  1179. "\tfDeleteSubtree = %d\n",
  1180. Server,
  1181. pszNodeName,
  1182. fDeleteSubtree ));
  1183. }
  1184. RpcTryExcept
  1185. {
  1186. status = R_Dns4_DeleteName(
  1187. Server,
  1188. pszNodeName,
  1189. fDeleteSubtree );
  1190. IF_DNSDBG( STUB )
  1191. {
  1192. DNS_PRINT((
  1193. "R_Dns4_DeleteName: status = %d / %p\n",
  1194. status,
  1195. status ));
  1196. }
  1197. }
  1198. RpcExcept (1)
  1199. {
  1200. status = RpcExceptionCode();
  1201. IF_DNSDBG( STUB )
  1202. {
  1203. DNS_PRINT((
  1204. "RpcExcept: code = %d / %p\n",
  1205. status,
  1206. status ));
  1207. }
  1208. }
  1209. RpcEndExcept
  1210. return( status );
  1211. }
  1212. //
  1213. // End of rpcstub.c
  1214. //