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"
|
2006-04-09 18:35:43 +02:00
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
|
|
|
|
|
2021-03-30 10:35:28 +02:00
|
|
|
const struct resolv_funcs *resolv_funcs = NULL;
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|
|
|
{
|
|
|
|
TRACE( "(%p,%u,%p)\n", hinst, reason, reserved );
|
|
|
|
|
|
|
|
switch (reason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls( hinst );
|
|
|
|
if (__wine_init_unix_lib( hinst, reason, NULL, &resolv_funcs ))
|
|
|
|
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.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_A( DWORD flags, PVOID cred,
|
2007-08-08 10:47:03 +02:00
|
|
|
PHANDLE context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
|
2006-06-06 17:48:43 +02:00
|
|
|
|
|
|
|
*context = (HANDLE)0xdeadbeef;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsAcquireContextHandle_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_UTF8( DWORD flags, PVOID cred,
|
2007-08-08 10:47:03 +02:00
|
|
|
PHANDLE context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(0x%08x,%p,%p) stub\n", flags, cred, context );
|
2006-06-06 17:48:43 +02:00
|
|
|
|
|
|
|
*context = (HANDLE)0xdeadbeef;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsAcquireContextHandle_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsAcquireContextHandle_W( DWORD flags, PVOID cred,
|
2007-08-08 10:47:03 +02:00
|
|
|
PHANDLE context )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(0x%08x,%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 );
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsExtractRecordsFromMessage_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8( PDNS_MESSAGE_BUFFER buffer,
|
|
|
|
WORD len, PDNS_RECORDA *record )
|
|
|
|
{
|
|
|
|
FIXME( "(%p,%d,%p) stub\n", buffer, len, record );
|
|
|
|
|
|
|
|
*record = NULL;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsExtractRecordsFromMessage_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W( PDNS_MESSAGE_BUFFER buffer,
|
|
|
|
WORD len, PDNS_RECORDW *record )
|
|
|
|
{
|
|
|
|
FIXME( "(%p,%d,%p) stub\n", buffer, len, record );
|
|
|
|
|
|
|
|
*record = NULL;
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_A [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_A( PDNS_RECORDA add, PDNS_RECORDA delete,
|
|
|
|
DWORD options, HANDLE context,
|
2007-08-04 03:20:32 +02:00
|
|
|
PVOID servers, PVOID reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
|
2006-06-06 17:48:43 +02:00
|
|
|
context, servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_UTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8( PDNS_RECORDA add, PDNS_RECORDA delete,
|
|
|
|
DWORD options, HANDLE context,
|
2007-08-04 03:20:32 +02:00
|
|
|
PVOID servers, PVOID reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
|
2006-06-06 17:48:43 +02:00
|
|
|
context, servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsModifyRecordsInSet_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsModifyRecordsInSet_W( PDNS_RECORDW add, PDNS_RECORDW delete,
|
|
|
|
DWORD options, HANDLE context,
|
2007-08-04 03:20:32 +02:00
|
|
|
PVOID servers, PVOID reserved )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,%p,0x%08x,%p,%p,%p) stub\n", add, delete, options,
|
2006-06-06 17:48:43 +02:00
|
|
|
context, servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2006-10-20 16:13:52 +02:00
|
|
|
* DnsWriteQuestionToBuffer_UTF8 [DNSAPI.@]
|
2006-06-06 17:48:43 +02:00
|
|
|
*
|
|
|
|
*/
|
2007-08-08 10:47:03 +02:00
|
|
|
BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
|
|
|
|
PCSTR name, WORD type, WORD xid,
|
2006-10-20 16:13:52 +02:00
|
|
|
BOOL recurse )
|
|
|
|
{
|
|
|
|
FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_a(name),
|
|
|
|
type, xid, recurse );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsWriteQuestionToBuffer_W [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
2007-08-08 10:47:03 +02:00
|
|
|
BOOL WINAPI DnsWriteQuestionToBuffer_W( PDNS_MESSAGE_BUFFER buffer, PDWORD size,
|
|
|
|
PCWSTR name, WORD type, WORD xid,
|
2006-10-20 16:13:52 +02:00
|
|
|
BOOL recurse )
|
2006-06-06 17:48:43 +02:00
|
|
|
{
|
|
|
|
FIXME( "(%p,%p,%s,%d,%d,%d) stub\n", buffer, size, debugstr_w(name),
|
|
|
|
type, xid, recurse );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetA [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetA( PDNS_RECORDA set, DWORD options,
|
2007-08-04 03:20:32 +02:00
|
|
|
HANDLE context, PVOID servers,
|
2006-06-06 17:48:43 +02:00
|
|
|
PVOID reserved )
|
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
|
2006-06-06 17:48:43 +02:00
|
|
|
servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetUTF8 [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetUTF8( PDNS_RECORDA set, DWORD options,
|
2007-08-04 03:20:32 +02:00
|
|
|
HANDLE context, PVOID servers,
|
2006-06-06 17:48:43 +02:00
|
|
|
PVOID reserved )
|
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
|
2006-06-06 17:48:43 +02:00
|
|
|
servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* DnsReplaceRecordSetW [DNSAPI.@]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DNS_STATUS WINAPI DnsReplaceRecordSetW( PDNS_RECORDW set, DWORD options,
|
2007-08-04 03:20:32 +02:00
|
|
|
HANDLE context, PVOID servers,
|
2006-06-06 17:48:43 +02:00
|
|
|
PVOID reserved )
|
|
|
|
{
|
2006-09-30 12:07:06 +02:00
|
|
|
FIXME( "(%p,0x%08x,%p,%p,%p) stub\n", set, options, context,
|
2006-06-06 17:48:43 +02:00
|
|
|
servers, reserved );
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|