Commit Graph

436 Commits

Author SHA1 Message Date
Alex Henrie 2d3b1c1288 iphlpapi: Use RtlIpv4AddressToStringA instead of inet_ntoa.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 16:27:58 +01:00
Paul Gofman 5d046a780c iphlpapi: Mark adapter addresses as DNS eligible when interface has a gateway.
Fixes hang on attempt to enter a single player game in Kingdoms Reborn.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:04:52 +01:00
Chip Davis bf662e5b62 iphlpapi: Fix copy-paste error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50274
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 12:34:54 +01:00
Gabriel Ivăncescu 1bae6b12e5 iphlpapi: Store an IO_STATUS_BLOCK at the end of the reply buffer if there's enough space available.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu fb18f9fc6e iphlpapi: Make sure there's no gap between the ICMP_ECHO_REPLY array and the data.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu 9ef55abc9f iphlpapi: Fix adjusting data pointer after an ICMP reply.
The code above it already sets endbuf to the beginning of the last data
added. On a new reply, endbuf is decremented to make space for the new
data. There's no reason to adjust it again for the old data after it has
already been set.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu 7eafc71416 iphlpapi: Implement IcmpSendEcho and IcmpSendEcho2 via IcmpSendEcho2Ex.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu b23039fa43 iphlpapi: Move the ICMP reply retrieval to a helper function.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu 9d481a1fff iphlpapi/tests: Trace the ICMP reply only with debug level > 1.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Gabriel Ivăncescu 7d451c3396 iphlpapi/tests: Close the ICMP handle when done.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:38 +01:00
Jiangyi Chen f6ae4d1670 iphlpapi: Rename local variables shadowing the flags parameters.
Signed-off-by: Jiangyi Chen <chenjiangyi@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:49:21 +02:00
Isabella Bosia 44ef8eaf58 iphlpapi: Make the interface guids more unique.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 15:23:24 +02:00
Isabella Bosia dea32fa004 iphlpapi: Unify conversions to interface guid.
Signed-off-by: Isabella Bosia <ibosia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 15:23:22 +02:00
Gabriel Ivăncescu e6d9aaeb67 iphlpapi: Update comment for SOCK_DGRAM since Linux also supports it from 3.0.
Linux does require the user to be in the range specified by
/proc/sys/net/ipv4/ping_group_range though, but otherwise works fine.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 21:23:31 +02:00
Paul Gofman 3feaca7546 iphlpapi: Fix buffer reallocation in get_pid_map().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49590
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 22:16:05 +02:00
Zebediah Figura 747573f1e4 iphlpapi: Reimplement get_pid_map() using the list_processes request.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Hans Leidekker 3e0369970d iphlpapi: Return gateway address 0.0.0.0/255.255.255.255 from GetAdaptersInfo if it's not set.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-02 11:57:00 +02:00
Alex Henrie 40cc236b6b iphlpapi: Implement ParseNetworkString for IPv6 addresses and services.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Louis Lenders 62b89ad0a5 iphlpapi: Add stub for NotifyRouteChange2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48775
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-11 21:24:58 +02:00
Stefan Dösinger f3b64f950f iphlpapi: Honor sa_len when reading AF_INET addresses.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 17:23:21 +02:00
Stefan Dösinger 4932eec313 iphlpapi: Use the dst sa_family for the netmask too.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 17:22:45 +02:00
Stefan Dösinger 7f4beb0883 iphlpapi: Write an ERR if the sockaddr parsing went wrong.
It should not happen any more after the previous patch but it is subtle
enough that I think being verbose about it makes sense.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 17:22:36 +02:00
Stefan Dösinger 594dfe6875 iphlpapi: MacOS struct sockaddr is 4 byte aligned on 64 bit.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 17:22:34 +02:00
Chip Davis 73ad2954a3 iphlpapi: Implement GetUdp6Table() for Mac OS and FreeBSD.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Chip Davis 57fe49f858 iphlpapi: Implement GetTcp6Table() for Mac OS and FreeBSD.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Chip Davis 39464e86a0 iphlpapi: Use res_getservers() if available to get the DNS server list.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Gijs Vermeulen 7096ab4544 iphlpapi: Fix unused variable warning.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:56 +02:00
Gijs Vermeulen a294767e32 iphlpapi: Fix unused function warning for get_ipv6_addr_scope_table & find_ipv6_addr_scope.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:51 +02:00
Gijs Vermeulen 4c445127da iphlpapi: Silence unused function warning for sockaddr_in6_to_WS_storage.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 20:16:40 +02:00
Francois Gouget 8d71e3e8e7 iphlpapi/tests: Fix a spelling error in an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:36:20 +01:00
Paul Gofman 1f2a7da28a iphlpapi: Return NO_ERROR from NotifyUnicastIpAddressChange() semi-stub.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Paul Gofman 5cdd3848f5 iphlpapi: Support InitialNotification flag in NotifyUnicastIpAddressChange().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48669
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Alex Henrie 94588567af iphlpapi: Implement GetTcp6Table on Linux.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alex Henrie 748bed3d10 iphlpapi/tests: Add tests for GetTcp6Table.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alex Henrie f284d2a5e0 iphlpapi/tests: Drop workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 20:30:35 +01:00
Alex Henrie d6942fac35 iphlpapi/tests: Don't allow skipping ParseNetworkString tests on Wine.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 20:30:35 +01:00
Alex Henrie 31d1175f82 iphlpapi/tests: Print a message when skipping GetUdp6Table tests.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 20:30:35 +01:00
Alex Henrie 9818940048 iphlpapi: Get rid of dummy arguments to sscanf.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 20:30:35 +01:00
Alex Henrie 433990d60d iphlpapi/tests: Build rotating buffers into ntoa and ntoa6.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 14:56:49 +01:00
Alex Henrie 71affb2892 iphlpapi: Remove unnecessary memcpy from build_udp6_table.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 14:56:49 +01:00
Alex Henrie 87875e12bc iphlpapi: Consolidate append_*_row functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 21:23:21 +01:00
Chip Davis 87dafc3c87 iphlpapi: Implement some more IpStatistics on BSD.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:16:00 +01:00
Chip Davis 697abbcbf5 iphlpapi: Correct Forwarding value from GetIpStatistics(Ex)() on *BSD.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:16:00 +01:00
Chip Davis 048a3cab0b iphlpapi: Set the SpecificPortBind bit if the caller wants it on BSD.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:16:00 +01:00
Joseph Kogut 713f4568e6 iphlpapi: Report success in NotifyIpInterfaceChange.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47935
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 21:16:32 +02:00
Marcus Meissner e7007ee814 iphlpapi: Fixed size to MultiByteToWideChar.
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:56 +02:00
Alex Henrie faf354cd45 iphlpapi: Implement ParseNetworkString for IPv4 addresses and services.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45560
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-05 23:10:39 +02:00
Alex Henrie 0e53616fe2 iphlpapi/tests: Add tests for ParseNetworkString.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-05 23:10:39 +02:00
Gleb Smirnoff 424e1e71ca iphlpapi: Account for structs inpcb and tcpcb being unavailable for userland in FreeBSD 12.
FreeBSD 12, specifically __FreeBSD_version 1200026 and later, no longer
exposes struct inpcb and struct tcpcb to userland.  New structs xinpcb
and xtcpcb shall be used instead.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 16:48:44 +02:00
Austin English d48ffbdc01 iphlpapi: Add GetBestRoute2 stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44850
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:46:52 +02:00