[PATCH v3 01/11] netio.sys: Add driver stub.

Paul Gofman pgofman at codeweavers.com
Tue Jun 2 16:11:33 CDT 2020


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
v3:
    - add stubs for all natively exported functions (taken from Windows 7 netio.sys version).

 configure.ac                  |   1 +
 dlls/netio.sys/Makefile.in    |   7 +
 dlls/netio.sys/netio.c        |  48 +++++
 dlls/netio.sys/netio.sys.spec | 391 ++++++++++++++++++++++++++++++++++
 loader/wine.inf.in            |   2 +
 5 files changed, 449 insertions(+)
 create mode 100644 dlls/netio.sys/Makefile.in
 create mode 100644 dlls/netio.sys/netio.c
 create mode 100644 dlls/netio.sys/netio.sys.spec

diff --git a/configure.ac b/configure.ac
index 83c451e0870..33a8a9a2888 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3552,6 +3552,7 @@ WINE_CONFIG_MAKEFILE(dlls/netapi32)
 WINE_CONFIG_MAKEFILE(dlls/netapi32/tests)
 WINE_CONFIG_MAKEFILE(dlls/netcfgx)
 WINE_CONFIG_MAKEFILE(dlls/netcfgx/tests)
+WINE_CONFIG_MAKEFILE(dlls/netio.sys)
 WINE_CONFIG_MAKEFILE(dlls/netprofm)
 WINE_CONFIG_MAKEFILE(dlls/netprofm/tests)
 WINE_CONFIG_MAKEFILE(dlls/newdev)
