reactos/base/services/dnsrslvr/precomp.h
Eric Kohl 630f34a0d0 [DNSAPI][DNSRSLVR] Parse the hosts file when the resolver is initializing
- Move the hosts file handling from dnsapi.dll to the resolver service. Now, the hosts file is no longer parsed on each query.
- Add support for DNS_QUERY_WIRE_ONLY and DNS_QUERY_NO_WIRE_QUERY flags to R_ResolverQuery.
- GetCurrentTimeInSeconds() should return DWORD instead of DNS_STATUS.
2019-11-23 17:13:51 +01:00

65 lines
1.1 KiB
C

#ifndef _DNSRSLVR_PCH_
#define _DNSRSLVR_PCH_
#include <stdarg.h>
#include <stdio.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winreg.h>
#include <winsvc.h>
#include <windns.h>
#include <windns_undoc.h>
#define NTOS_MODE_USER
#include <ndk/rtlfuncs.h>
#include <ndk/obfuncs.h>
#include <dnsrslvr_s.h>
#include <strsafe.h>
typedef struct _RESOLVER_CACHE_ENTRY
{
LIST_ENTRY CacheLink;
PDNS_RECORDW Record;
} RESOLVER_CACHE_ENTRY, *PRESOLVER_CACHE_ENTRY;
typedef struct _RESOLVER_CACHE
{
LIST_ENTRY RecordList;
CRITICAL_SECTION Lock;
} RESOLVER_CACHE, *PRESOLVER_CACHE;
/* cache.c */
VOID DnsIntCacheInitialize(VOID);
VOID DnsIntCacheRemoveEntryItem(PRESOLVER_CACHE_ENTRY CacheEntry);
VOID DnsIntCacheFree(VOID);
VOID DnsIntCacheFlush(VOID);
DNS_STATUS
DnsIntCacheGetEntryByName(
LPCWSTR Name,
WORD wType,
DWORD dwFlags,
PDNS_RECORDW *Record);
VOID DnsIntCacheAddEntry(PDNS_RECORDW Record);
BOOL DnsIntCacheRemoveEntryByName(LPCWSTR Name);
/* hostsfile.c */
BOOL
ReadHostsFile(VOID);
#endif /* _DNSRSLVR_PCH_ */