Doug Lyons
90be2f4e1b
[IPHLPAPI] Fix for hasArp which crashes some iphlpapi tests. ( #3216 )
...
CORE-16513
2020-09-22 15:50:41 +02:00
Serge Gautherie
450425028c
[IPHLPAPI] getNumInterfacesInt(): Remove 'if()' redundant condition ( #2884 )
...
No impact.
Detected by Cppcheck: redundantCondition.
Addendum to 1fe3a2d6c3
(r9788).
2020-06-04 23:26:28 +03:00
Serge Gautherie
f540b2b20c
[IPHLPAPI] GetAdaptersAddresses(): Add 1 free() in ERROR_NO_DATA case ( #2526 )
...
And fix 4 comments.
Follow-up to 68d94581
.
2020-04-15 13:05:54 +02:00
Jérôme Gardou
68d94581ad
[IPHLPAPI] Do not use free() on buffer allocated with HeapAlloc
2020-04-10 12:06:53 +02:00
Victor Perevertkin
dd2ff41dfc
[IPHLPAPI] Make icmp functions use IOCTL_ICMP_ECHO_REQUEST from tcpip.sys
...
This adds missing features like using events and APCs within IcmpSendEcho2
functions and others.
CORE-10742 CORE-14411
Co-authored-by: Tim Crawford <crawfxrd@gmail.com>
2020-04-07 05:32:40 +03:00
Timo Kreuzer
175abab7ad
[IPHLPAPI] Simplify spec file
...
Also move the exports where they are on Windows. This was already handled correctly by MSVC and still doesn't fix the order on GCC builds, but that is a different story and shall be addressed at a different time.
2019-09-08 16:23:46 +02:00
Timo Kreuzer
76eed61813
[IPHLPAPI] Improve function stubs
2019-09-08 16:23:46 +02:00
Serge Gautherie
9f5f7a97f8
[IPHLPAPI] icmp.c: Restore sync after Wine Staging 1.7.55
...
Mark all our (new) differences.
2019-08-20 15:20:01 +02:00
Serge Gautherie
8ba4b11a33
[IPHLPAPI] icmp.c: Complete sync with Wine Staging 1.7.55
...
- Restore a missing brace.
- Mark all our differences (at that time). Please inspect them.
CORE-10536
2019-08-17 17:48:21 +02:00
Victor Perevertkin
042646ceac
[IPHLPAPI] Use if_descrlen field for determining the length of
...
if_descr in IFEntry structure. This fixes heap corruption on GCC8.
CORE-16088
2019-07-05 22:49:12 +03:00
Timo Kreuzer
81bdf4e360
[CRT] Add missing posix error codes
...
These are required by latest mingw-w64 stl and we are mixing this with our crt headers.
Define _CRT_NO_POSIX_ERROR_CODES in all modules that define their own constants.
2019-05-27 13:22:40 +02:00
Timo Kreuzer
f9a967b2ae
[REACTOS] Fix misc 64 bit issues
2019-04-13 14:07:50 +02:00
Jérôme Gardou
23373acbb9
[CMAKE] Use modules instead of shared libraries
...
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.
On my system, this reduces the configure-time by a factor of two.
2019-04-06 17:43:38 +02:00
Pierre Schweitzer
22cb300805
[IPHLPAPI] Properly handle GetModuleBaseName failure
...
CID 1442662, 1442663
2019-02-16 09:05:15 +01:00
Pierre Schweitzer
93b0957641
[IPHLPAPI] Check pointers when returning module info from specific connection
2019-02-16 09:00:06 +01:00
Pierre Schweitzer
22f60faf43
[IPHLPAPI] Remove dead code
...
CID 513306, 1442673, 1442697
2019-02-16 08:48:08 +01:00
Mark Jansen
0bdca09a85
[IPHLPAPI] Preserve decoration in exported symbols
...
CORE-8462
CORE-15665
2019-02-10 13:44:08 +01:00
Pierre Schweitzer
aa55bb1bd3
[IPHLPAPI] Add support for service tags in GetOwnerModuleFromTcp/UdpEntry
...
If a service tag is set in owner information, then, we'll query advapi32 and
thus services to get the service name instead of the image name
2018-12-31 11:19:36 +01:00
Pierre Schweitzer
81aa879c13
[IPHLPAPI] Implement GetOwnerModuleFromUdpEntry()
2018-12-01 14:49:38 +01:00
Pierre Schweitzer
226195d4f2
[IPHLPAPI] Don't assume first member of MIB tables is always DWORD-big
...
This fixes last bits of heap corruption when using UDP/TCP enumeration
functions.
2018-11-30 20:06:29 +01:00
Pierre Schweitzer
bf052e120b
[IPHLPAPI] Reduce code duplication and use a single function for TCP and UDP enumerations
...
Furthermore, memory was improperly allocated before (alignment issues) leading to heap
corruption under certain circumstances
2018-11-30 20:06:29 +01:00
Pierre Schweitzer
3d2d957f81
[IPHLPAPI] Implement GetOwnerModuleFromTcpEntry()
...
CORE-4792
2018-11-29 20:36:08 +01:00
Pierre Schweitzer
f87c88f6fe
[IPHLPAPI] Implement the *_TABLE_OWNER_MODULE_* in GetExtendedTcp/UdpTable() functions
...
This fixes CurrPorts in ReactOS. It now properly displays current connections along
with their creation time.
CORE-10134
2018-11-27 23:12:57 +01:00
Pierre Schweitzer
159f5b676a
[IPHLPAPI] Fix broken size computation leading to buffer overrun
2018-11-27 23:12:57 +01:00
Pierre Schweitzer
559297fe81
[IPHLPAPI] Implement getOwnerModUdpTable() and getOwnerModTcpTable()
...
These allow to enumerate UDP and TCP connections with module information
2018-11-27 23:12:56 +01:00
Pierre Schweitzer
7ce2f09a70
[SDK] Add AllocateAndGetTcp/UdpEx/2TableFromStack() functions family
2018-11-27 21:36:47 +01:00
Pierre Schweitzer
6d6e371225
[IPHLPAPI] Start handling certain flags in GetAdaptersAddresses()
...
For now, we only support the most useful ones: IP_ADAPTER_DDNS_ENABLED,
IP_ADAPTER_REGISTER_ADAPTER_SUFFIX, IP_ADAPTER_DHCP_ENABLED
2018-11-26 22:43:43 +01:00
Pierre Schweitzer
1a964b5139
[IPHLPAPI] In GetAdaptersAddresses(), return friendly name if asked for
2018-11-25 18:04:13 +01:00
Pierre Schweitzer
26415375e3
[IPHLPAPI] Implement AllocateAndGetUdpExTable2FromStack()
...
CORE-14391
2018-11-25 13:32:52 +01:00
Pierre Schweitzer
0bca12e01f
[IPHLPAPI] Implement AllocateAndGetTcpExTable2FromStack()
...
CORE-14391
2018-11-25 13:29:26 +01:00
Pierre Schweitzer
291a58951f
[IPHLPAPI] Implement AllocateAndGetUdpExTableFromStack()
2018-11-25 12:23:27 +01:00
Pierre Schweitzer
58799a0ceb
[IPHLPAPI] Implement AllocateAndGetTcpExTableFromStack()
2018-11-25 12:19:44 +01:00
Pierre Schweitzer
370b03b523
[IPHLPAPI] Reimplement GetUdpTable() using GetExtendedUdpTable()
2018-11-24 21:41:10 +01:00
Pierre Schweitzer
58cef01422
[IPHLPAPI] Implement GetExtendedUdpTable()
...
We only support IPv4 and UDP_TABLE_BASIC, UDP_TABLE_OWNER_PID
for now
CORE-5126
2018-11-24 21:41:10 +01:00
Pierre Schweitzer
6fb6c7b50b
[IPHLPAPI] Implement getOwnerUdoTable(), to get UDP connections with owner PID
2018-11-24 21:41:10 +01:00
Pierre Schweitzer
73c87d5c14
[IPHLPAPI] Reimplement GetTcpTable() using GetExtendedTcpTable()
2018-11-24 21:41:09 +01:00
Pierre Schweitzer
d76ac645e8
[IPHLPAPI] Don't leak memory
2018-11-24 21:41:09 +01:00
Pierre Schweitzer
c949a12506
[IPHLPAPI] Implement the IPv4 TCP_TABLE_OWNER_PID_* cases in GetExtendedTcpTable()
2018-11-24 21:41:09 +01:00
Pierre Schweitzer
dca7e5689f
[IPHLPAPI] Implement getOwnerTcpTable(), to get TCP connections with owner PID
2018-11-24 21:41:09 +01:00
Pierre Schweitzer
702d44c683
[IPHLPAPI] Implement the IPv4 TCP_TABLE_BASIC_* cases in GetExtendedTcpTable()
2018-11-24 21:41:08 +01:00
Pierre Schweitzer
8a98c85c1f
[IPHLPAPI] Fix checking entity when enumerating TCP/UDP connections
...
This fixes the API not to return the current TCP connections while
enumerating them (and thus, netstat not displaying them).
It seems we return garbage for now though
2018-11-20 22:14:25 +01:00
Pierre Schweitzer
d18b1fe24b
[IPHLPAPI] Properly count UDP entries
...
Fixes crash when running netstat -a with
no TCP connections but with UDP connections
CORE-5401
2018-11-18 18:56:36 +01:00
Pierre Schweitzer
e3cb9697a4
[IPHLPAPI] Implement getNumUdpEntries() and getUdpTable()
...
CORE-5401
2018-11-18 16:30:45 +01:00
Pierre Schweitzer
678204790c
[IPHLPAPI] Implement getNumTcpEntries() and getTcpTable()
...
CORE-5401
2018-11-18 16:30:45 +01:00
Timo Kreuzer
0f8439aa71
[DLLS] Fix 64 bit issues
2018-08-04 19:19:34 +02:00
Serge Gautherie
6c9359221c
[IPHLPAPI] ipstats_reactos: Review all TRACE/WARN calls
...
- Improve/Promote failures to ERR.
- Improve other TRACE calls.
2018-05-17 17:11:17 +01:00
Serge Gautherie
b6c060ce04
[IPHLPAPI] Fix getNumRoutes() return value, on Mib error ( #391 )
2018-02-23 17:35:02 +00:00
Thomas Faber
182a31074f
[IPHLPAPI] Fix memory leak in getNumRoutes. CORE-14353
2018-02-21 18:42:43 +01:00
Stanislav Motylkov
63ad8a71c0
[IPHLPAPI] Fix IcmpSendEcho output when host is not reachable
...
- Add missing error code to DDK/NDIS
- Fix error code in IP driver
- Patch MSAFD to reply correct WSA error code
- Fix IcmpSendEcho function
- Fix returning error code in ICMP_ECHO_REPLY (see MSDN)
- Fix returning host address (using GetBestInterface and GetIpAddrTable functions)
- Fix GetBestRoute function (it is used by GetBestInterface)
Relates to #318 and CORE-14241
2018-01-31 17:28:21 +00:00
Stanislav Motylkov
a2cc76af84
[IPHLPAPI] Implement interface name resolving functions
...
Including:
- NhGetInterfaceNameFromDeviceGuid
- NhGetInterfaceNameFromGuid
CORE-13831, CORE-14033
Reference:
https://github.com/boundary/wireshark/blob/master/capture_win_ifnames.c#L275
2017-12-03 21:08:31 +01:00