windows-nt/Source/XPSP1/NT/net/rras/ip/nathlp/dns/dnsquery.h
2020-09-26 16:20:57 +08:00

145 lines
2.5 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1998, Microsoft Corporation
Module Name:
dnsquery.h
Abstract:
This module contains declarations for the DNS proxy's query-management.
Author:
Abolade Gbadegesin (aboladeg) 11-Mar-1998
Revision History:
Raghu Gatta (rgatta) 1-Dec-2000
Added ICSDomain registry key change notify functions.
--*/
#ifndef _NATHLP_DNSQUERY_H_
#define _NATHLP_DNSQUERY_H_
//
// CONSTANT DECLARATIONS
//
#define DNS_QUERY_TIMEOUT (4 * 1000)
#define DNS_QUERY_RETRY 3
//
// STRUCTURE DECLARATIONS
//
//
// Structure: DNS_QUERY
//
// This structure holds information about a single pending DNS query.
// Each such entry is on an interface's list of pending queries,
// sorted on the 'QueryId' field.
// Access to the list is synchronized using the interface's lock.
//
typedef struct _DNS_QUERY {
LIST_ENTRY Link;
USHORT QueryId;
USHORT SourceId;
ULONG SourceAddress;
USHORT SourcePort;
DNS_PROXY_TYPE Type;
ULONG QueryLength;
PNH_BUFFER Bufferp;
PDNS_INTERFACE Interfacep;
HANDLE TimerHandle;
ULONG RetryCount;
} DNS_QUERY, *PDNS_QUERY;
//
// GLOBAL VARIABLE DECLARATIONS
//
extern HANDLE DnsNotifyChangeKeyEvent;
extern HANDLE DnsNotifyChangeKeyWaitHandle;
extern PULONG DnsServerList[DnsProxyCount];
extern HANDLE DnsTcpipInterfacesKey;
extern HANDLE DnsNotifyChangeAddressEvent;
extern HANDLE DnsNotifyChangeAddressWaitHandle;
extern HANDLE DnsNotifyChangeKeyICSDomainEvent;
extern HANDLE DnsNotifyChangeKeyICSDomainWaitHandle;
extern HANDLE DnsTcpipParametersKey;
extern PWCHAR DnsICSDomainSuffix;
//
// ROUTINE DECLARATIONS
//
VOID
DnsDeleteQuery(
PDNS_INTERFACE Interfacep,
PDNS_QUERY Queryp
);
BOOLEAN
DnsIsPendingQuery(
PDNS_INTERFACE Interfacep,
PNH_BUFFER QueryBuffer
);
PDNS_QUERY
DnsMapResponseToQuery(
PDNS_INTERFACE Interfacep,
USHORT ResponseId
);
VOID NTAPI
DnsNotifyChangeAddressCallbackRoutine(
PVOID Context,
BOOLEAN TimedOut
);
VOID NTAPI
DnsNotifyChangeKeyCallbackRoutine(
PVOID Context,
BOOLEAN TimedOut
);
VOID NTAPI
DnsNotifyChangeKeyICSDomainCallbackRoutine(
PVOID Context,
BOOLEAN TimedOut
);
ULONG
DnsQueryServerList(
VOID
);
ULONG
DnsQueryICSDomainSuffix(
VOID
);
PDNS_QUERY
DnsRecordQuery(
PDNS_INTERFACE Interfacep,
PNH_BUFFER QueryBuffer
);
ULONG
DnsSendQuery(
PDNS_INTERFACE Interfacep,
PDNS_QUERY Queryp,
BOOLEAN Resend
);
#endif // _NATHLP_DNSQUERY_H_