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.

846 lines
19 KiB

  1. /*++
  2. Copyright (c) 1996-2002 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 <winsock2.h>
  18. #include <ws2tcpip.h>
  19. #include <iptypes.h>
  20. #include <dnsapi.h>
  21. #include <dnslib.h>
  22. #include <iphlpapi.h>
  23. #include <align.h>
  24. #define DNS_ADDR_DEFINED_IP6 1
  25. #include "dnsip.h"
  26. #ifdef __cplusplus
  27. extern "C"
  28. {
  29. #endif // __cplusplus
  30. //
  31. // DCR: add to winerror.h
  32. //
  33. #define DNS_ERROR_REFERRAL_RESPONSE 9506L
  34. //
  35. // Service stuff
  36. //
  37. // defined in resrpc.h
  38. //#define DNS_RESOLVER_SERVICE L"dnscache"
  39. #define DNS_SERVER_SERVICE L"dns"
  40. //
  41. // Multicast address defs
  42. //
  43. #define MCAST_PORT_NET_ORDER (0x3535) // 5353
  44. #define MCAST_IP4_ADDRESS (0xfb0000e0) // 224.0.0.251.
  45. //
  46. // Internal address defs
  47. // - using DNS_ADDR
  48. typedef DNS_ADDR_ARRAY ADDR_ARRAY, *PADDR_ARRAY;
  49. //
  50. // Address flag mappings
  51. // - currently carrying IP help flags directly
  52. #define DNSADDR_FLAG_PUBLIC IP_ADAPTER_ADDRESS_DNS_ELIGIBLE
  53. #define DNSADDR_FLAG_TRANSIENT IP_ADAPTER_ADDRESS_TRANSIENT
  54. #define DNSADDR_FLAG_TYPE_MASK (DNSADDR_FLAG_PUBLIC | DNSADDR_FLAG_TRANSIENT)
  55. //
  56. // Default matching for our addr operations is just IP address.
  57. // - not sockaddr fields, not port, not subnet.
  58. //
  59. #define DAMT DNSADDR_MATCH_IP
  60. #define DAddr_IsEqual(a,b) DnsAddr_IsEqual( a, b, DAMT )
  61. #define AddrArray_ContainsAddr( a, pa ) DnsAddrArray_ContainsAddr( a, pa, DAMT )
  62. #define AddrArray_AddAddr( a, pa ) DnsAddrArray_AddAddr( a, pa, 0, DAMT )
  63. #define AddrArray_AddSockaddr( a, pa, fam ) DnsAddrArray_AddSockaddr( a, pa, fam, DAMT )
  64. #define AddrArray_DeleteAddr( a, pa ) DnsAddrArray_DeleteAddr( a, p, DAMT )
  65. #define AddrArray_DeleteIp6( a, p6 ) DnsAddrArray_DeleteIp6( a, p6, DAMT )
  66. #define AddrArray_DeleteIp4( a, ip4 ) DnsAddrArray_DeleteIp4( a, ip4, DAMT )
  67. #define AddrArray_Diff( a1, a2, oa1, oa2, oai ) DnsAddrArray_Diff( a1, a2, DAMT, oa1, oa2, oai )
  68. #define AddrArray_IsIntersection( a1, a2 ) DnsAddrArray_IsIntersection( a1, a2, DAMT )
  69. #define AddrArray_IsEqual( a1, a2 ) DnsAddrArray_IsEqual( a1, a2, DAMT )
  70. //
  71. // Message Addressing
  72. //
  73. #define MSG_SOCKADDR_IS_IP4(pMsg) DNS_ADDR_IS_IP4( &(pMsg)->RemoteAddress )
  74. #define MSG_SOCKADDR_IS_IP6(pMsg) DNS_ADDR_IS_IP6( &(pMsg)->RemoteAddress )
  75. #define MSG_REMOTE_FAMILY(pMsg) \
  76. ( (pMsg)->RemoteAddress.Sockaddr.sa_family )
  77. #define MSG_REMOTE_IP_PORT(pMsg) \
  78. ( (pMsg)->RemoteAddress.SockaddrIn.sin_port )
  79. #define MSG_REMOTE_IPADDR_STRING(pMsg) \
  80. DnsAddr_Ntoa( &(pMsg)->RemoteAddress )
  81. //
  82. // Callback function defs
  83. //
  84. // These allow dnsapi.dll code to be executed with callbacks
  85. // into the resolver where behavior should differ for
  86. // execution in resolver context.
  87. //
  88. typedef BOOL (* QUERY_CACHE_FUNC)( PVOID );
  89. //
  90. // Private query flags
  91. //
  92. #define DNSP_QUERY_NO_GENERIC_NAMES 0x08000000
  93. #define DNSP_QUERY_INCLUDE_CLUSTER 0x10000000
  94. //
  95. // Results info
  96. //
  97. typedef struct _BasicResults
  98. {
  99. DNS_STATUS Status;
  100. DWORD Rcode;
  101. DNS_ADDR ServerAddr;
  102. }
  103. BASIC_RESULTS, *PBASIC_RESULTS;
  104. typedef struct _DnsResults
  105. {
  106. DNS_STATUS Status;
  107. WORD Rcode;
  108. DNS_ADDR ServerAddr;
  109. PDNS_RECORD pAnswerRecords;
  110. PDNS_RECORD pAliasRecords;
  111. PDNS_RECORD pAuthorityRecords;
  112. PDNS_RECORD pAdditionalRecords;
  113. PDNS_RECORD pSigRecords;
  114. PDNS_MSG_BUF pMessage;
  115. }
  116. DNS_RESULTS, *PDNS_RESULTS;
  117. typedef struct _ResultBlob
  118. {
  119. DNS_STATUS Status;
  120. WORD Rcode;
  121. DNS_ADDR ServerAddr;
  122. PDNS_RECORD pRecords;
  123. PDNS_MSG_BUF pMessage;
  124. BOOL fHaveResponse;
  125. }
  126. RESULT_BLOB, *PRESULT_BLOB;
  127. //
  128. // Send info
  129. //
  130. typedef struct _SendBlob
  131. {
  132. PDNS_NETINFO pNetInfo;
  133. PDNS_ADDR_ARRAY pServerList;
  134. PIP4_ARRAY pServ4List;
  135. PDNS_MSG_BUF pSendMsg;
  136. PDNS_MSG_BUF pRecvMsgBuf;
  137. DWORD Flags;
  138. BOOL fSaveResponse;
  139. BOOL fSaveRecords;
  140. RESULT_BLOB Results;
  141. }
  142. SEND_BLOB, *PSEND_BLOB;
  143. //
  144. // Query blob
  145. //
  146. #ifdef PQUERY_BLOB
  147. #undef PQUERY_BLOB
  148. #endif
  149. typedef struct _QueryBlob
  150. {
  151. // query data
  152. PWSTR pNameOrig;
  153. PWSTR pNameQuery;
  154. WORD wType;
  155. WORD Reserved1;
  156. DWORD Flags;
  157. //16
  158. // query name info
  159. DWORD NameLength;
  160. DWORD NameAttributes;
  161. DWORD QueryCount;
  162. DWORD NameFlags;
  163. //32
  164. BOOL fAppendedName;
  165. // return info
  166. DWORD Status;
  167. WORD Rcode;
  168. WORD Reserved2;
  169. DWORD NetFailureStatus;
  170. //48
  171. BOOL fCacheNegative;
  172. BOOL fNoIpLocal;
  173. // remove these once results fixed up
  174. PDNS_RECORD pRecords;
  175. PDNS_RECORD pLocalRecords;
  176. //64
  177. // control info
  178. PDNS_NETINFO pNetInfo;
  179. PDNS_ADDR_ARRAY pServerList;
  180. PIP4_ARRAY pServerList4;
  181. HANDLE hEvent;
  182. //80
  183. QUERY_CACHE_FUNC pfnQueryCache;
  184. //IS_CLUSTER_IP_FUNC pfnIsClusterIp;
  185. BOOL fFilterCluster;
  186. // result info
  187. PDNS_MSG_BUF pSendMsg;
  188. PDNS_MSG_BUF pRecvMsg;
  189. DNS_RESULTS Results;
  190. DNS_RESULTS BestResults;
  191. // buffers
  192. WCHAR NameBuffer[ DNS_MAX_NAME_BUFFER_LENGTH ];
  193. CHAR NameBufferAnsi[ DNS_MAX_NAME_BUFFER_LENGTH ];
  194. // DCR: could do a message here
  195. }
  196. QUERY_BLOB, *PQUERY_BLOB;
  197. //
  198. // System event notification routine (PnP) (svccntl.c)
  199. //
  200. DWORD
  201. _fastcall
  202. SendServiceControl(
  203. IN PWSTR pszServiceName,
  204. IN DWORD dwControl
  205. );
  206. //
  207. // Poke ops
  208. //
  209. #define POKE_OP_UPDATE_NETINFO (0x2f0d7831)
  210. #define POKE_COOKIE_UPDATE_NETINFO (0x4598efab)
  211. //
  212. // Network Info
  213. //
  214. //
  215. // Static netinfo flags
  216. //
  217. #define NINFO_FLAG_DUMMY_SEARCH_LIST (0x00000001)
  218. #define NINFO_FLAG_ALLOW_MULTICAST (0x00000100)
  219. #define NINFO_FLAG_MULTICAST_ON_NAME_ERROR (0x00000200)
  220. #define NINFO_FLAG_NO_DNS_SERVERS (0x10000000)
  221. //
  222. // Static adapter info flags
  223. //
  224. #define AINFO_FLAG_IS_WAN_ADAPTER (0x00000002)
  225. #define AINFO_FLAG_IS_AUTONET_ADAPTER (0x00000004)
  226. #define AINFO_FLAG_IS_DHCP_CFG_ADAPTER (0x00000008)
  227. #define AINFO_FLAG_REGISTER_DOMAIN_NAME (0x00000010)
  228. #define AINFO_FLAG_REGISTER_IP_ADDRESSES (0x00000020)
  229. #define AINFO_FLAG_AUTO_SERVER_DETECTED (0x00000400)
  230. #define AINFO_FLAG_SERVERS_UNREACHABLE (0x00001000)
  231. #define AINFO_FLAG_SERVERS_AUTO_LOOPBACK (0x00010000)
  232. #define AINFO_FLAG_SERVERS_IP6_DEFAULT (0x00100000)
  233. #define AINFO_FLAG_IGNORE_ADAPTER (0x01000000)
  234. //
  235. // Runtime netinfo flags
  236. //
  237. // These flags are mostly for adapter info.
  238. // Exceptions:
  239. // - RESET_SERVER_PRIORITY is overloaded, used
  240. // on both netinfo and adapter
  241. // - NETINFO_PREPARED only on netinfo to indicate
  242. // it is ready
  243. //
  244. // DCR: no runtime ignore\disable
  245. // not yet using runtime ignore disable flag
  246. // when do should create combined
  247. //
  248. #define RUN_FLAG_SENT_THIS_RETRY (0x00000001)
  249. #define RUN_FLAG_SENT (0x00000010)
  250. #define RUN_FLAG_HAVE_VALID_RESPONSE (0x00000100)
  251. #define RUN_FLAG_STOP_QUERY_ON_ADAPTER (0x00001000)
  252. #define RUN_FLAG_NETINFO_PREPARED (0x00010000)
  253. #define RUN_FLAG_QUERIED_ADAPTER_DOMAIN (0x00100000)
  254. #define RUN_FLAG_RESET_SERVER_PRIORITY (0x01000000)
  255. #define RUN_FLAG_IGNORE_ADAPTER (0x10000000)
  256. #define RUN_FLAG_RETRY_MASK (0x0000000f)
  257. #define RUN_FLAG_SINGLE_NAME_MASK (0x000fffff)
  258. #define RUN_FLAG_QUERY_MASK (0x0fffffff)
  259. // Create cleanup "levels" as mask of bits to keep
  260. // These are the params to NetInfo_Clean()
  261. #define CLEAR_LEVEL_ALL (0)
  262. #define CLEAR_LEVEL_QUERY (~RUN_FLAG_QUERY_MASK)
  263. #define CLEAR_LEVEL_SINGLE_NAME (~RUN_FLAG_SINGLE_NAME_MASK)
  264. #define CLEAR_LEVEL_RETRY (~RUN_FLAG_RETRY_MASK)
  265. VOID
  266. NetInfo_Free(
  267. IN OUT PDNS_NETINFO pNetInfo
  268. );
  269. PDNS_NETINFO
  270. NetInfo_Copy(
  271. IN PDNS_NETINFO pNetInfo
  272. );
  273. PDNS_NETINFO
  274. NetInfo_Build(
  275. IN BOOL fGetIpAddrs
  276. );
  277. VOID
  278. NetInfo_Clean(
  279. IN OUT PDNS_NETINFO pNetInfo,
  280. IN DWORD ClearLevel
  281. );
  282. VOID
  283. NetInfo_ResetServerPriorities(
  284. IN OUT PDNS_NETINFO pNetInfo,
  285. IN BOOL fLocalDnsOnly
  286. );
  287. #define NetInfo_GetAdapterByIndex(pni,i) (&(pni)->AdapterArray[i])
  288. //
  289. // Query (query.c)
  290. //
  291. #define DNS_ERROR_NAME_NOT_FOUND_LOCALLY DNS_ERROR_RECORD_DOES_NOT_EXIST
  292. //
  293. // Main query routine to DNS servers
  294. //
  295. // Called both internally and from resolver
  296. //
  297. DNS_STATUS
  298. Query_Main(
  299. IN OUT PQUERY_BLOB pBlob
  300. );
  301. DNS_STATUS
  302. Query_SingleName(
  303. IN OUT PQUERY_BLOB pBlob
  304. );
  305. VOID
  306. CombineRecordsInBlob(
  307. IN PDNS_RESULTS pResults,
  308. OUT PDNS_RECORD * ppRecords
  309. );
  310. VOID
  311. BreakRecordsIntoBlob(
  312. OUT PDNS_RESULTS pResults,
  313. IN PDNS_RECORD pRecords,
  314. IN WORD wType
  315. );
  316. DNS_STATUS
  317. Local_GetRecordsForLocalName(
  318. IN OUT PQUERY_BLOB pBlob
  319. );
  320. //
  321. // Called by dnsup.c
  322. //
  323. DNS_STATUS
  324. QueryDirectEx(
  325. IN OUT PDNS_MSG_BUF * ppMsgResponse,
  326. OUT PDNS_RECORD * ppResponseRecords,
  327. IN PDNS_HEADER pHeader,
  328. IN BOOL fNoHeaderCounts,
  329. IN PSTR pszQuestionName,
  330. IN WORD wQuestionType,
  331. IN PDNS_RECORD pRecords,
  332. IN DWORD dwFlags,
  333. IN PIP4_ARRAY aipDnsServers,
  334. IN OUT PDNS_NETINFO pNetworkInfo
  335. );
  336. //
  337. // Update (update.c)
  338. //
  339. //
  340. // Private update blob
  341. //
  342. typedef struct _UpdateBlob
  343. {
  344. // update request
  345. PDNS_RECORD pRecords;
  346. DWORD Flags;
  347. BOOL fUpdateTestMode;
  348. BOOL fSaveRecvMsg;
  349. BOOL fSavedResults;
  350. HANDLE hCreds;
  351. PDNS_EXTRA_INFO pExtraInfo;
  352. PDNS_NETINFO pNetInfo;
  353. PWSTR pszZone;
  354. PWSTR pszServerName;
  355. PDNS_ADDR_ARRAY pServerList;
  356. PIP4_ARRAY pServ4List;
  357. PDNS_MSG_BUF pMsgRecv;
  358. DNS_ADDR FailedServer;
  359. BASIC_RESULTS Results;
  360. }
  361. UPDATE_BLOB, *PUPDATE_BLOB;
  362. //
  363. // Called by dnsup.exe
  364. //
  365. DNS_STATUS
  366. DnsUpdate(
  367. IN PDNS_RECORD pRecord,
  368. IN DWORD dwFlags,
  369. IN PDNS_NETINFO pNetworkInfo,
  370. IN HANDLE hCreds,
  371. OUT PDNS_MSG_BUF * ppMsgRecv OPTIONAL
  372. );
  373. //
  374. // Sockets (socket.c)
  375. //
  376. DNS_STATUS
  377. Socket_InitWinsock(
  378. VOID
  379. );
  380. VOID
  381. Socket_CleanupWinsock(
  382. VOID
  383. );
  384. SOCKET
  385. Socket_Create(
  386. IN INT Family,
  387. IN INT SockType,
  388. IN PDNS_ADDR pBindAddr,
  389. IN USHORT Port,
  390. IN DWORD dwFlags
  391. );
  392. SOCKET
  393. Socket_CreateMulticast(
  394. IN INT SockType,
  395. IN PDNS_ADDR pAddr,
  396. IN WORD Port,
  397. IN BOOL fSend,
  398. IN BOOL fReceive
  399. );
  400. DNS_STATUS
  401. Socket_CacheInit(
  402. IN DWORD MaxSocketCount
  403. );
  404. VOID
  405. Socket_CacheCleanup(
  406. VOID
  407. );
  408. VOID
  409. Socket_ClearMessageSockets(
  410. IN OUT PDNS_MSG_BUF pMsg
  411. );
  412. VOID
  413. Socket_CloseMessageSockets(
  414. IN OUT PDNS_MSG_BUF pMsg
  415. );
  416. VOID
  417. Socket_CloseEx(
  418. IN SOCKET Socket,
  419. IN BOOL fShutdown
  420. );
  421. #define Socket_CloseConnection( sock ) Socket_CloseEx( sock, TRUE )
  422. #define Socket_Close( sock ) Socket_CloseEx( sock, FALSE )
  423. //
  424. // Send\recv (send.c)
  425. //
  426. DNS_STATUS
  427. Send_AndRecvUdpWithParam(
  428. IN OUT PDNS_MSG_BUF pMsgSend,
  429. OUT PDNS_MSG_BUF pMsgRecv,
  430. IN DWORD dwFlags,
  431. IN PDNS_ADDR_ARRAY pServerList,
  432. IN OUT PDNS_NETINFO pNetInfo
  433. );
  434. DNS_STATUS
  435. Send_OpenTcpConnectionAndSend(
  436. IN OUT PDNS_MSG_BUF pMsg,
  437. IN PDNS_ADDR pIpServer,
  438. IN BOOL fBlocking
  439. );
  440. DNS_STATUS
  441. Send_AndRecvTcp(
  442. IN OUT PSEND_BLOB pBlob
  443. );
  444. DNS_STATUS
  445. Send_AndRecv(
  446. IN OUT PSEND_BLOB pBlob
  447. );
  448. DNS_STATUS
  449. Send_MessagePrivate(
  450. IN OUT PDNS_MSG_BUF pMsg,
  451. IN PDNS_ADDR pSendAddr,
  452. IN BOOL fNoOpt
  453. );
  454. //
  455. // Host file (hostfile.c)
  456. //
  457. #define MAXALIASES (8)
  458. #define MAX_HOST_FILE_LINE_SIZE (1000)
  459. typedef struct _HostFileInfo
  460. {
  461. FILE * hFile;
  462. PSTR pszFileName;
  463. // build records
  464. BOOL fBuildRecords;
  465. // record results
  466. PDNS_RECORD pForwardRR;
  467. PDNS_RECORD pReverseRR;
  468. PDNS_RECORD pAliasRR;
  469. // line data
  470. PCHAR pAddrString;
  471. PCHAR pHostName;
  472. PCHAR AliasArray[ MAXALIASES+1 ];
  473. DNS_ADDR Addr;
  474. CHAR HostLineBuf[ MAX_HOST_FILE_LINE_SIZE+1 ];
  475. }
  476. HOST_FILE_INFO, *PHOST_FILE_INFO;
  477. BOOL
  478. HostsFile_Open(
  479. IN OUT PHOST_FILE_INFO pHostInfo
  480. );
  481. VOID
  482. HostsFile_Close(
  483. IN OUT PHOST_FILE_INFO pHostInfo
  484. );
  485. BOOL
  486. HostsFile_ReadLine(
  487. IN OUT PHOST_FILE_INFO pHostInfo
  488. );
  489. //
  490. // Debug sharing
  491. //
  492. PDNS_DEBUG_INFO
  493. DnsApiSetDebugGlobals(
  494. IN OUT PDNS_DEBUG_INFO pInfo
  495. );
  496. //
  497. // Utils (util.c)
  498. BOOL
  499. Util_IsIp6Running(
  500. VOID
  501. );
  502. //
  503. // Dnsapi.h publics restricted by netinfo def
  504. //
  505. // Used in resolver
  506. DNS_STATUS
  507. Dns_FindAuthoritativeZoneLib(
  508. IN PDNS_NAME pszName,
  509. IN DWORD dwFlags,
  510. IN PIP4_ARRAY aipQueryServers,
  511. OUT PDNS_NETINFO * ppNetworkInfo
  512. );
  513. DNS_STATUS
  514. Dns_UpdateLib(
  515. IN PDNS_RECORD pRecord,
  516. IN DWORD dwFlags,
  517. IN PDNS_NETINFO pNetworkInfo,
  518. IN HANDLE hCreds, OPTIONAL
  519. OUT PDNS_MSG_BUF * ppMsgRecv OPTIONAL
  520. );
  521. // Used in dnslib (security.c)
  522. //
  523. // DnsLib routines
  524. //
  525. // dnslib.lib routines that depend on client only definitions
  526. // and hence not defined in server space.
  527. // Note, these could be moved to dnslibp.h with some sort of
  528. // #define for client only builds, or #define that the type
  529. // definition has been picked up from resrpc.h
  530. //
  531. //
  532. // Printing of private dnsapi types (dnslib\print.c)
  533. //
  534. VOID
  535. DnsPrint_NetworkInfo(
  536. IN PRINT_ROUTINE PrintRoutine,
  537. IN OUT PVOID pContext,
  538. IN LPSTR pszHeader,
  539. IN PDNS_NETINFO pNetworkInfo
  540. );
  541. VOID
  542. DnsPrint_AdapterInfo(
  543. IN PRINT_ROUTINE PrintRoutine,
  544. IN OUT PPRINT_CONTEXT pContext,
  545. IN LPSTR pszHeader,
  546. IN PDNS_ADAPTER pAdapterInfo
  547. );
  548. VOID
  549. DnsPrint_SearchList(
  550. IN PRINT_ROUTINE PrintRoutine,
  551. IN OUT PPRINT_CONTEXT pContext,
  552. IN LPSTR pszHeader,
  553. IN PSEARCH_LIST pSearchList
  554. );
  555. VOID
  556. DnsPrint_SendBlob(
  557. IN PRINT_ROUTINE PrintRoutine,
  558. IN OUT PPRINT_CONTEXT pContext,
  559. IN PSTR pszHeader,
  560. IN PSEND_BLOB pBlob
  561. );
  562. VOID
  563. DnsPrint_QueryBlob(
  564. IN PRINT_ROUTINE PrintRoutine,
  565. IN OUT PPRINT_CONTEXT pContext,
  566. IN PSTR pszHeader,
  567. IN PQUERY_BLOB pQueryBlob
  568. );
  569. VOID
  570. DnsPrint_QueryInfo(
  571. IN PRINT_ROUTINE PrintRoutine,
  572. IN OUT PPRINT_CONTEXT pContext,
  573. IN PSTR pszHeader,
  574. IN PDNS_QUERY_INFO pQueryInfo
  575. );
  576. VOID
  577. DnsPrint_ExtraInfo(
  578. IN PRINT_ROUTINE PrintRoutine,
  579. IN OUT PPRINT_CONTEXT pContext,
  580. IN PSTR pszHeader,
  581. IN PDNS_EXTRA_INFO pInfo
  582. );
  583. VOID
  584. DnsPrint_ResultsBasic(
  585. IN PRINT_ROUTINE PrintRoutine,
  586. IN OUT PPRINT_CONTEXT pContext,
  587. IN PSTR pszHeader,
  588. IN PBASIC_RESULTS pResults
  589. );
  590. VOID
  591. DnsPrint_UpdateBlob(
  592. IN PRINT_ROUTINE PrintRoutine,
  593. IN OUT PPRINT_CONTEXT pContext,
  594. IN PSTR pszHeader,
  595. IN PUPDATE_BLOB pBlob
  596. );
  597. #if DBG
  598. #define DnsDbg_NetworkInfo(a,b) DnsPrint_NetworkInfo(DnsPR,NULL,(a),(b))
  599. #define DnsDbg_AdapterInfo(a,b) DnsPrint_AdapterInfo(DnsPR,NULL,(a),(b))
  600. #define DnsDbg_SearchList(a,b) DnsPrint_SearchList(DnsPR,NULL,(a),(b))
  601. #define DnsDbg_Addr4Array(a,b) DnsPrint_Addr4Array(DnsPR,NULL,a,b)
  602. #define DnsDbg_ResultsBasic(a,b) DnsPrint_ResultsBasic(DnsPR,NULL,(a),(b))
  603. #define DnsDbg_ExtraInfo(a,b) DnsPrint_ExtraInfo(DnsPR,NULL,(a),(b))
  604. #define DnsDbg_SendBlob(a,b) DnsPrint_SendBlob(DnsPR,NULL,(a),(b))
  605. #define DnsDbg_QueryBlob(a,b) DnsPrint_QueryBlob(DnsPR,NULL,(a),(b))
  606. #define DnsDbg_QueryInfo(a,b) DnsPrint_QueryInfo(DnsPR,NULL,(a),(b))
  607. #define DnsDbg_UpdateBlob(a,b) DnsPrint_UpdateBlob(DnsPR,NULL,(a),(b))
  608. #else // retail
  609. #define DnsDbg_NetworkInfo(a,b)
  610. #define DnsDbg_AdapterInfo(a,b)
  611. #define DnsDbg_SearchList(a,b)
  612. #define DnsDbg_Addr4Array(a,b)
  613. #define DnsDbg_ResultsBasic(a,b)
  614. #define DnsDbg_ExtraInfo(a,b)
  615. #define DnsDbg_SendBlob(a,b)
  616. #define DnsDbg_QueryBlob(a,b)
  617. #define DnsDbg_QueryInfo(a,b)
  618. #define DnsDbg_UpdateBlob(a,b)
  619. #endif
  620. //
  621. // Debugging flags private to resolver\dnsapi
  622. //
  623. // Note: other private flags should be moved here
  624. //
  625. #define DNS_DBG_MCAST 0x00008000
  626. #ifdef __cplusplus
  627. }
  628. #endif // __cplusplus
  629. #endif // _DNSAPIP_INCLUDED_