Commit Graph

135 Commits

Author SHA1 Message Date
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
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
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
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
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 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 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
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
Erich E. Hoover 05fca48ebc iphlpapi: Implement AllocateAndGetTcpExTableFromStack.
Based on a patch by Ralf Habacker.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34372
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:16:42 +02:00
Piotr Caban 95510d5b1b iphlpapi: Don't use strncasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 20:27:23 +02:00
Michael Stefaniuc 8c79999122 iphlpapi: Drop unneeded continue statements (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:50:38 +01:00
Michael Stefaniuc 4884323172 iphlpapi: Remove a redundant NULL check before HeapFree().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 21:58:17 +01:00
Józef Kucia be3a3ad825 iphlpapi: Fix FILE leak in get_ipv6_addr_scope_table() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 13:38:25 +02:00
Guillaume Charifi 88e44332fe iphlpapi: Implement GetUdp6Table().
Signed-off-by: Guillaume Charifi <guillaume.charifi@sfr.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:36 +02:00
Michael Stefaniuc d2ff159f16 iphlpapi: 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:42:23 +02:00
Michael Stefaniuc 3aa189ec63 iphlpapi: Avoid ARRAY_SIZE-like macros.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-06 19:44:26 +02:00
Alistair Leslie-Hughes b9e082fc07 include: Move AllocateAndGet* functions to public header.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-08 11:10:48 +02:00
Andrey Gusev 62b5d6b110 iphlpapi: Change variable type.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-03 12:42:42 +01:00
Charles Davis 99d247ad5a iphlpapi: Add missing header to configure test.
This lets GetIcmpStatistics() work again on FreeBSD.

Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 10:24:24 +01:00
André Hentschel 10b91549ed iphlpapi: Fix possible Out-of-bounds write (Coverity). 2015-07-20 06:31:49 +02:00
Huw Davies 8876c3ee82 iphlpapi: Combine the various interface enumeration functions into one function. 2013-09-19 20:14:03 +02:00
Francois Gouget 4f27b78fb4 iphlpapi: Check for proc_pidinfo() instead of assuming libproc.h always defines it.
This is needed on FreeBSD 8.1.
2013-09-04 14:42:58 +02:00
Alexandre Julliard fc36c5eb5d iphlpapi: Fix some memory leaks. 2013-08-26 17:32:03 +02:00
Charles Davis 3a2247f7d3 iphlpapi: Implement find_owning_pid() on FreeBSD. 2013-08-20 12:31:12 +02:00
Charles Davis e3b9167335 iphlpapi: Implement find_owning_pid() for Mac OS. 2013-08-20 12:29:44 +02:00
Hans Leidekker 792eafa465 iphlpapi: Add partial support for the module classes in GetExtendedTcpTable and GetExtendedUdpTable. 2013-07-30 19:12:06 +02:00
Hans Leidekker 8615723699 iphlpapi: Add support for the listener and connection classes in GetExtendedTcpTable. 2013-07-30 19:12:05 +02:00
Juan Lang 0ca4ad0d2f iphlpapi: Fix HRESULT/win32 error code confusion. 2013-02-11 11:24:13 +01:00
Michael Stefaniuc 1cc6710aee iphlpapi: Let C look like C. 2013-02-07 12:03:50 +01:00
Jacek Caban fdcbd3137a iphlpapi: Added support for direct routes when using NET_RT_DUMP. 2013-01-02 17:11:53 +01:00
Francois Gouget 5f55a71b70 Assorted spelling fixes. 2012-09-24 22:27:29 +02:00
André Hentschel 07316882a5 iphlpapi: Improved GetTcpStatisticsEx stub. 2012-09-21 10:54:59 +02:00
André Hentschel 92e24af5e8 iphlpapi: Implement GetIcmpStatisticsEx on Linux. 2012-09-20 19:27:33 +02:00
André Hentschel 5e3cc41004 iphlpapi: Implement GetUdpStatisticsEx on Linux. 2012-09-20 19:24:21 +02:00
André Hentschel f2626c31af iphlpapi: Implement GetIpStatisticsEx on Linux. 2012-09-20 19:24:04 +02:00
Hans Leidekker bc8876f9ce iphlpapi: Add partial support for UDP_TABLE_OWNER_MODULE in GetExtendedUdpTable. 2012-09-07 16:44:03 +02:00
Hans Leidekker 18ba68ea62 iphlpapi: Implement GetExtendedUdpTable. 2012-09-07 16:40:31 +02:00
Francois Gouget 0f3085c82e iphlpapi: Don't rely on the HAVE_XXX macros having a numeric values. 2012-06-13 12:08:50 +02:00
Francois Gouget 562b277bb3 iphlpapi: Don't rely on the HAVE_XXX macros having a numeric values. 2012-06-08 19:35:18 +02:00