diff --git a/dlls/netio.sys/Makefile.in b/dlls/netio.sys/Makefile.in
new file mode 100644
index 00000000000..76e541021a6
--- /dev/null
+++ b/dlls/netio.sys/Makefile.in
@@ -0,0 +1,7 @@
+MODULE    = netio.sys
+IMPORTLIB = netio
+IMPORTS   = ntoskrnl
+EXTRADLLFLAGS = -mno-cygwin -Wl,--subsystem,native
+
+C_SRCS = \
+	netio.c
diff --git a/dlls/netio.sys/netio.c b/dlls/netio.sys/netio.c
new file mode 100644
index 00000000000..16bf47ca0a2
--- /dev/null
+++ b/dlls/netio.sys/netio.c
@@ -0,0 +1,48 @@
+/*
+ * WSK (Winsock Kernel) driver library.
+ *
+ * Copyright 2020 Paul Gofman <pgofman at codeweavers.com> for Codeweavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winioctl.h"
+#include "winternl.h"
+#include "ddk/wdm.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(netio);
+
+static void WINAPI driver_unload(DRIVER_OBJECT *driver)
+{
+    TRACE("driver %p.\n", driver);
+}
+
+NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path)
+{
+    TRACE("driver %p, path %s.\n", driver, debugstr_w(path->Buffer));
+
+    driver->DriverUnload = driver_unload;
+    return STATUS_SUCCESS;
+}
+
diff --git a/dlls/netio.sys/netio.sys.spec b/dlls/netio.sys/netio.sys.spec
new file mode 100644
index 00000000000..a390f96674c
--- /dev/null
+++ b/dlls/netio.sys/netio.sys.spec
@@ -0,0 +1,391 @@
+@ stub CancelMibChangeNotify2
+@ stub ConvertInterfaceAliasToLuid
+@ stub ConvertInterfaceGuidToLuid
+@ stub ConvertInterfaceIndexToLuid
+@ stub ConvertInterfaceLuidToAlias
+@ stub ConvertInterfaceLuidToGuid
+@ stub ConvertInterfaceLuidToIndex
+@ stub ConvertInterfaceLuidToNameA
+@ stub ConvertInterfaceLuidToNameW
+@ stub ConvertInterfaceNameToLuidA
+@ stub ConvertInterfaceNameToLuidW
+@ stub ConvertInterfacePhysicalAddressToLuid
+@ stub ConvertStringToInterfacePhysicalAddress
+@ stub CreateAnycastIpAddressEntry
+@ stub CreateIpForwardEntry2
+@ stub CreateIpNetEntry2
+@ stub CreateSortedAddressPairs
+@ stub CreateUnicastIpAddressEntry
+@ stub DeleteAnycastIpAddressEntry
+@ stub DeleteIpForwardEntry2
+@ stub DeleteIpNetEntry2
+@ stub DeleteUnicastIpAddressEntry
+@ stub DllInitialize
+@ stub DllUnload
+@ stub FeAcquireClassifyHandle
+@ stub FeAcquireWritableLayerDataPointer
+@ stub FeApplyModifiedLayerData
+@ stub FeCompleteClassify
+@ stub FeGetWfpGlobalPtr
+@ stub FePendClassify
+@ stub FeReleaseCalloutContextList
+@ stub FeReleaseClassifyHandle
+@ stub FlushIpNetTable2
+@ stub FlushIpPathTable
+@ stub FreeMibTable
+@ stub FsbAllocate
+@ stub FsbAllocateAtDpcLevel
+@ stub FsbCreatePool
+@ stub FsbDestroyPool
+@ stub FsbFree
+@ stub FwppAdvanceStreamDataPastOffset
+@ stub FwppCopyStreamDataToBuffer
+@ stub FwppStreamContinue
+@ stub FwppStreamDeleteDpcQueue
+@ stub FwppStreamInject
+@ stub FwppTruncateStreamDataAfterOffset
+@ stub GetAnycastIpAddressEntry
+@ stub GetAnycastIpAddressTable
+@ stub GetBestInterface
+@ stub GetBestInterfaceEx
+@ stub GetBestRoute2
+@ stub GetIfEntry2
+@ stub GetIfStackTable
+@ stub GetIfTable2
+@ stub GetIfTable2Ex
+@ stub GetInvertedIfStackTable
+@ stub GetIpForwardEntry2
+@ stub GetIpForwardTable2
+@ stub GetIpInterfaceEntry
+@ stub GetIpInterfaceTable
+@ stub GetIpNetEntry2
+@ stub GetIpNetTable2
+@ stub GetIpPathEntry
+@ stub GetIpPathTable
+@ stub GetMulticastIpAddressEntry
+@ stub GetMulticastIpAddressTable
+@ stub GetTeredoPort
+@ stub GetUnicastIpAddressEntry
+@ stub GetUnicastIpAddressTable
+@ stub HfAllocateHandle32
+@ stub HfCreateFactory
+@ stub HfDestroyFactory
+@ stub HfFreeHandle32
+@ stub HfGetPointerFromHandle32
+@ stub HfResumeHandle32
+@ stub HfSuspendHandle32
+@ stub if_indextoname
+@ stub if_nametoindex
+@ stub InitializeIpForwardEntry
+@ stub InitializeIpInterfaceEntry
+@ stub InitializeUnicastIpAddressEntry
+@ stub InternalCleanupPersistentStore
+@ stub InternalCreateAnycastIpAddressEntry
+@ stub InternalCreateIpForwardEntry2
+@ stub InternalCreateIpNetEntry2
+@ stub InternalCreateUnicastIpAddressEntry
+@ stub InternalDeleteAnycastIpAddressEntry
+@ stub InternalDeleteIpForwardEntry2
+@ stub InternalDeleteIpNetEntry2
+@ stub InternalDeleteUnicastIpAddressEntry
+@ stub InternalFindInterfaceByAddress
+@ stub InternalGetAnycastIpAddressEntry
+@ stub InternalGetAnycastIpAddressTable
+@ stub InternalGetForwardIpTable2
+@ stub InternalGetIfEntry2
+@ stub InternalGetIfTable2
+@ stub InternalGetIpForwardEntry2
+@ stub InternalGetIpInterfaceEntry
+@ stub InternalGetIpInterfaceTable
+@ stub InternalGetIpNetEntry2
+@ stub InternalGetIpNetTable2
+@ stub InternalGetMulticastIpAddressEntry
+@ stub InternalGetMulticastIpAddressTable
+@ stub InternalGetUnicastIpAddressEntry
+@ stub InternalGetUnicastIpAddressTable
+@ stub InternalSetIpForwardEntry2
+@ stub InternalSetIpInterfaceEntry
+@ stub InternalSetIpNetEntry2
+@ stub InternalSetTeredoPort
+@ stub InternalSetUnicastIpAddressEntry
+@ stub IoctlKfdAbortTransaction
+@ stub IoctlKfdAddCache
+@ stub IoctlKfdAddIndex
+@ stub IoctlKfdBatchUpdate
+@ stub IoctlKfdBeginEnumFilters
+@ stub IoctlKfdCommitTransaction
+@ stub IoctlKfdDeleteCache
+@ stub IoctlKfdDeleteIndex
+@ stub IoctlKfdEndEnumFilters
+@ stub IoctlKfdMoveFilter
+@ stub IoctlKfdQueryEnumFilters
+@ stub IoctlKfdQueryLayerStatistics
+@ stub IoctlKfdResetState
+@ stub KfdAddCalloutEntry
+@ stub KfdAleAcquireFlowHandleForFlow
+@ stub KfdAleGetTableFromHandle
+@ stub KfdAleInitializeFlowHandles
+@ stub KfdAleInitializeFlowTable
+@ stub KfdAleNotifyFlowDeletion
+@ stub KfdAleReleaseFlowHandleForFlow
+@ stub KfdAleRemoveFlowContextTable
+@ stub KfdAleUninitializeFlowHandles
+@ stub KfdAleUpdateEndpointContextStatus
+@ stub KfdCheckAcceptBypass
+@ stub KfdCheckAndCacheAcceptBypass
+@ stub KfdCheckAndCacheConnectBypass
+@ stub KfdCheckClassifyNeededAndUpdateEpoch
+@ stub KfdCheckConnectBypass
+@ stub KfdClassify
+@ stub KfdDeleteCalloutEntry
+@ stub KfdDeRefCallout
+@ stub KfdDerefFilterContext
+@ stub KfdDeregisterLayerChangeCallback
+@ stub KfdDeregisterLayerChangeCallback2
+@ stub KfdEnumLayer
+@ stub KfdFreeEnumHandle
+@ stub KfdGetLayerActionFromEnumTemplate
+@ stub KfdGetLayerCacheEpoch
+@ stub KfdGetNextFilter
+@ stub KfdGetOffloadEpoch
+@ stub KfdGetRefCallout
+@ stub KfdIsActiveCallout
+@ stub KfdIsLayerEmpty
+@ stub KfdIsLsoOffloadPossibleV4
+@ stub KfdIsLsoOffloadPossibleV6
+@ stub KfdIsV4InTransportFastEmpty
+@ stub KfdIsV4OutTransportFastEmpty
+@ stub KfdIsV6InTransportFastEmpty
+@ stub KfdIsV6OutTransportFastEmpty
+@ stub KfdNotifyFlowDeletion
+@ stub KfdQueryLayerStats
+@ stub KfdRegisterLayerChangeCallback
+@ stub KfdRegisterLayerChangeCallback2
+@ stub KfdToggleFilterActivation
+@ stub MatchCondition
+@ stub MdpAllocate
+@ stub MdpAllocateAtDpcLevel
+@ stub MdpCreatePool
+@ stub MdpDestroyPool
+@ stub MdpFree
+@ stub NetioAdvanceNetBufferList
+@ stub NetioAdvanceToLocationInNetBuffer
+@ stub NetioAllocateAndInitializeStackBlock
+@ stub NetioAllocateAndReferenceCloneNetBufferList
+@ stub NetioAllocateAndReferenceCloneNetBufferListEx
+@ stub NetioAllocateAndReferenceCopyNetBufferListEx
+@ stub NetioAllocateAndReferenceFragmentNetBufferList
+@ stub NetioAllocateAndReferenceNetBufferAndNetBufferList
+@ stub NetioAllocateAndReferenceNetBufferList
+@ stub NetioAllocateAndReferenceNetBufferListNetBufferMdlAndData
+@ stub NetioAllocateAndReferenceReassembledNetBufferList
+@ stub NetioAllocateAndReferenceVacantNetBufferList
+@ stub NetioAllocateMdl
+@ stub NetioAllocateNetBuffer
+@ stub NetioAllocateNetBufferListNetBufferMdlAndDataPool
+@ stub NetioAllocateNetBufferMdlAndData
+@ stub NetioAllocateNetBufferMdlAndDataPool
+@ stub NetioAllocateOpaquePerProcessorContext
+@ stub NetioAssociateQoSFlowWithNbl
+@ stub NetioCleanupNetBufferListInformation
+@ stub NetioCompleteCloneNetBufferListChain
+@ stub NetioCompleteCopyNetBufferListChain
+@ stub NetioCompleteNetBufferAndNetBufferListChain
+@ stub NetioCompleteNetBufferListChain
+@ stub NetioCopyNetBufferListInformation
+@ stub NetioCreateQoSFlow
+@ stub NetioDeleteQoSFlow
+@ stub NetioDereferenceNetBufferList
+@ stub NetioDereferenceNetBufferListChain
+@ stub NetioExpandNetBuffer
+@ stub NetioExtendNetBuffer
+@ stub NetioFreeCloneNetBufferList
+@ stub NetioFreeCopyNetBufferList
+@ stub NetioFreeMdl
+@ stub NetioFreeNetBuffer
+@ stub NetioFreeNetBufferAndNetBufferList
+@ stub NetioFreeNetBufferList
+@ stub NetioFreeNetBufferListNetBufferMdlAndDataPool
+@ stub NetioFreeNetBufferMdlAndDataPool
+@ stub NetioFreeOpaquePerProcessorContext
+@ stub NetioFreeStackBlock
+@ stub NetioGetStatsForQoSFlow
+@ stub NetioInitializeMdl
+@ stub NetioInitializeNetBufferListAndFirstNetBufferContext
+@ stub NetioInitializeNetBufferListContext
+@ stub NetioInitializeNetBufferListContextPrimitive
+@ stub NetioInitializeNetBufferListLibrary
+@ stub NetioInitializeWorkQueue
+@ stub NetioInsertWorkQueue
+@ stub NetioQueryNetBufferListTrafficClass
+@ stub NetioReferenceNetBufferList
+@ stub NetioReferenceNetBufferListChain
+@ stub NetioRegisterProcessorAddCallback
+@ stub NetioRegSyncDefaultChangeHandler
+@ stub NetioRegSyncInterface
+@ stub NetioRegSyncQueryAndUpdateKeyValue
+@ stub NetioRetreatNetBuffer
+@ stub NetioRetreatNetBufferList
+@ stub NetioShutdownWorkQueue
+@ stub NetioSqmInitialize
+@ stub NetioSqmTerminate
+@ stub NetioSqmWriteEvent
+@ stub NetioStackBlockProcessorAddHandler
+@ stub NetioUnInitializeNetBufferListLibrary
+@ stub NetioUnRegisterProcessorAddCallback
+@ stub NetioUpdateNetBufferListContext
+@ stub NetioValidateNetBuffer
+@ stub NetioValidateNetBufferList
+@ stub NmrClientAttachProvider
+@ stub NmrClientDetachProviderComplete
+@ stub NmrDeregisterClient
+@ stub NmrDeregisterProvider
+@ stub NmrProviderDetachClientComplete
+@ stub NmrRegisterClient
+@ stub NmrRegisterProvider
+@ stub NmrWaitForClientDeregisterComplete
+@ stub NmrWaitForProviderDeregisterComplete
+@ stub NotifyIpInterfaceChange
+@ stub NotifyRouteChange2
+@ stub NotifyStableUnicastIpAddressTable
+@ stub NotifyTeredoPortChange
+@ stub NotifyUnicastIpAddressChange
+@ stub NsiAllocateAndGetTable
+@ stub NsiClearPersistentSetting
+@ stub NsiDeregisterChangeNotification
+@ stub NsiDeregisterChangeNotificationEx
+@ stub NsiDeregisterLegacyHandler
+@ stub NsiEnumerateObjectsAllParameters
+@ stub NsiEnumerateObjectsAllParametersEx
+@ stub NsiEnumerateObjectsAllPersistentParametersWithMask
+@ stub NsiFreeTable
+@ stub NsiGetAllParameters
+@ stub NsiGetAllParametersEx
+@ stub NsiGetAllPersistentParametersWithMask
+@ stub NsiGetModuleHandle
+@ stub NsiGetObjectSecurity
+@ stub NsiGetParameter
+@ stub NsiGetParameterEx
+@ stub NsiReferenceDefaultObjectSecurity
+@ stub NsiRegisterChangeNotification
+@ stub NsiRegisterChangeNotificationEx
+@ stub NsiRegisterLegacyHandler
+@ stub NsiResetPersistentSetting
+@ stub NsiSetAllParameters
+@ stub NsiSetAllParametersEx
+@ stub NsiSetAllPersistentParametersWithMask
+@ stub NsiSetObjectSecurity
+@ stub NsiSetParameter
+@ stub NsiSetParameterEx
+@ stub PtCheckTable
+@ stub PtCreateTable
+@ stub PtDeleteEntry
+@ stub PtDestroyTable
+@ stub PtEnumOverTable
+@ stub PtGetData
+@ stub PtGetExactMatch
+@ stub PtGetKey
+@ stub PtGetLongestMatch
+@ stub PtGetNextShorterMatch
+@ stub PtGetNumNodes
+@ stub PtInsertEntry
+@ stub PtSetData
+@ stub ResolveIpNetEntry2
+@ stub RtlAllocateDummyMdlChain
+@ stub RtlCleanupTimerWheel
+@ stub RtlCleanupTimerWheelEntry
+@ stub RtlCleanupToeplitzHash
+@ stub RtlCompute37Hash
+@ stub RtlComputeToeplitzHash
+@ stub RtlCopyBufferToMdl
+@ stub RtlCopyMdlToBuffer
+@ stub RtlCopyMdlToMdl
+@ stub RtlCopyMdlToMdlIndirect
+@ stub RtlDeleteElementGenericTableBasicAvl
+@ stub RtlEndTimerWheelEnumeration
+@ stub RtlEnumerateNextTimerWheelEntry
+@ stub RtlFreeDummyMdlChain
+@ stub RtlGetNextExpirationTimerWheelTick
+@ stub RtlGetNextExpiredTimerWheelEntry
+@ stub RtlIndicateTimerWheelEntryTimerStart
+@ stub RtlInitializeTimerWheel
+@ stub RtlInitializeTimerWheelEntry
+@ stub RtlInitializeTimerWheelEnumeration
+@ stub RtlInitializeToeplitzHash
+@ stub RtlInsertElementGenericTableBasicAvl
+@ stub RtlInvalidateExpiredTimerWheelEntryTimers
+@ stub RtlInvokeStartRoutines
+@ stub RtlInvokeStopRoutines
+@ stub RtlIsTimerWheelSuspended
+@ stub RtlResumeTimerWheel
+@ stub RtlReturnTimerWheelEntry
+@ stub RtlSuspendTimerWheel
+@ stub RtlUpdateCurrentTimerWheelTick
+@ stub SetIpForwardEntry2
+@ stub SetIpInterfaceEntry
+@ stub SetIpNetEntry2
+@ stub SetUnicastIpAddressEntry
+@ stub SetWfpDeviceObject
+@ stub TlDefaultEventAbort
+@ stub TlDefaultEventConnect
+@ stub TlDefaultEventDisconnect
+@ stub TlDefaultEventError
+@ stub TlDefaultEventInspect
+@ stub TlDefaultEventNotify
+@ stub TlDefaultEventReceive
+@ stub TlDefaultEventReceiveMessages
+@ stub TlDefaultEventSendBacklog
+@ stub TlDefaultRequestCancel
+@ stub TlDefaultRequestCloseEndpoint
+@ stub TlDefaultRequestConnect
+@ stub TlDefaultRequestDisconnect
+@ stub TlDefaultRequestEndpoint
+@ stub TlDefaultRequestIoControl
+@ stub TlDefaultRequestIoControlEndpoint
+@ stub TlDefaultRequestListen
+@ stub TlDefaultRequestMessage
+@ stub TlDefaultRequestQueryDispatch
+@ stub TlDefaultRequestQueryDispatchEndpoint
+@ stub TlDefaultRequestReceive
+@ stub TlDefaultRequestReleaseIndicationList
+@ stub TlDefaultRequestResume
+@ stub TlDefaultRequestSend
+@ stub TlDefaultRequestSendMessages
+@ stub WfpAssociateContextToFlow
+@ stub WfpDeleteEntryLru
+@ stub WfpExpireEntryLru
+@ stub WfpGetPacketTagCount
+@ stub WfpInitializeLeastRecentlyUsedList
+@ stub WfpInsertEntryLru
+@ stub WfpMacInboundShim
+@ stub WfpMacOutboundShim
+@ stub WfpNblInfoAlloc
+@ stub WfpNblInfoCleanup
+@ stub WfpNblInfoClone
+@ stub WfpNblInfoDestroyIfUnused
+@ stub WfpNblInfoDispatchTableClear
+@ stub WfpNblInfoDispatchTableSet
+@ stub WfpNblInfoGet
+@ stub WfpNblInfoInit
+@ stub WfpNblInfoSet
+@ stub WfpPacketTagCountIncrement
+@ stub WfpProcessFlowDelete
+@ stub WfpRefreshEntryLru
+@ stub WfpRemoveContextFromFlow
+@ stub WfpScavangeLeastRecentlyUsedList
+@ stub WfpSetBucketsToEmptyLru
+@ stub WfpStartMacShim
+@ stub WfpStartStreamShim
+@ stub WfpStopStreamShim
+@ stub WfpStreamEndpointCleanupBegin
+@ stub WfpStreamInspectDisconnect
+@ stub WfpStreamInspectReceive
+@ stub WfpStreamInspectRemoteDisconnect
+@ stub WfpStreamInspectSend
+@ stub WfpStreamIsFilterPresent
+@ stub WfpUninitializeLeastRecentlyUsedList
+@ stub WskCaptureProviderNPI
+@ stub WskDeregister
+@ stub WskQueryProviderCharacteristics
+@ stub WskRegister
+@ stub WskReleaseProviderNPI
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 0a43cc779cb..de0dd4e4554 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -2617,6 +2617,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
 12,,ksecdd.sys,-
 12,,mountmgr.sys,-
 12,,ndis.sys,-
+12,,netio.sys,-
 12,,scsiport.sys,-
 12,,tdi.sys,-
 12,,usbd.sys,-
@@ -2673,6 +2674,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
 12,,ksecdd.sys
 12,,mountmgr.sys
 12,,ndis.sys
+12,,netio.sys
 12,,scsiport.sys
 12,,tdi.sys
 12,,usbd.sys
-- 
2.26.2




More information about the wine-devel mailing list