Commit graph

39 commits

Author SHA1 Message Date
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
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00