2006-04-09 18:35:43 +02:00
|
|
|
/*
|
|
|
|
* DNS support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Matthew Kehrer
|
|
|
|
* Copyright (C) 2006 Hans Leidekker
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-04-09 18:35:43 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
2021-03-30 10:35:28 +02:00
|
|
|
#include "winternl.h"
|
2006-04-09 18:35:43 +02:00
|
|
|
#include "winbase.h"
|
2006-06-06 17:48:43 +02:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "windns.h"
|
2021-11-02 16:54:28 +01:00
|
|
|
#include "dnsapi.h"
|
2006-04-09 18:35:43 +02:00
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
|
|
|
|
|
2021-11-02 16:54:28 +01:00
|
|
|
unixlib_handle_t resolv_handle = 0;
|
2021-03-30 10:35:28 +02:00
|
|
|
|
|
|
|
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
TRACE( "(%p, %lu, %p)\n", hinst, reason, reserved );
|
2021-03-30 10:35:28 +02:00
|
|
|
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls( hinst );
|
2021-11-02 16:54:28 +01:00
|
|
|
if (NtQueryVirtualMemory( GetCurrentProcess(), hinst, MemoryWineUnixFuncs,
|
|
|
|
&resolv_handle, sizeof(resolv_handle), NULL ))
|
2021-03-30 10:35:28 +02:00
|
|
|
ERR( "No libresolv support, expect problems\n" );
|
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2006-06-06 17:48:43 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* DnsAcquireContextHandle_A [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, void *cred, HANDLE *context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
|
2006-06-06 17:48:43 +02:00
|
|
|
|
|
|
|
*context = (HANDLE)0xdeadbeef;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsAcquireContextHandle_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, void *cred, HANDLE *context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
|
2006-06-06 17:48:43 +02:00
|
|
|
|
|
|
|
*context = (HANDLE)0xdeadbeef;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsAcquireContextHandle_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_W( DWORD flags, void *cred, HANDLE *context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%#lx, %p, %p) stub\n", flags, cred, context );
|
2006-06-06 17:48:43 +02:00
|
|
|
|
|
|
|
*context = (HANDLE)0xdeadbeef;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2009-08-25 22:22:47 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* DnsFlushResolverCache [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
VOID WINAPI DnsFlushResolverCache(void)
|
|
|
|
{
|
|
|
|
FIXME(": stub\n");
|
|
|
|
}
|
|
|
|
|
2015-12-23 11:05:30 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* DnsFlushResolverCacheEntry_A [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DnsFlushResolverCacheEntry_A( PCSTR entry )
|
|
|
|
{
|
|
|
|
FIXME( "%s: stub\n", debugstr_a(entry) );
|
|
|
|
if (!entry) return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsFlushResolverCacheEntry_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DnsFlushResolverCacheEntry_UTF8( PCSTR entry )
|
|
|
|
{
|
|
|
|
FIXME( "%s: stub\n", debugstr_a(entry) );
|
|
|
|
if (!entry) return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsFlushResolverCacheEntry_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DnsFlushResolverCacheEntry_W( PCWSTR entry )
|
|
|
|
{
|
|
|
|
FIXME( "%s: stub\n", debugstr_w(entry) );
|
|
|
|
if (!entry) return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
2009-08-25 22:22:47 +02:00
|
|
|
|
2019-08-30 14:59:07 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* DnsGetCacheDataTable [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DnsGetCacheDataTable( PDNS_CACHE_ENTRY* entry )
|
|
|
|
{
|
|
|
|
FIXME( "(%p) stub\n", entry );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2006-06-06 17:48:43 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* DnsReleaseContextHandle [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2007-08-08 10:47:03 +02:00
|
|
|
VOID WINAPI DnsReleaseContextHandle( HANDLE context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
|
|
|
FIXME( "(%p) stub\n", context );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_A [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_A( DNS_RECORDA *add, DNS_RECORDA *delete, DWORD options, HANDLE context,
|
|
|
|
void *servers, void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( DNS_RECORDA *add, DNS_RECORDA *delete, DWORD options, HANDLE context,
|
|
|
|
void *servers, void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_W( DNS_RECORDW *add, DNS_RECORDW *delete, DWORD options, HANDLE context,
|
|
|
|
void *servers, void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %p, %#lx, %p, %p, %p) stub\n", add, delete, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2006-10-20 16:13:52 +02:00
|
|
|
* DnsWriteQuestionToBuffer_UTF8 [DNSAPI.@]
|
2006-06-06 17:48:43 +02:00
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( DNS_MESSAGE_BUFFER *buffer, DWORD *size, const char *name, WORD type,
|
|
|
|
WORD xid, BOOL recurse )
|
2006-10-20 16:13:52 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %p, %s, %d, %d, %d) stub\n", buffer, size, debugstr_a(name), type, xid, recurse );
|
2006-10-20 16:13:52 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsWriteQuestionToBuffer_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
BOOL WINAPI DnsWriteQuestionToBuffer_W( DNS_MESSAGE_BUFFER *buffer, DWORD *size, const WCHAR *name, WORD type,
|
|
|
|
WORD xid, BOOL recurse )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %p, %s, %d, %d, %d) stub\n", buffer, size, debugstr_w(name), type, xid, recurse );
|
2006-06-06 17:48:43 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetA [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetA( DNS_RECORDA *set, DWORD options, HANDLE context, void *servers,
|
|
|
|
void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetUTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( DNS_RECORDA *set, DWORD options, HANDLE context, void *servers,
|
|
|
|
void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetW [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2022-02-09 10:57:54 +01:00
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetW( DNS_RECORDW *set, DWORD options, HANDLE context, void *servers,
|
|
|
|
void *reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2022-02-09 10:57:54 +01:00
|
|
|
FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved );
|
2006-06-06 17:48:43 +02:00
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|