Commit graph

39 commits

Author SHA1 Message Date
Doug Lyons 874d317a71
[IP] Allow 0xFFFF as Valid Network Port Number (#5074)
* Allow 0xFFFF as valid port number

* Note possible reason for failure in TCPAllocatePort

* Return NtStatus error on TCP/IP out-of-ports failure

* Replace unavailable "ERR" with "DbgPrint"
2023-02-18 00:11:00 +02:00
Victor Perevertkin a0a19c60d0 [TCPIP] Rearrange LwIP glue code.
Reduce unnecessary stuff in LwIP itself.
2023-02-01 02:31:14 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Victor Perevertkin 6c2df5a199 [TCPIP][ROSTESTS] Remove old and unused TCP tests code 2023-02-01 02:31:14 +03:00
Jérôme Gardou 27fcfe66a2 [TCPIP][IP] Use an ERESOURCE as mutex for address files & connection end points
Spinlocks are not reentrant (and this is done a lot), using them forces us to have
an horrible hack in the kernel, which unschedules threads which are at DISPATCH_LEVEL
thus allowing another thread to take ownership of the spinlock while the unscheduled
thread should already hold it.

CORE-6473
2021-06-21 11:42:01 +02:00
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Thomas Brogan 2e1aeb12df
[TCPIP] Add NULL checks in DispTdiQueryInformation. CORE-12274
Add additional NULL checks to DispTdiQueryInformation,
which return STATUS_INVALID_PARAMETER.

Co-authored-by: Peter Hater <7element@mail.bg>
2020-10-03 13:05:12 +02:00
Victor Perevertkin 167fa2c26a [TCPIP] Remove duplicate declarations from ticonsts.h 2020-04-07 05:32:40 +03:00
Victor Perevertkin 740a859e92 [TCPIP] Implement IOCTL_ICMP_ECHO_REQUEST in tcpip.sys
Also clean up ICMP handling code in sdk/lib/drivers/ip
CORE-10760
2020-04-07 05:32:40 +03:00
Victor Perevertkin 792b64ea46 [TCPIP][FORMATTING] Format TiDispatch function. No functional changes 2020-04-07 05:32:40 +03:00
Hervé Poussineau 796c1ac993 [TCPIP] Add some static specifiers, to prevent exporting FORCEINLINE function outside compilation unit 2020-03-26 16:39:16 +01:00
Victor Perevertkin e92ab76d0d [REACTOS] Exclude some modules from clang-format 2019-12-28 01:23:49 +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
Timo Kreuzer f5f6ea2965 [REACTOS] Fix 64 bit issues 2019-03-04 21:58:42 +01:00
Pierre Schweitzer 9d0eb9b7b8
[TCPIP] Don't trust the TEB
And trust the Russian hackers to exploit that.
2019-01-02 23:02:44 +01:00
Pierre Schweitzer f76a097a25
[TCPIP] Check buffer before dereferencing it
CID 716664
2019-01-01 10:45:48 +01:00
Pierre Schweitzer 89a4cde14a
[TCPIP] Don't assume the TEB is always defined
Fixes the crash in kmtest:TcpIpConnect test.
2018-12-31 14:00:34 +01:00
Pierre Schweitzer 96985e0746
[TCPIP] Return the SubProcessTag when enumerating connections with owner class 2018-12-31 11:19:36 +01:00
Pierre Schweitzer d98001de17
[TCPIP] Save the SubProcessTag when an ADDRESS_FILE is created 2018-12-31 11:19:35 +01:00
Timo Kreuzer 1e28d4d92b
[TCPIP] Implement InfoTdiQueryGetATInfo
This implements a case for InfoTdiQueryInformationEx. It's based on wild guesses, but it helps to make Windows 2003 lsass not fail.
2018-12-09 20:54:41 +01:00
Pierre Schweitzer 73c06d09ff
[IPHLPAPI_APITEST] CurrPorts seems to confirm that timestamp is really a timestamp 2018-11-28 08:28:37 +01:00
Pierre Schweitzer f718b1d719
[TCPIP] Stubplement returning module information for TCP and UDP connections 2018-11-27 23:12:56 +01:00
Pierre Schweitzer 3028831867
[TCPIP] Save the date when an ADDRESS_FILE is created 2018-11-27 21:36:47 +01:00
Pierre Schweitzer 655e66bdbd
[TCPIP] Define a enum to select which information to return 2018-11-27 21:36:41 +01:00
Pierre Schweitzer ce7f9211a0
[TCPIP] In InfoTdiQueryGetConnectionTcpTable(), only return if there's a connection 2018-11-25 09:32:30 +01:00
Pierre Schweitzer 0ec92100bc
[TCPIP] Properly display local information for established connections 2018-11-24 22:26:06 +01:00
Pierre Schweitzer 13de7f08af
[TCPIP] Implement enumerating UDP connections with owner PID 2018-11-24 21:41:10 +01:00
Pierre Schweitzer 411504b5f4
[TCPIP] Implement enumerating TCP connections with owner PID 2018-11-24 21:41:09 +01:00
Pierre Schweitzer 935978ee57
[TCPIP] Store creator PID in ADDRESS_FILE 2018-11-24 21:41:09 +01:00
Pierre Schweitzer 91b013d387
[TCPIP] When enumerating sockets, retrieve their state and return it
This fixes netstat not having any state when enumerating connections.
Basically, now, our netstat produces stuff like:
https://twitter.com/HeisSpiter/status/1065871999266955264
2018-11-23 22:51:35 +01:00
Pierre Schweitzer 500a5151ea
[TCPIP] Fix returned IP address when querying TCP connections
This gives something like that now: https://twitter.com/HeisSpiter/status/1065706156331606017 :-)

CORE-15363
2018-11-22 21:52:11 +01:00
Pierre Schweitzer f29016dabe
[TCPIP] Properly handle listening sockets
We first check if a socket is listening before
checking whether it has connections. This allows
properly returning listening address.
Furthermore, if it's listening, properly return
status so that it displays nice in netstat.

Result: https://twitter.com/HeisSpiter/status/1064245622323200000 :-)
2018-11-18 20:51:54 +01:00
Pierre Schweitzer 007f43dd56
[TCPIP] Implement returning UDP connections
CORE-5401
2018-11-18 16:30:45 +01:00
Pierre Schweitzer 77d5f04f22
[TCPIP] Implement returning TCP connections
CORE-5401
2018-11-18 16:30:45 +01:00
Timo Kreuzer 9e066abe2a [DRIVERS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Ged Murphy 37a39f1843 Formatting, no code change 2018-01-20 18:22:44 +00:00
Thomas Faber f54fb980ba
[TCPIP] Fix buffer sizes in ReadIpConfiguration. 2018-01-10 11:25:05 +01:00
Thomas Faber d87786bf6c
[TCPIP] Check for allocation failures in ReadIpConfiguration. CID 1411924 2018-01-10 11:25:03 +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