Skip to content

Commit b18a46e

Browse files
johannesthomatkreuzer
authored andcommitted
[NETIO] Implement an in-kernel BSD-style networking API driver
This patch adds the NETIO.SYS driver to ReactOS. NETIO.SYS is part of Windows since NT6 (Vista). The driver is not feature complete (meaning some functionality is unimplemented) but does its job quite good for what it originally was written for (which is getting WinDRBD working on ReactOS/Windows Server 2003 SP2). The driver re-uses parts of the AFD.SYS driver, namely those functions that ease communitating with the transport device interface (TDI). Other than that, following features are implemented and should work: * TCP/IP networking: connect, listen, accept, read, write * UDP/IP networking: write So in a nutshell TCP/IP support is completed, UDP support is partially complete and ICMP support does not exist yet. In particular the listen/accept mechanism allows one to write kernel side TCP servers that one can connect to via the internet. The netio driver is licensed under the MIT license, see the file netio.c for more details. Have fun with it :) Signed-off-by: Johannes Khoshnazar-Thoma <[email protected]>
1 parent c425244 commit b18a46e

File tree

8 files changed

+1551
-15
lines changed

8 files changed

+1551
-15
lines changed

drivers/network/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ add_subdirectory(afd)
33
add_subdirectory(dd)
44
add_subdirectory(ndis)
55
add_subdirectory(ndisuio)
6+
add_subdirectory(netio)
67
add_subdirectory(tcpip)
78
add_subdirectory(tdi)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
spec2def(netio.sys netio.spec ADD_IMPORTLIB)
3+
4+
# NETIO.SYS is a NT 6 driver
5+
remove_definitions(-D_WIN32_WINNT=0x502)
6+
add_definitions(-D_WIN32_WINNT=0x600)
7+
8+
# Including AFD is needed by the TDI helpers.
9+
# They have been part of AFD before.
10+
11+
include_directories(
12+
BEFORE include
13+
../afd/include
14+
../tdihelpers/include
15+
${REACTOS_SOURCE_DIR}/sdk/include/reactos/drivers)
16+
17+
list(APPEND SOURCE
18+
netio.c
19+
../tdihelpers/tdi.c
20+
../tdihelpers/tdiconn.c
21+
${CMAKE_CURRENT_BINARY_DIR}/netio.def)
22+
23+
add_library(netio MODULE ${SOURCE})
24+
target_link_libraries(netio ${PSEH_LIB})
25+
set_module_type(netio kernelmodedriver)
26+
add_importlibs(netio ntoskrnl hal)
27+
add_cd_file(TARGET netio DESTINATION reactos/system32/drivers FOR all)
28+
add_registry_inf(netio_reg.inf)

0 commit comments

Comments
 (0)