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.

145 lines
2.7 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 OVERLAPPED DnsNotifyChangeAddressOverlapped;
  54. extern HANDLE DnsNotifyChangeKeyICSDomainEvent;
  55. extern HANDLE DnsNotifyChangeKeyICSDomainWaitHandle;
  56. extern HANDLE DnsTcpipParametersKey;
  57. extern PWCHAR DnsICSDomainSuffix;
  58. //
  59. // ROUTINE DECLARATIONS
  60. //
  61. VOID
  62. DnsDeleteQuery(
  63. PDNS_INTERFACE Interfacep,
  64. PDNS_QUERY Queryp
  65. );
  66. BOOLEAN
  67. DnsIsPendingQuery(
  68. PDNS_INTERFACE Interfacep,
  69. PNH_BUFFER QueryBuffer
  70. );
  71. PDNS_QUERY
  72. DnsMapResponseToQuery(
  73. PDNS_INTERFACE Interfacep,
  74. USHORT ResponseId
  75. );
  76. VOID NTAPI
  77. DnsNotifyChangeAddressCallbackRoutine(
  78. PVOID Context,
  79. BOOLEAN TimedOut
  80. );
  81. VOID NTAPI
  82. DnsNotifyChangeKeyCallbackRoutine(
  83. PVOID Context,
  84. BOOLEAN TimedOut
  85. );
  86. VOID NTAPI
  87. DnsNotifyChangeKeyICSDomainCallbackRoutine(
  88. PVOID Context,
  89. BOOLEAN TimedOut
  90. );
  91. ULONG
  92. DnsQueryServerList(
  93. VOID
  94. );
  95. ULONG
  96. DnsQueryICSDomainSuffix(
  97. VOID
  98. );
  99. PDNS_QUERY
  100. DnsRecordQuery(
  101. PDNS_INTERFACE Interfacep,
  102. PNH_BUFFER QueryBuffer
  103. );
  104. ULONG
  105. DnsSendQuery(
  106. PDNS_INTERFACE Interfacep,
  107. PDNS_QUERY Queryp,
  108. BOOLEAN Resend
  109. );
  110. #endif // _NATHLP_DNSQUERY_H_