Commit Graph

24 Commits

Author SHA1 Message Date
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 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
Zhiyi Zhang 6ec5b57a1f iphlpapi: Improve parameter checking for IcmpSendEcho().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:06 +02:00
Zhiyi Zhang 3825be96f3 iphlpapi: Report NO_ERROR when IcmpSendEcho() succeeded.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:06 +02:00
Zhiyi Zhang 417e996e97 iphlpapi: Don't use the client buffer in IcmpSendEcho().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43252
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 10:49:06 +02:00
Marko Hauptvogel 869f8fd238 iphlpapi: Add icmpv6 send stub. 2014-09-12 10:43:36 +02:00
Marko Hauptvogel f3fa809e50 iphlpapi: Implement icmpv6 create function. 2014-09-12 10:43:30 +02:00
Bruno Jesus 1470d7b4cc iphlpapi: Return error for IP address with value zero in IcmpSendEcho. 2014-01-13 17:37:28 +01:00
Huw Davies f9447f92ef iphlpapi: Use socklen_t where appropriate. 2013-09-19 20:14:05 +02:00
André Hentschel 6f8ac7cf1b iphlpapi: Close socket on failed HeapAlloc (coverity). 2012-10-26 11:45:18 +02:00
Francois Gouget 653c1d76d0 include: Add the missing inaddr.h and in6addr.h include directives. 2011-12-09 21:15:33 +01:00
Nowres Rafed 1013f70a1f iphlpapi: Implemented IcmpSendEcho2Ex(). 2011-07-29 18:09:04 +02:00
Alexandre Julliard 7165e22d72 iphlpapi: Close the socket in IcmpCloseHandle. 2011-05-30 17:22:27 +02:00
Ken Thomases d52f95cec8 iphlpapi: Enable non-privileged ICMP (ping) on Mac OS X. 2011-02-14 12:29:18 +01:00
Roderick Colenbrander 715a398899 iphlpapi: Use winediag for icmp failure. 2009-12-08 17:43:52 +01:00
Michael Stefaniuc 92892873be include: Use ULONG instead of unsigned long in ipexport.h.
Fix also the compiler warnings introduced by this change.
2009-01-06 12:43:28 +01:00
Michael Stefaniuc 85dba69917 iphlpapi: Remove a comment that dared to ponder to use malloc. 2008-12-01 12:45:54 +01:00
Ricardo Filipe c3db26d4bc iphlpapi: Fixed dead store (llvm/clang). 2008-11-18 13:06:27 +01:00
Juan Lang 8c4953f05a iphlpapi: Partially implement IcmpSendEcho2 using IcmpSendEcho. 2008-07-18 11:10:57 +02:00
Juan Lang 65549c5e58 iphlpapi: Move Icmp* functions from icmp to iphlpapi. 2008-07-18 11:10:44 +02:00