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.

885 lines
17 KiB

  1. /*++
  2. Copyright (c) 1996-2000 Microsoft Corporation
  3. Module Name:
  4. dnsapip.h
  5. Abstract:
  6. Domain Name System (DNS) API
  7. DNS API Private routines.
  8. These are internal routines for dnsapi.dll AND some exported
  9. routines for private use by DNS components which need not or
  10. should not be exposed in public dnsapi.h header.
  11. Author:
  12. Jim Gilroy (jamesg) December 7, 1996
  13. Revision History:
  14. --*/
  15. #ifndef _DNSAPIP_INCLUDED_
  16. #define _DNSAPIP_INCLUDED_
  17. #include <ws2tcpip.h>
  18. #include <dnsapi.h>
  19. #include "dnslib.h"
  20. #include "align.h"
  21. #include "iphlpapi.h"
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif // __cplusplus
  26. //
  27. // DCR: add to winerror.h
  28. //
  29. #define DNS_ERROR_REFERRAL_RESPONSE 9506L
  30. //
  31. // Service stuff
  32. //
  33. // defined in resrpc.h
  34. //#define DNS_RESOLVER_SERVICE L"dnscache"
  35. #define DNS_SERVER_SERVICE L"dns"
  36. //
  37. // QWORD
  38. //
  39. #ifndef QWORD
  40. typedef DWORD64 QWORD, *PQWORD;
  41. #endif
  42. //
  43. // Max address and sockaddr
  44. // IP6 in ws2tcpip.h
  45. // ATM in ws2atm.h
  46. typedef union
  47. {
  48. SOCKADDR_IN SockaddrIn;
  49. SOCKADDR_IN6 SockaddrIn6;
  50. //SOCKADDR_ATM SockaddrAtm;
  51. }
  52. SOCKADDR_IP, *PSOCKADDR_IP;
  53. typedef union
  54. {
  55. IP4_ADDRESS Ip4Addr;
  56. IP6_ADDRESS Ip6Addr;
  57. //ATM_ADDRESS; AtmAddr;
  58. }
  59. DNS_MAX_ADDRESS, *PDNS_MAX_ADDRESS;
  60. #define DNS_MAX_ADDRESS_LENGTH (sizeof(DNS_MAX_ADDRESS))
  61. #define DNS_MAX_SOCKADDR_LENGTH (sizeof(SOCKADDR_IP))
  62. //
  63. // ws2tcpip.h macros converted to IP6_ADDRESS
  64. //
  65. WS2TCPIP_INLINE
  66. BOOL
  67. IP6_ADDR_EQUAL(
  68. IN const IP6_ADDRESS * pIp1,
  69. IN const IP6_ADDRESS * pIp2
  70. )
  71. {
  72. return RtlEqualMemory( pIp1, pIp2, sizeof(IP6_ADDRESS) );
  73. }
  74. WS2TCPIP_INLINE
  75. BOOL
  76. IP6_IS_ADDR_MULTICAST(
  77. IN const IP6_ADDRESS * pIpAddr
  78. )
  79. {
  80. return( pIpAddr->IP6Byte[0] == 0xff );
  81. }
  82. WS2TCPIP_INLINE
  83. BOOL
  84. IP6_IS_ADDR_LINKLOCAL(
  85. IN const IP6_ADDRESS * pIpAddr
  86. )
  87. {
  88. return( (pIpAddr->IP6Byte[0] == 0xfe) &&
  89. ((pIpAddr->IP6Byte[1] & 0xc0) == 0x80) );
  90. }
  91. WS2TCPIP_INLINE
  92. BOOL
  93. IP6_IS_ADDR_SITELOCAL(
  94. IN const IP6_ADDRESS * pIpAddr
  95. )
  96. {
  97. return ((pIpAddr->IP6Byte[0] == 0xfe) &&
  98. ((pIpAddr->IP6Byte[1] & 0xc0) == 0xc0));
  99. }
  100. WS2TCPIP_INLINE
  101. BOOL
  102. IP6_IS_ADDR_V4MAPPED(
  103. IN const IP6_ADDRESS * pIpAddr
  104. )
  105. {
  106. return ((pIpAddr->IP6Dword[0] == 0) &&
  107. (pIpAddr->IP6Dword[1] == 0) &&
  108. (pIpAddr->IP6Dword[2] == 0xffff0000) );
  109. }
  110. WS2TCPIP_INLINE
  111. BOOL
  112. IP6_IS_ADDR_V4COMPAT(
  113. IN const IP6_ADDRESS * pIpAddr
  114. )
  115. {
  116. // IP6 address has only last DWORD
  117. // and is NOT any or loopback
  118. return ((pIpAddr->IP6Dword[0] == 0) &&
  119. (pIpAddr->IP6Dword[1] == 0) &&
  120. (pIpAddr->IP6Dword[2] == 0) &&
  121. (pIpAddr->IP6Dword[3] != 0) &&
  122. (pIpAddr->IP6Dword[3] != 0x01000000) );
  123. }
  124. //
  125. // Tests piggy-backing on ws2tcpip.h ones
  126. //
  127. #define IP6_IS_ADDR_UNSPECIFIED(a) \
  128. IN6_ADDR_EQUAL( (PIN6_ADDR)(a), &in6addr_any )
  129. #if 0
  130. // this doesn't seem to work
  131. #define IP6_IS_ADDR_LOOPBACK(a) \
  132. IN6_ADDR_EQUAL( (PIN6_ADDR)(a), &in6addr_loopback )
  133. #endif
  134. WS2TCPIP_INLINE
  135. BOOL
  136. IP6_IS_ADDR_LOOPBACK(
  137. IN const IP6_ADDRESS * pIpAddr
  138. )
  139. {
  140. return ((pIpAddr->IP6Dword[0] == 0) &&
  141. (pIpAddr->IP6Dword[1] == 0) &&
  142. (pIpAddr->IP6Dword[2] == 0) &&
  143. (pIpAddr->IP6Dword[3] == 0x01000000) );
  144. }
  145. //
  146. // More IP6 extensions missing from ws2tcpip.h
  147. //
  148. WS2TCPIP_INLINE
  149. VOID
  150. IP6_SET_ADDR_ANY(
  151. OUT PIP6_ADDRESS pIn6Addr
  152. )
  153. {
  154. memset( pIn6Addr, 0, sizeof(*pIn6Addr) );
  155. //pIn6Addr->IP6Dword[0] = 0;
  156. //pIn6Addr->IP6Dword[1] = 0;
  157. //pIn6Addr->IP6Dword[2] = 0;
  158. //pIn6Addr->IP6Dword[3] = 0;
  159. }
  160. WS2TCPIP_INLINE
  161. VOID
  162. IP6_SET_ADDR_LOOPBACK(
  163. OUT PIP6_ADDRESS pIn6Addr
  164. )
  165. {
  166. pIn6Addr->IP6Dword[0] = 0;
  167. pIn6Addr->IP6Dword[1] = 0;
  168. pIn6Addr->IP6Dword[2] = 0;
  169. pIn6Addr->IP6Dword[3] = 0x01000000;
  170. }
  171. WS2TCPIP_INLINE
  172. VOID
  173. IP6_SET_ADDR_V4COMPAT(
  174. OUT PIP6_ADDRESS pIn6Addr,
  175. IN IP4_ADDRESS Ip4
  176. )
  177. {
  178. pIn6Addr->IP6Dword[0] = 0;
  179. pIn6Addr->IP6Dword[1] = 0;
  180. pIn6Addr->IP6Dword[2] = 0;
  181. pIn6Addr->IP6Dword[3] = Ip4;
  182. }
  183. WS2TCPIP_INLINE
  184. VOID
  185. IP6_SET_ADDR_V4MAPPED(
  186. OUT PIP6_ADDRESS pIn6Addr,
  187. IN IP4_ADDRESS Ip4
  188. )
  189. {
  190. pIn6Addr->IP6Dword[0] = 0;
  191. pIn6Addr->IP6Dword[1] = 0;
  192. pIn6Addr->IP6Dword[2] = 0xffff0000;
  193. pIn6Addr->IP6Dword[3] = Ip4;
  194. }
  195. WS2TCPIP_INLINE
  196. IP4_ADDRESS
  197. IP6_GET_V4_ADDR(
  198. IN const IP6_ADDRESS * pIn6Addr
  199. )
  200. {
  201. return( pIn6Addr->IP6Dword[3] );
  202. }
  203. //
  204. // Message Addressing
  205. //
  206. #define MSG_REMOTE_IP4(pMsg) \
  207. ( (pMsg)->RemoteAddress.In4.sin_addr.s_addr )
  208. #define MSG_REMOTE_IP_STRING(pMsg) \
  209. IP_STRING( MSG_REMOTE_IP4(pMsg) )
  210. #define MSG_REMOTE_IP_PORT(pMsg) \
  211. ( (pMsg)->RemoteAddress.In4.sin_port )
  212. //
  213. // Callback function defs
  214. //
  215. // These allow dnsapi.dll code to be executed with callbacks
  216. // into the resolver where behavior should differ for
  217. // execution in resolver context.
  218. //
  219. typedef PDNS_ADDR_ARRAY (* GET_ADDR_ARRAY_FUNC)( VOID );
  220. typedef BOOL (* QUERY_CACHE_FUNC)( PVOID );
  221. typedef BOOL (* IS_CLUSTER_IP_FUNC)( PVOID, PIP_UNION );
  222. //
  223. // Private query flags
  224. //
  225. #define DNSP_QUERY_FILTER_CLUSTER 0x01000000
  226. //
  227. // Query blob
  228. //
  229. #ifdef PQUERY_BLOB
  230. #undef PQUERY_BLOB
  231. #endif
  232. typedef struct _DnsResults
  233. {
  234. DNS_STATUS Status;
  235. WORD Rcode;
  236. // DCR: allow IP6, then put IP4 in IP6Mapped
  237. IP6_ADDRESS ServerIp6;
  238. IP4_ADDRESS ServerIp;
  239. PDNS_RECORD pAnswerRecords;
  240. PDNS_RECORD pAliasRecords;
  241. PDNS_RECORD pAuthorityRecords;
  242. PDNS_RECORD pAdditionalRecords;
  243. PDNS_RECORD pSigRecords;
  244. PDNS_MSG_BUF pMessage;
  245. }
  246. DNS_RESULTS, *PDNS_RESULTS;
  247. typedef struct _QueryBlob
  248. {
  249. // query data
  250. PWSTR pNameOrig;
  251. PSTR pNameOrigWire;
  252. PSTR pNameWire;
  253. WORD wType;
  254. WORD Reserved1;
  255. //16
  256. DWORD Flags;
  257. // query name info
  258. DWORD NameLength;
  259. DWORD NameAttributes;
  260. DWORD QueryCount;
  261. //32
  262. DWORD NameFlags;
  263. BOOL fAppendedName;
  264. // return info
  265. DWORD Status;
  266. WORD Rcode;
  267. WORD Reserved2;
  268. //48
  269. DWORD NetFailureStatus;
  270. BOOL fCacheNegative;
  271. BOOL fNoIpLocal;
  272. // remove these once results fixed up
  273. PDNS_RECORD pRecords;
  274. //64
  275. PDNS_RECORD pLocalRecords;
  276. // control info
  277. PDNS_NETINFO pNetworkInfo;
  278. PIP4_ARRAY pDnsServers;
  279. HANDLE hEvent;
  280. //80
  281. GET_ADDR_ARRAY_FUNC pfnGetAddrArray;
  282. QUERY_CACHE_FUNC pfnQueryCache;
  283. IS_CLUSTER_IP_FUNC pfnIsClusterIp;
  284. // result info
  285. PDNS_MSG_BUF pSendMsg;
  286. PDNS_MSG_BUF pRecvMsg;
  287. DNS_RESULTS Results;
  288. DNS_RESULTS BestResults;
  289. // buffers
  290. CHAR NameOriginalWire[ DNS_MAX_NAME_BUFFER_LENGTH ];
  291. CHAR NameWire[ DNS_MAX_NAME_BUFFER_LENGTH ];
  292. WCHAR NameBufferWide[ DNS_MAX_NAME_BUFFER_LENGTH ];
  293. // DCR: could do a message here
  294. }
  295. QUERY_BLOB, *PQUERY_BLOB;
  296. //
  297. // System event notification routine (PnP) (svccntl.c)
  298. //
  299. DWORD
  300. _fastcall
  301. SendServiceControl(
  302. IN LPWSTR pszServiceName,
  303. IN DWORD dwControl
  304. );
  305. //
  306. // Poke ops
  307. //
  308. #define POKE_OP_UPDATE_NETINFO (0x2f0d7831)
  309. #define POKE_COOKIE_UPDATE_NETINFO (0x4598efab)
  310. //
  311. // Network Info
  312. //
  313. //
  314. // Runtime network info flags
  315. //
  316. // DCR: no runtime ignore\disable
  317. // not yet using runtime ignore disable flag
  318. // when do should create combined
  319. //
  320. #define RUN_FLAG_NETINFO_PREPARED (0x00000001)
  321. #define RUN_FLAG_STOP_QUERY_ON_ADAPTER (0x00000010)
  322. #define RUN_FLAG_QUERIED_ADAPTER_DOMAIN (0x00010000)
  323. #define RUN_FLAG_RESET_SERVER_PRIORITY (0x00100000)
  324. #define RUN_FLAG_IGNORE_ADAPTER (0x10000000)
  325. #define RUN_FLAG_QUERY_MASK (0x00ffffff)
  326. #define RUN_FLAG_SINGLE_NAME_MASK (0x000000ff)
  327. // Create cleanup "levels" as mask of bits to keep
  328. // These are the params to NetInfo_Clean()
  329. #define CLEAR_LEVEL_ALL (0)
  330. #define CLEAR_LEVEL_QUERY (~RUN_FLAG_QUERY_MASK)
  331. #define CLEAR_LEVEL_SINGLE_NAME (~RUN_FLAG_SINGLE_NAME_MASK)
  332. VOID
  333. NetInfo_Free(
  334. IN OUT PDNS_NETINFO pNetInfo
  335. );
  336. PDNS_NETINFO
  337. NetInfo_Copy(
  338. IN PDNS_NETINFO pNetInfo
  339. );
  340. PDNS_NETINFO
  341. NetInfo_Build(
  342. IN BOOL fGetIpAddrs
  343. );
  344. VOID
  345. NetInfo_Clean(
  346. IN OUT PDNS_NETINFO pNetInfo,
  347. IN DWORD ClearLevel
  348. );
  349. VOID
  350. NetInfo_ResetServerPriorities(
  351. IN OUT PDNS_NETINFO pNetInfo,
  352. IN BOOL fLocalDnsOnly
  353. );
  354. //
  355. // Local IP info (localip.c)
  356. //
  357. PDNS_ADDR_ARRAY
  358. DnsGetLocalAddrArray(
  359. VOID
  360. );
  361. PDNS_ADDR_ARRAY
  362. DnsGetLocalAddrArrayDirect(
  363. VOID
  364. );
  365. //
  366. // Query (query.c)
  367. //
  368. #define DNS_ERROR_NAME_NOT_FOUND_LOCALLY \
  369. DNS_ERROR_RECORD_DOES_NOT_EXIST
  370. //
  371. // Main query routine to DNS servers
  372. //
  373. // Called both internally and from resolver
  374. //
  375. DNS_STATUS
  376. Query_Main(
  377. IN OUT PQUERY_BLOB pBlob
  378. );
  379. DNS_STATUS
  380. Query_SingleName(
  381. IN OUT PQUERY_BLOB pBlob
  382. );
  383. VOID
  384. CombineRecordsInBlob(
  385. IN PDNS_RESULTS pResults,
  386. OUT PDNS_RECORD * ppRecords
  387. );
  388. VOID
  389. BreakRecordsIntoBlob(
  390. OUT PDNS_RESULTS pResults,
  391. IN PDNS_RECORD pRecords,
  392. IN WORD wType
  393. );
  394. DNS_STATUS
  395. GetRecordsForLocalName(
  396. IN OUT PQUERY_BLOB pBlob
  397. );
  398. //
  399. // Called by dnsup.c
  400. //
  401. DNS_STATUS
  402. QueryDirectEx(
  403. IN OUT PDNS_MSG_BUF * ppMsgResponse,
  404. OUT PDNS_RECORD * ppResponseRecords,
  405. IN PDNS_HEADER pHeader,
  406. IN BOOL fNoHeaderCounts,
  407. IN PDNS_NAME pszQuestionName,
  408. IN WORD wQuestionType,
  409. IN PDNS_RECORD pRecords,
  410. IN DWORD dwFlags,
  411. IN PIP_ARRAY aipDnsServers,
  412. IN OUT PDNS_NETINFO pNetworkInfo
  413. );
  414. //
  415. // FAZ (faz.c)
  416. //
  417. DNS_STATUS
  418. DnsFindAuthoritativeZone(
  419. IN PDNS_NAME pszName,
  420. IN DWORD dwFlags,
  421. IN PIP_ARRAY aipQueryServers, OPTIONAL
  422. OUT PDNS_NETINFO * ppFazNetworkInfo
  423. );
  424. BOOL
  425. WINAPI
  426. CompareMultiAdapterSOAQueries(
  427. IN LPSTR pszDomainName,
  428. IN PIP_ARRAY pDnsServerList1,
  429. IN PIP_ARRAY pDnsServerList2
  430. );
  431. BOOL
  432. WINAPI
  433. CompareTwoAdaptersForSameNameSpace(
  434. IN PIP_ARRAY pDnsServerList1,
  435. IN PDNS_NETINFO pNetworkInfo1,
  436. IN OUT PDNS_RECORD * ppNsRecord1,
  437. IN PIP_ARRAY pDnsServerList2,
  438. IN PDNS_NETINFO pNetworkInfo2,
  439. IN OUT PDNS_RECORD * ppNsRecord2,
  440. IN BOOL bDoNsCheck
  441. );
  442. //
  443. // Update (update.c)
  444. //
  445. DNS_STATUS
  446. DnsUpdate(
  447. IN PDNS_RECORD pRecord,
  448. IN DWORD dwFlags,
  449. IN PDNS_NETINFO pNetworkInfo,
  450. IN HANDLE hCreds,
  451. OUT PDNS_MSG_BUF * ppMsgRecv OPTIONAL
  452. );
  453. //
  454. // Old flags used for DnsModifyRecordSet & DnsRegisterRRSet
  455. //
  456. #define DNS_UPDATE_UNIQUE 0x00000000
  457. #define DNS_UPDATE_SHARED 0x00000001
  458. //
  459. // Modify SET is completely private
  460. //
  461. DNS_STATUS
  462. WINAPI
  463. DnsModifyRecordSet_A(
  464. IN HANDLE hContextHandle OPTIONAL,
  465. IN PDNS_RECORD pCurrentSet,
  466. IN PDNS_RECORD pNewSet,
  467. IN DWORD fOptions,
  468. IN PIP_ARRAY aipServers OPTIONAL
  469. );
  470. DNS_STATUS
  471. WINAPI
  472. DnsModifyRecordSet_UTF8(
  473. IN HANDLE hContextHandle OPTIONAL,
  474. IN PDNS_RECORD pCurrentSet,
  475. IN PDNS_RECORD pNewSet,
  476. IN DWORD fOptions,
  477. IN PIP_ARRAY aipServers OPTIONAL
  478. );
  479. DNS_STATUS
  480. WINAPI
  481. DnsModifyRecordSet_W(
  482. IN HANDLE hContextHandle OPTIONAL,
  483. IN PDNS_RECORD pCurrentSet,
  484. IN PDNS_RECORD pNewSet,
  485. IN DWORD fOptions,
  486. IN PIP_ARRAY aipServers OPTIONAL
  487. );
  488. #ifdef UNICODE
  489. #define DnsModifyRecordSet DnsModifyRecordSet_W
  490. #else
  491. #define DnsModifyRecordSet DnsModifyRecordSet_A
  492. #endif
  493. DNS_STATUS
  494. WINAPI
  495. DnsAddRecordSet_A(
  496. IN HANDLE hContextHandle OPTIONAL,
  497. IN PDNS_RECORD pRRSet,
  498. IN DWORD fOptions,
  499. IN PIP_ARRAY aipServers OPTIONAL
  500. );
  501. DNS_STATUS
  502. WINAPI
  503. DnsAddRecordSet_UTF8(
  504. IN HANDLE hContextHandle OPTIONAL,
  505. IN PDNS_RECORD pRRSet,
  506. IN DWORD fOptions,
  507. IN PIP_ARRAY aipServers OPTIONAL
  508. );
  509. DNS_STATUS
  510. WINAPI
  511. DnsAddRecordSet_W(
  512. IN HANDLE hContextHandle OPTIONAL,
  513. IN PDNS_RECORD pRRSet,
  514. IN DWORD fOptions,
  515. IN PIP_ARRAY aipServers OPTIONAL
  516. );
  517. #ifdef UNICODE
  518. #define DnsAddRecordSet DnsAddRecordSet_W
  519. #else
  520. #define DnsAddRecordSet DnsAddRecordSet_A
  521. #endif
  522. //
  523. // Sockets (socket.c)
  524. //
  525. DNS_STATUS
  526. Dns_InitializeWinsockEx(
  527. IN BOOL fForce
  528. );
  529. DNS_STATUS
  530. Dns_CacheSocketInit(
  531. IN DWORD MaxSocketCount
  532. );
  533. VOID
  534. Dns_CacheSocketCleanup(
  535. VOID
  536. );
  537. SOCKET
  538. Dns_GetUdpSocket(
  539. VOID
  540. );
  541. VOID
  542. Dns_ReturnUdpSocket(
  543. IN SOCKET Socket
  544. );
  545. //
  546. // Host file (hostfile.c)
  547. //
  548. #define MAXALIASES (8)
  549. #define MAX_HOST_FILE_LINE_SIZE (1000)
  550. typedef struct _HostFileInfo
  551. {
  552. FILE * hFile;
  553. PSTR pszFileName;
  554. // build records
  555. BOOL fBuildRecords;
  556. // record results
  557. PDNS_RECORD pForwardRR;
  558. PDNS_RECORD pReverseRR;
  559. PDNS_RECORD pAliasRR;
  560. // line data
  561. IP_UNION Ip;
  562. PCHAR pAddrString;
  563. PCHAR pHostName;
  564. PCHAR AliasArray[ MAXALIASES+1 ];
  565. CHAR HostLineBuf[ MAX_HOST_FILE_LINE_SIZE+1 ];
  566. }
  567. HOST_FILE_INFO, *PHOST_FILE_INFO;
  568. BOOL
  569. Dns_OpenHostFile(
  570. IN OUT PHOST_FILE_INFO pHostInfo
  571. );
  572. VOID
  573. Dns_CloseHostFile(
  574. IN OUT PHOST_FILE_INFO pHostInfo
  575. );
  576. BOOL
  577. Dns_ReadHostFileLine(
  578. IN OUT PHOST_FILE_INFO pHostInfo
  579. );
  580. //
  581. // Debug sharing
  582. //
  583. PDNS_DEBUG_INFO
  584. DnsApiSetDebugGlobals(
  585. IN OUT PDNS_DEBUG_INFO pInfo
  586. );
  587. //
  588. // DnsLib routine
  589. //
  590. // dnslib.lib routines that depend on client only definitions
  591. // and hence not defined in server space.
  592. // Note, these could be moved to dnslibp.h with some sort of
  593. // #define for client only builds, or #define that the type
  594. // definition has been picked up from resrpc.h
  595. //
  596. //
  597. // Record prioritization (rrsort.c)
  598. //
  599. // Defined here because DNS_ADDR_INFO definition
  600. // should NOT be public
  601. //
  602. PDNS_RECORD
  603. Dns_PrioritizeARecordSet(
  604. IN PDNS_RECORD pRR,
  605. IN PDNS_ADDR_INFO aAddressInfo,
  606. IN DWORD cipAddress
  607. );
  608. PDNS_RECORD
  609. Dns_PrioritizeRecordSet(
  610. IN OUT PDNS_RECORD pRecordList,
  611. IN PDNS_ADDR_INFO aAddressInfo,
  612. IN DWORD cAddressInfo
  613. );
  614. PDNS_RECORD
  615. Dns_PrioritizeRecordSetEx(
  616. IN OUT PDNS_RECORD pRecordList,
  617. IN PDNS_ADDR_ARRAY pAddrArray
  618. );
  619. //
  620. // Printing of private dnsapi types (dnslib\print.c)
  621. //
  622. VOID
  623. DnsPrint_NetworkInfo(
  624. IN PRINT_ROUTINE PrintRoutine,
  625. IN OUT PVOID pContext,
  626. IN LPSTR pszHeader,
  627. IN PDNS_NETINFO pNetworkInfo
  628. );
  629. VOID
  630. DnsPrint_AdapterInfo(
  631. IN PRINT_ROUTINE PrintRoutine,
  632. IN OUT PPRINT_CONTEXT pContext,
  633. IN LPSTR pszHeader,
  634. IN PDNS_ADAPTER pAdapterInfo
  635. );
  636. VOID
  637. DnsPrint_SearchList(
  638. IN PRINT_ROUTINE PrintRoutine,
  639. IN OUT PPRINT_CONTEXT pContext,
  640. IN LPSTR pszHeader,
  641. IN PSEARCH_LIST pSearchList
  642. );
  643. VOID
  644. DnsPrint_QueryBlob(
  645. IN PRINT_ROUTINE PrintRoutine,
  646. IN OUT PPRINT_CONTEXT pContext,
  647. IN PSTR pszHeader,
  648. IN PQUERY_BLOB pQueryBlob
  649. );
  650. VOID
  651. DnsPrint_QueryInfo(
  652. IN PRINT_ROUTINE PrintRoutine,
  653. IN OUT PPRINT_CONTEXT pContext,
  654. IN PSTR pszHeader,
  655. IN PDNS_QUERY_INFO pQueryInfo
  656. );
  657. VOID
  658. DnsPrint_DnsAddrArray(
  659. IN PRINT_ROUTINE PrintRoutine,
  660. IN OUT PPRINT_CONTEXT pContext,
  661. IN PSTR pszHeader,
  662. IN PDNS_ADDR_ARRAY pAddrArray
  663. );
  664. #if DBG
  665. #define DnsDbg_NetworkInfo(a,b) DnsPrint_NetworkInfo(DnsPR,NULL,(a),(b))
  666. #define DnsDbg_AdapterInfo(a,b) DnsPrint_AdapterInfo(DnsPR,NULL,(a),(b))
  667. #define DnsDbg_SearchList(a,b) DnsPrint_SearchList(DnsPR,NULL,(a),(b))
  668. #define DnsDbg_DnsAddrArray(a,b) DnsPrint_DnsAddrArray(DnsPR,NULL,a,b)
  669. #define DnsDbg_QueryBlob(a,b) DnsPrint_QueryBlob(DnsPR,NULL,(a),(b))
  670. #define DnsDbg_QueryInfo(a,b) DnsPrint_QueryInfo(DnsPR,NULL,(a),(b))
  671. #else // retail
  672. #define DnsDbg_NetworkInfo(a,b)
  673. #define DnsDbg_AdapterInfo(a,b)
  674. #define DnsDbg_SearchList(a,b)
  675. #define DnsDbg_DnsAddrArray(a,b)
  676. #define DnsDbg_QueryBlob(a,b)
  677. #define DnsDbg_QueryInfo(a,b)
  678. #endif
  679. #ifdef __cplusplus
  680. }
  681. #endif // __cplusplus
  682. #endif // _DNSAPIP_INCLUDED_