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.

144 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. dnsquery.h
  5. Abstract:
  6. This module contains declarations for the DNS proxy's query-management.
  7. Author:
  8. Abolade Gbadegesin (aboladeg) 11-Mar-1998
  9. Revision History:
  10. Raghu Gatta (rgatta) 1-Dec-2000
  11. Added ICSDomain registry key change notify functions.
  12. --*/
  13. #ifndef _NATHLP_DNSQUERY_H_
  14. #define _NATHLP_DNSQUERY_H_
  15. //
  16. // CONSTANT DECLARATIONS
  17. //
  18. #define DNS_QUERY_TIMEOUT (4 * 1000)
  19. #define DNS_QUERY_RETRY 3
  20. //
  21. // STRUCTURE DECLARATIONS
  22. //
  23. //
  24. // Structure: DNS_QUERY
  25. //
  26. // This structure holds information about a single pending DNS query.
  27. // Each such entry is on an interface's list of pending queries,
  28. // sorted on the 'QueryId' field.
  29. // Access to the list is synchronized using the interface's lock.
  30. //
  31. typedef struct _DNS_QUERY {
  32. LIST_ENTRY Link;
  33. USHORT QueryId;
  34. USHORT SourceId;
  35. ULONG SourceAddress;
  36. USHORT SourcePort;
  37. DNS_PROXY_TYPE Type;
  38. ULONG QueryLength;
  39. PNH_BUFFER Bufferp;
  40. PDNS_INTERFACE Interfacep;
  41. HANDLE TimerHandle;
  42. ULONG RetryCount;
  43. } DNS_QUERY, *PDNS_QUERY;
  44. //
  45. // GLOBAL VARIABLE DECLARATIONS
  46. //
  47. extern HANDLE DnsNotifyChangeKeyEvent;
  48. extern HANDLE DnsNotifyChangeKeyWaitHandle;
  49. extern PULONG DnsServerList[DnsProxyCount];
  50. extern HANDLE DnsTcpipInterfacesKey;
  51. extern HANDLE DnsNotifyChangeAddressEvent;
  52. extern HANDLE DnsNotifyChangeAddressWaitHandle;
  53. extern HANDLE DnsNotifyChangeKeyICSDomainEvent;
  54. extern HANDLE DnsNotifyChangeKeyICSDomainWaitHandle;
  55. extern HANDLE DnsTcpipParametersKey;
  56. extern PWCHAR DnsICSDomainSuffix;
  57. //
  58. // ROUTINE DECLARATIONS
  59. //
  60. VOID
  61. DnsDeleteQuery(
  62. PDNS_INTERFACE Interfacep,
  63. PDNS_QUERY Queryp
  64. );
  65. BOOLEAN
  66. DnsIsPendingQuery(
  67. PDNS_INTERFACE Interfacep,
  68. PNH_BUFFER QueryBuffer
  69. );
  70. PDNS_QUERY
  71. DnsMapResponseToQuery(
  72. PDNS_INTERFACE Interfacep,
  73. USHORT ResponseId
  74. );
  75. VOID NTAPI
  76. DnsNotifyChangeAddressCallbackRoutine(
  77. PVOID Context,
  78. BOOLEAN TimedOut
  79. );
  80. VOID NTAPI
  81. DnsNotifyChangeKeyCallbackRoutine(
  82. PVOID Context,
  83. BOOLEAN TimedOut
  84. );
  85. VOID NTAPI
  86. DnsNotifyChangeKeyICSDomainCallbackRoutine(
  87. PVOID Context,
  88. BOOLEAN TimedOut
  89. );
  90. ULONG
  91. DnsQueryServerList(
  92. VOID
  93. );
  94. ULONG
  95. DnsQueryICSDomainSuffix(
  96. VOID
  97. );
  98. PDNS_QUERY
  99. DnsRecordQuery(
  100. PDNS_INTERFACE Interfacep,
  101. PNH_BUFFER QueryBuffer
  102. );
  103. ULONG
  104. DnsSendQuery(
  105. PDNS_INTERFACE Interfacep,
  106. PDNS_QUERY Queryp,
  107. BOOLEAN Resend
  108. );
  109. #endif // _NATHLP_DNSQUERY_H_