Alex Henrie
2cabb3f79d
dnsapi: Fix memory leak on error path in do_query_netbios (scan-build).
2023-06-07 11:29:33 +02:00
Francois Gouget
477df6231a
dnsapi/tests: Ignore OPT records in the CNAME tests.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54848
2023-05-16 08:16:53 -05:00
Francois Gouget
d46f888123
dnsapi/tests: Make DnsQuery()'s CNAME tests more compatible with CDNs.
...
Depending on the DNS server, querying test.winehq.org may point to CDN
servers, resulting in more records than expected.
Also some of the CDN servers may have IPv6 addresses.
Dump the DNS records if $WINETEST_DEBUG > 1.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54847
2023-04-19 14:26:03 +02:00
Francois Gouget
6e2efe54f1
dnsapi/tests: Test how DnsQuery() handles CNAMEs.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54819
2023-04-13 17:59:40 +02:00
Alexandre Julliard
a62d3ab841
dnsapi: Use the Unix call helpers.
2022-11-28 21:01:55 +01:00
Alex Henrie
b81a571849
dnsapi: Use the strdup and wcsdup functions instead of reimplementing them.
2022-11-23 17:59:47 +01:00
Alexandre Julliard
194e09baec
makefiles: Add separate variables for Unix flags and libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Zebediah Figura
23d85e6e9a
dnsapi: Return a double-null-terminated string from DnsQueryConfig(DnsConfigSearchList).
...
DNS_TEXT_DATA contains pointers and is thus not WoW64 compatible. Since the API
is internal to Wine, use a simpler format instead of fixing our WoW64
translation.
The problem was found by Brendan Shanks; this solution was suggested by Hans Leidekker.
2022-06-27 10:32:41 +02:00
Zebediah Figura
91083d4510
dnsapi: ntdll_umbstowcs() deals in characters, not bytes.
2022-06-27 10:32:39 +02:00
Zebediah Figura
f66880c86a
dnsapi: Clarify that Windows does not implement DnsQueryConfig(DnsConfigSearchList).
...
From 17e2d5c1ca
.
2022-06-27 10:32:26 +02:00
Hans Leidekker
5a44623635
dnsapi: Build without -DWINE_NO_LONG_TYPES.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Alexandre Julliard
c78fce9e5b
dnsapi: Implement Wow64 entry points in the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-08 21:00:57 +01:00
Alexandre Julliard
bf1486afaa
dnsapi: Use CRT memory allocation functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:40 +01:00
Alexandre Julliard
da65aa5b74
dnsapi: Convert the Unix library to the __wine_unix_call interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:40 +01:00
Alexandre Julliard
d193c164b7
dnsapi: Build the DNS reply records on the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:40 +01:00
Alexandre Julliard
aec19e86f6
dnsapi: Implement DnsExtractRecordsFromMessage().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:39 +01:00
Alexandre Julliard
87f94202bb
dnsapi: Make type_to_str() into a proper debugstr function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:39 +01:00
Alexandre Julliard
0b7dba8c71
dnsapi: Fix the DNS_KEY_DATA and DNS_SIG_DATA structure definitions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:39 +01:00
Alexandre Julliard
088a787a2c
makefiles: Make -mno-cygwin the default.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Francois Gouget
312dc76c75
dnsapi: Make the resolv_*() functions static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 16:07:35 +02:00
Huw Davies
734de3bef8
dnsapi: Return ERROR_MORE_DATA on insufficient buffer.
...
This was already done correctly in the res_getservers() case.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 11:40:34 +02:00
Huw Davies
fc28de99d5
dnsapi: Delay import netapi32.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 10:38:32 +02:00
Huw Davies
17e2d5c1ca
dnsapi: Add support for DnsConfigSearchList.
...
This doesn't appear to be implemented on Windows, however it will be
needed by iphlpapi.dll.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:40:55 +02:00
Huw Davies
f705f5837c
dnsapi: Add support for returning ipv6 dns server addresses.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 22:42:01 +02:00
Huw Davies
bd80dd0903
dnsapi: Implement support for returning ipv4 servers in a DNS_ADDR_ARRAY.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 22:42:01 +02:00
Alexandre Julliard
60da2f877d
dnsapi/tests: Avoid wcsncpy().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 21:33:14 +02:00
Hans Leidekker
c511511e62
dnsapi/tests: Don't fail on query timeouts.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Hans Leidekker
7ff591d7de
dnsapi/tests: Add a query test.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hans Leidekker
5ad5be894d
dnsapi: Build with msvcrt.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Hans Leidekker
5f44c46164
dnsapi: Move libresolv support to a new Unix library.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Hans Leidekker
fadcd9563f
dnsapi: Get rid of the dns_ prefix on helpers.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Hans Leidekker
0d26dd2afb
dnsapi: Get rid of imported domain name parsing code.
...
These functions have been exported since glibc 2.9.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Michael Stefaniuc
83fdd6285d
dnsapi/tests: Use wide-char string literals.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-09 10:27:36 +01:00
Dmitry Timoshkov
2cefc54fed
dnsapi/tests: Also test the "_ldap._tcp.deadbeef" query.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:55 +01:00
Dmitry Timoshkov
8dc3e01d51
dnsapi/tests: Add some DnsQuery tests.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:53:35 +01:00
Rémi Bernon
1c232557b8
dnsapi: Increase buffer size to fix format-overflow warning.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 22:36:58 +01:00
Rémi Bernon
ec716e9ebd
dnsapi: Add DnsGetCacheDataTable stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40606
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:05:05 +02:00
Hans Leidekker
dde0313d9f
dnsapi: No longer prefer native.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Hans Leidekker
0529e5b4b1
dnsapi: Fix data length returned for records that contain Unicode strings.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Hans Leidekker
ecaeaa974c
dnsapi: Add support for DNS_TYPE_OPT records.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46704
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Michael Stefaniuc
8ba2b2da05
dnsapi: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:39:45 +02:00
Michael Stefaniuc
47ef3facdc
dnsapi/tests: Use the available ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 09:28:27 +02:00
Michael Stefaniuc
37ed8ef2b9
dnsapi: Use the global HeapAlloc() wrappers.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-31 09:42:41 +01:00
Hans Leidekker
dfe48bab07
dnsapi: Use default server list if passed in array is empty.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 10:28:00 +01:00
Francois Gouget
773cfc2a88
dnsapi: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
...
And standardize their type names.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-20 10:32:05 +01:00
Hans Leidekker
e10c48143a
dnsapi: Add a stub implementation of DnsFlushResolverCacheEntry_A/UTF8/W.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:14 +01:00
Jacek Caban
46626eebd5
dnsapi: Added DnsQueryEx stub.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-01 22:53:52 +09:00
Bruno Jesus
836e6690d4
dnsapi: Do not fail if NETDB_INTERNAL is not present.
2014-07-07 09:13:47 +02:00
Felix Janda
12e1ff956a
dnsapi: stdio.h needs to be included for sprintf().
2014-06-12 18:05:09 +02:00