Commit graph

104 commits

Author SHA1 Message Date
Dmitry Borisov e6cd9de3f1
[DC21X4] Recognize all ports emulated by VPC 2007 (#6501) 2024-02-16 16:56:07 +01:00
Adam Słaboń 823fdb19d7
[SDK][VIRTIO][NETKVM] Make VirtIO a separate library (#6280)
* [SDK][VIRTIO][NETKVM] Make VirtIO a separate library

This is to avoid code duplication when more VirtIO drivers are brought in. This will also be used on development of a VirtIO XDDM GPU Driver.

* [VIRTIO] Sync with upstream
2024-01-16 17:55:35 -08:00
Hervé Poussineau 382836f087 [TCPIP] Remove code duplication to get max link speed, MTU and max packet size
This is already done when link goes up, in ReconfigureAdapter() function.
2024-01-13 15:23:46 +01:00
Hervé Poussineau 89b685007a [TCPIP] Call netif_set_link_up/netif_set_link_down after link status change
- Update TCP cached information only after updating adapter information
  (so that TCPUpdateInterfaceIPInformation/TCPUpdateInterfaceLinkStatus
  gets new status)
- Call netif_set_link_up/netif_set_link_down in TCPUpdateInterfaceLinkStatus

This fixes a lwIP requirement:
  2007-07-13 Jared Grubb (integrated by Frédéric Bernon)
  * [...] Be carefull for port maintainers to add the NETIF_FLAG_LINK_UP
    flag (like in ethernetif.c) if you want to be sure to be compatible with
    future changes...
2024-01-13 15:23:46 +01:00
Hervé Poussineau 3e3d34d97b [TCPIP] Get max link speed, MTU and max packet size when adapter is connected 2024-01-13 15:23:46 +01:00
hpoussin 9cfd8dd918
[LWIP] Correctly synchronize to lwIP 1.4.1 (#6123)
* [TCPIP] Rename lwip library to lwipcore

* [TCPIP] Remove ReactOS-specific code from LWIP library

* [TCPIP] Synchronize LWIP code to 1.4.1

Update to LWIP 1.4.1 should have been done by bd3b0e8ef4
However, I was unable to find the exact revision used in this commit.

So, do the following
- take code from STABLE-1_4_1 commit on https://git.savannah.gnu.org/git/lwip.git
- cherry-pick LWIP 32aa9a41e2013e5ee6eee09317a848647e37badf (CORE-8978)
- cherry-pick LWIP c0b534e5318baf870e2152c70d4d11a3a86181f3
- add a ReactOS-specific change in src/api/tcpip.c (missing include)
- add ReactOS specific file CMakeLists.txt

NOTE: Changes are mostly in unit test files (not used) and CHANGELOG file.

CORE-7140
2023-12-29 13:05:41 +01:00
Adam Słaboń fcaa38c705
[NETKVM] Don't restrict driver setup to x86 builds (#6221) 2023-12-23 22:00:34 +01:00
Ratin Gao ffb20d3330
[REACTOS] Fix typos (#6198)
- Adress -> Address
- Currupted -> Corrupted

3rd-party files are not modified.
2023-12-23 21:37:08 +01:00
Dmitry Borisov bbe6b07612
[DC21X4] Fix minor issues (#6161)
- The return value got lost when refactoring the setup function
- The check against 0xFFFFFFFF was meant to reject an empty EEPROM image
- Add missing PAGED_CODE(); macros

CORE-8724
2023-12-17 12:00:25 +03:00
Hermès Bélusca-Maïto c77a5ff99b
Revert my last commits that break build.
Revert "[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes."
This reverts commit 99efc2ae50.

Revert "[PSDK] Sync winresrc.h with wine-8.20"
This reverts commit 3e83562aa7.

Revert "[OSK][PROGMAN] Fix resource file build."
This reverts commit 84e4ad0a82.

Revert "[PSDK] Use the new .rh files in winresrc.h"
This reverts commit f6fb7c48c9.
2023-11-23 17:20:47 +01:00
Hermès Bélusca-Maïto 99efc2ae50
[PSDK][AFD][VGADDI] Further build and MS PSDK compatibility fixes.
- windows.h:
  * should define _WINDOWS_ and _INC_WINDOWS instead of _WINDOWS_H
  * include winresrc.h if RC_INVOKED and not NOWINRES (Wine also agrees
    with that)
  * also, some .h included from there should _not_ be included if their
    respective NO*** flags are defined.

- batclass.h: Use correct _WINDOWS_ guard.

- winsnmp.h:
  * should define _INC_WINSNMP instead of _WINSNMP_H
  * use _INC_WINDOWS instead of _WINDOWS_H

- afd.h, vgaddi.h: Use the correct guards.

- winnt.rh: Define the (SUB)LANG_* exactly as they are in the winnt.h,
  otherwise we get macro redefinition compile errors.

NOTE: Ideally these .rh files should be auto-generated from their
corresponding .h files.

- afxres.h: Do not include the whole windows.h, but instead, only
  the winres.h file, and only if RC_INVOKED is defined.

NOTE: Both afxres.h and winres.h do not really belong to the PSDK,
but belong instead to MFC. The reason why we have them here is twofold:

1. Wine used to have also winres.h (from where we got ours). This is
   because the .rc resource files of some non-MFC modules were generated
   with Visual Studio, which always includes afxres.h for these, and the
   solution was to use a slightly less MFC-specific header: winres.h
   (Wine commit cb08c82244673f26842e7a0766de90f091b5a493).
   However, this winres.h has been since removed from Wine tree
   (Wine commit 197f4059ab2af5f13f9c56faa26e3b4af902f869).

2. Few of our modules either use afxres.h or winres.h in their resource
   files, and we still want to be able to compile them.
2023-11-23 16:26:30 +01:00
Stanislav Motylkov 0af84ce12d [NVNET] Remove NdisEqualMemory hack by linking with memcmp library
Fix suggested by Hermès Bélusca-Maïto. CORE-15872
2023-10-18 20:18:02 +03:00
Dmitry Borisov 59d8a77df6
[DC21X4] Add driver for DECchip 21x4-compatible network adapters (#5614)
These adapters were common in DEC Alpha boxes and they are really rare
nowadays. The 21140 chip is emulated in Connectix / Microsoft Virtual PC
and Hyper-V Gen 1 VM.

This is an experimental driver, not yet tested on real hardware.

CORE-8724
2023-10-18 20:12:36 +03:00
George Bișoc 95c104f29a
[TCPIP] Setup a security descriptor for the IP and TCP device objects
Grant access to such objects to system, admins and network services.
2023-10-04 18:04:17 +02:00
David L Bean f8a6542b15
[IP] Don't reference uninitialized PCB to avoid BSOD. CORE-18982
transport calls to LibTCPConnect that suffer certain early failures
like parameter errors or early route lookup failures return without
initializing the pcb.
In order to avoid later BSOD's this change clears the
ConnectionRequest bucket in those cases.
2023-07-30 16:52:55 -04:00
Serge Gautherie 2010a5b8d9
[IP] Unlock Connection when TCPAllocatePort() fails. CORE-18371
Addendum to 874d317 (0.4.15-dev-5707, #5074).
2023-07-29 11:23:13 -04:00
Eugen Podrug 8e01dee251 [NTOS:EX] Fix swapped values in ExGetCurrentProcessorCounts() (#4565)
The function should return the kernel time for the idle thread in the
first argument, and kernel time + user time for the current thread in
the second argument.

Also retrieve the processor number from the cached PRCB instead of
calling KeGetCurrentProcessorNumber() which retrieves the PRCB again
since the processor could switch in-between those calls.

NdisGetCurrentProcessorCounts() function follows the same prototype
which is the correct one.
2023-07-02 16:10:36 +03:00
Joachim Henze 3c797b314f
[E1000] Stop logging MAC, is sensitive data of log-contributors (#5254) 2023-04-29 23:02:03 +02:00
Thamatip Chitpong 9f9b81e396
[AFD] ReceiveActivity: Don't return STATUS_FILE_CLOSED in case of FCB overread (#4972)
Based on patch by KRosUser. Remove the Overread member. The new test in ws2_32:recv confirms that this special behavior is never needed.
CORE-18328
2023-03-25 14:00:26 +01:00
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
Victor Perevertkin d43d898ea9 [ACD] Remove the driver stub 2023-02-01 02:31:14 +03:00
Joachim Henze 83e1363065
[INF] More deduplication and style harmonization (#4952)
- deduplication of manufacturer strings
- at some places harmonizes the different length of separator lines within the same file, centers the words (as requested by hbelusca during review), harmonizes those lines to 74characters length each
- moving some strings that are not to be localized into the non-localization string section
- other minor formatting preferences coauthored by StasM
2022-12-28 02:26:17 +01:00
Hermès Bélusca-Maïto e944dfa75f
Remove '.html' from spdx.org license page URLs. (#4845) 2022-11-03 18:25:37 +01:00
Stanislav Motylkov bbccad0ed6
[INF] Set manufacturer as ReactOS Project for consistency
Also make it non-localizable. CORE-18191
2022-06-27 17:00:18 +03:00
Stanislav Motylkov 11d3e3252d
[NVNET] Add more controller descriptions
Addendum to b79fbe23. Based on NvNetRecognizeHardware function in nic.c
2022-05-07 18:00:15 +03:00
Dmitry Borisov b79fbe2333 [NVNET] Add driver for nForce-based NICs
The driver supports all nVidia chipset models from 2001 until 2010, starting from nForce.
All NICs are compatible with x86 and amd64 devices only.

Tested by Daniel Reimer on OG Xbox and by me on MCP board.

CORE-15872 CORE-16216
2022-04-16 11:54:24 +03:00
Luke Luo f59c58d833
[TRANSLATION] Improve Simplified & Traditional Chinese translations (#4388)
Reviewed-by: Chan Chilung <eason066@gmail.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-03-31 20:38:52 +03:00
Dmitry Borisov dc6dfbf668 [NETKVM] Fix calling convention for callback and variadic functions
Addendum to 4c37757e81.
2022-03-10 13:31:10 +03:00
Dmitry Borisov 3f97671319
[E1000] Minor improvements (#3904)
- Add support for 64-bit counters (Intel gigabit NICs)
- Properly handle OIDs
- Check that the packet filter is not 0
- Performance increase
2021-12-14 01:57:33 +03:00
Thomas Faber 0af3689c2e
[REACTOS] Fix traces with missing arguments.
Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion specifier 'N'.
2021-11-21 12:57:35 -05:00
Thomas Faber 4eb45209ea
[NDIS] Allow timer initialization at DISPATCH_LEVEL.
Spotted by Mortal Wombat.
2021-10-27 19:27:27 -04:00
Süleyman Poyraz 05c39d8d62
[TRANSLATION] Update Turkish (tr-TR) translations (#3958)
Reviewed-by: Can Taşan <ctasan99@hotmail.com>
Signed-off-by: Süleyman Poyraz <zaryob.dev@gmail.com>
2021-10-10 16:00:12 +03:00
Julen Urizar Compains ea6e774050
[TRANSLATION] Fix minor typos and untranslated dialogs in Spanish (#3890)
- usetup: New bootsector page.
- shell32: Copy and paste, and moving elements.
  Also, some strings related to the shutdown and logoff.
- Minor Spanish grammar fix - some female words and minor latin american typos.
- First revision of the .inf, that includes the translation of the Services,
  audio, processors and other drivers and minor things.
2021-09-04 17:22:41 +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
Stanislav Motylkov 5697b48583
[NE2000] Add description for Realtek RTL8019AS (emulated by 86Box) 2021-06-20 20:20:16 +03:00
Stanislav Motylkov 6924b8ff39
[NE2000] Combine two INF files into one for ISA and PCI cards 2021-06-20 20:16:33 +03:00
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Hervé Poussineau a1fc312a89 [NE2000] Use the real MAC address instead of a fake one
These lines were added 15 years ago, in r18445.
2021-04-28 17:28:38 +02:00
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00
Jérôme Gardou 378642eb4f [NDIS] Use FORCEINLINE instead of __inline 2020-11-16 16:58:10 +01:00
Jérôme Gardou ed61512236 [CMAKE] Get rid of add_compile_flags_language macro
in favor of add_compile_options and the like with generator expressions
Also take this as an opportunity to remove the C++11 standard hack, GCC 8 now defaults to C++14
2020-10-20 21:44:54 +02: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
Thomas Faber 794d00c303
[FREELDR][NETKVM][ATL_APITEST] Pick the GCC code path for clang in some cases. CORE-17202 2020-08-23 12:07:37 +02:00
Serge Gautherie 11345aedd8
[FORMATTING] [CMAKE] Remove space in 'if (' (#2847) 2020-05-26 20:24:02 +02:00
Victor Perevertkin 019f21ee1d
[MEDIA][CMAKE] Create add_driver_inf cmake function
*.inf files for drivers can now be placed along with the driver code
2020-04-26 20:28:04 +03:00
Sylvain Deverre ca2aab6964 [NETKVM] Fix GCC build 2020-04-23 20:11:10 +02:00
James Tabor eecfb2362d [NETKVM] Fix Build 2020-04-23 09:33:32 -05:00