diff options
| author | Yang You(UU) <[email protected]> | 2026-06-15 15:43:49 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-06-15 15:43:49 -0700 |
| commit | 52f73736b407acb1f8a0af513c9614a5354cea5b (patch) | |
| tree | 7af73a234b3500645d37a57935f62d5a1f4c6b0e /network | |
| parent | 5426a647c3f86885e4b9d8679d4a4c108933b5ee (diff) | |
| parent | e99ae832b48b245404f9bd750af4864247b061e8 (diff) | |
Merge branch 'microsoft:main' into WifiihvsampleDataPath
Diffstat (limited to 'network')
231 files changed, 4451 insertions, 7349 deletions
diff --git a/network/config/bindview/BINDING.CPP b/network/config/bindview/BINDING.CPP index b3771004..460d2f3c 100644 --- a/network/config/bindview/BINDING.CPP +++ b/network/config/bindview/BINDING.CPP @@ -10,7 +10,7 @@ // o How to enumerate binding interfaces. // o How to enable/disable bindings. // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // @@ -183,7 +183,7 @@ VOID WriteBindingPath (FILE *fp, fwprintf( fp, L"\n%s", lpszName ); } } - + ReleaseRef( pencbp ); } else { @@ -389,7 +389,7 @@ VOID ListBindings (INetCfgComponent *pncc, HTREEITEM hTreeItem; ULONG ulIndex; HRESULT hr; - + hr = HrGetBindingPathEnum( pncc, EBP_BELOW, &pencbp ); @@ -429,7 +429,7 @@ VOID ListBindings (INetCfgComponent *pncc, ulIndex++; } - + ReleaseRef( pencbp ); } else { @@ -533,7 +533,7 @@ VOID ListInterfaces (INetCfgBindingPath *pncbp, // // Function: HandleBindingPathOperation // -// Purpose: +// Purpose: // // Arguments: // hwndOwner [in] Owner window. @@ -778,7 +778,7 @@ FindBindingPath ( &pncc ); if ( hr == S_OK ) { - + hr = HrGetBindingPathEnum( pncc, EBP_BELOW, &pencbp ); diff --git a/network/config/bindview/BINDVIEW.CPP b/network/config/bindview/BINDVIEW.CPP index 4231f7c4..dbd26fb5 100644 --- a/network/config/bindview/BINDVIEW.CPP +++ b/network/config/bindview/BINDVIEW.CPP @@ -1444,7 +1444,7 @@ VOID ShowComponentMenu (HWND hwndOwner, LPARAM lParam) { ULONG ulSelection; - POINT pt; + POINT pt{}; GetCursorPos( &pt ); ulSelection = (ULONG)TrackPopupMenu( hComponentSubMenu, @@ -1496,7 +1496,7 @@ VOID ShowBindingPathMenu (HWND hwndOwner, { MENUITEMINFOW menuItemInfo; ULONG ulSelection; - POINT pt; + POINT pt{}; // // Build the shortcut menu depending on whether path is @@ -1563,7 +1563,7 @@ VOID ShowBindingPathMenu (HWND hwndOwner, // lpdwItemType [out] Type, binding path or network component. // fEnabled [out] TRUE if the binding path or component is enabled. // -// Returns: TRUE on sucess. +// Returns: TRUE on success. // // Notes: // @@ -1787,7 +1787,7 @@ HTREEITEM AddToTreeEx (HWND hwndTree, LPWSTR lpszId; GUID guidClass; BOOL fEnabled; - ULONG ulStatus; + ULONG ulStatus{}; HTREEITEM hTreeItem; TV_INSERTSTRUCTW tvInsertStruc; HRESULT hr; diff --git a/network/config/bindview/BINDVIEW.H b/network/config/bindview/BINDVIEW.H index 2753b753..1a1d4a80 100644 --- a/network/config/bindview/BINDVIEW.H +++ b/network/config/bindview/BINDVIEW.H @@ -7,7 +7,7 @@ // // Contents: Function Prototypes // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // diff --git a/network/config/bindview/NetCfgAPI.cpp b/network/config/bindview/NetCfgAPI.cpp index 5080bb41..bdbb8e52 100644 --- a/network/config/bindview/NetCfgAPI.cpp +++ b/network/config/bindview/NetCfgAPI.cpp @@ -248,7 +248,7 @@ HRESULT HrInstallNetComponent (IN INetCfg *pnc, { hr = E_OUTOFMEMORY; break; - } + } ZeroMemory(DirWithDrive, (_MAX_DRIVE + _MAX_DIR) * sizeof(WCHAR)); // @@ -329,7 +329,7 @@ HRESULT HrInstallNetComponent (IN INetCfg *pnc, { CoTaskMemFree(DirWithDrive); DirWithDrive = NULL; - } + } return hr; } diff --git a/network/config/bindview/NetCfgAPI.h b/network/config/bindview/NetCfgAPI.h index b4d6f552..310b36b2 100644 --- a/network/config/bindview/NetCfgAPI.h +++ b/network/config/bindview/NetCfgAPI.h @@ -7,7 +7,7 @@ // // Contents: Functions Prototypes // -// Notes: +// Notes: // // Author: Alok Sinha 15-May-01 // diff --git a/network/config/bindview/RESOURCE.H b/network/config/bindview/RESOURCE.H index 3fb76696..06cd3681 100644 --- a/network/config/bindview/RESOURCE.H +++ b/network/config/bindview/RESOURCE.H @@ -32,7 +32,7 @@ #define IDI_DISABLE 40007 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 109 diff --git a/network/config/bindview/bindview.sln b/network/config/bindview/bindview.sln index 824d0444..75a6b503 100644 --- a/network/config/bindview/bindview.sln +++ b/network/config/bindview/bindview.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bindview", "bindview.vcxpro EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|Win32.Build.0 = Debug|Win32 - {A9995567-E5EF-4A30-B294-D5930523A2B5}.Release|Win32.ActiveCfg = Release|Win32 - {A9995567-E5EF-4A30-B294-D5930523A2B5}.Release|Win32.Build.0 = Release|Win32 + {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|ARM64.Build.0 = Debug|ARM64 + {A9995567-E5EF-4A30-B294-D5930523A2B5}.Release|ARM64.ActiveCfg = Release|ARM64 + {A9995567-E5EF-4A30-B294-D5930523A2B5}.Release|ARM64.Build.0 = Release|ARM64 {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|x64.ActiveCfg = Debug|x64 {A9995567-E5EF-4A30-B294-D5930523A2B5}.Debug|x64.Build.0 = Debug|x64 {A9995567-E5EF-4A30-B294-D5930523A2B5}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/config/bindview/bindview.vcxproj b/network/config/bindview/bindview.vcxproj index a02b4401..4b6bd8be 100644 --- a/network/config/bindview/bindview.vcxproj +++ b/network/config/bindview/bindview.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{A9995567-E5EF-4A30-B294-D5930523A2B5}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{24391928-4AD2-4393-B2CD-C85CC7B1F672}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>bindview</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>bindview</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>bindview</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>bindview</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -112,7 +112,7 @@ <AdditionalDependencies>%(AdditionalDependencies);ole32.lib;oleaut32.lib;comctl32.lib;comdlg32.lib;setupapi.lib;user32.lib;kernel32.lib;gdi32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -137,7 +137,7 @@ <AdditionalDependencies>%(AdditionalDependencies);ole32.lib;oleaut32.lib;comctl32.lib;comdlg32.lib;setupapi.lib;user32.lib;kernel32.lib;gdi32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -162,7 +162,7 @@ <AdditionalDependencies>%(AdditionalDependencies);ole32.lib;oleaut32.lib;comctl32.lib;comdlg32.lib;setupapi.lib;user32.lib;kernel32.lib;gdi32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> diff --git a/network/modem/fakemodem/driver.c b/network/modem/fakemodem/driver.c index 572e462f..1027fda7 100644 --- a/network/modem/fakemodem/driver.c +++ b/network/modem/fakemodem/driver.c @@ -15,8 +15,8 @@ Abstract: This is a simple form of function driver for fakemodem device. The driver doesn't handle any PnP and Power events because the framework provides - default behaviour for those events. This driver has enough support to - allow an user application (toast/notify.exe) to open the device + default behavior for those events. This driver has enough support to + allow a user application (toast/notify.exe) to open the device interface registered by the driver and send read, write or ioctl requests. Environment: @@ -232,7 +232,7 @@ Return Value: &defQueue // pointer to default queue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { // @@ -256,7 +256,7 @@ Return Value: &fmDeviceData->FmReadQueue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { KdPrint( ("WdfIoQueueCreate failed 0x%x\n", status)); return status; @@ -276,7 +276,7 @@ Return Value: &fmDeviceData->FmMaskWaitQueue ); __analysis_assume(queueConfig.EvtIoStop == 0); - + if (!NT_SUCCESS (status)) { KdPrint( ("WdfIoQueueCreate failed 0x%x\n", status)); return status; diff --git a/network/modem/fakemodem/fakemodem.sln b/network/modem/fakemodem/fakemodem.sln index e956fec9..39cdb94b 100644 --- a/network/modem/fakemodem/fakemodem.sln +++ b/network/modem/fakemodem/fakemodem.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fakemodem", "fakemodem.vcxp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|Win32.ActiveCfg = Debug|Win32 - {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|Win32.Build.0 = Debug|Win32 - {318EB156-D430-4B09-8400-2B72A6A73004}.Release|Win32.ActiveCfg = Release|Win32 - {318EB156-D430-4B09-8400-2B72A6A73004}.Release|Win32.Build.0 = Release|Win32 + {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|ARM64.Build.0 = Debug|ARM64 + {318EB156-D430-4B09-8400-2B72A6A73004}.Release|ARM64.ActiveCfg = Release|ARM64 + {318EB156-D430-4B09-8400-2B72A6A73004}.Release|ARM64.Build.0 = Release|ARM64 {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|x64.ActiveCfg = Debug|x64 {318EB156-D430-4B09-8400-2B72A6A73004}.Debug|x64.Build.0 = Debug|x64 {318EB156-D430-4B09-8400-2B72A6A73004}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/modem/fakemodem/fakemodem.vcxproj b/network/modem/fakemodem/fakemodem.vcxproj index 029e5bdb..1668c23a 100644 --- a/network/modem/fakemodem/fakemodem.vcxproj +++ b/network/modem/fakemodem/fakemodem.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -23,7 +23,7 @@ <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{7FB2EEDE-628E-4211-B00C-66D19CF3D32A}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -35,23 +35,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -66,13 +66,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -85,13 +85,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>fakemodem</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>fakemodem</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>fakemodem</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>fakemodem</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -110,7 +110,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> <ExceptionHandling> @@ -126,7 +126,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> <ExceptionHandling> @@ -142,7 +142,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> <ExceptionHandling> diff --git a/network/modem/fakemodem/ioctl.c b/network/modem/fakemodem/ioctl.c index 445910bd..a3268cd2 100644 --- a/network/modem/fakemodem/ioctl.c +++ b/network/modem/fakemodem/ioctl.c @@ -689,7 +689,7 @@ Return Value: case IOCTL_SERIAL_SET_HANDFLOW: case IOCTL_SERIAL_RESET_DEVICE: { // - // NOTE: The application expects STATUS_SUCCESS for these ioctsl. + // NOTE: The application expects STATUS_SUCCESS for these ioctls. // so don't merge this with default. // break; diff --git a/network/modem/fakemodem/mdmfake.inx b/network/modem/fakemodem/mdmfake.inx Binary files differindex ea95a9ad..29629983 100644 --- a/network/modem/fakemodem/mdmfake.inx +++ b/network/modem/fakemodem/mdmfake.inx diff --git a/network/modem/fakemodem/readwrit.c b/network/modem/fakemodem/readwrit.c index af6da937..fbce3e9a 100644 --- a/network/modem/fakemodem/readwrit.c +++ b/network/modem/fakemodem/readwrit.c @@ -9,14 +9,14 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: - ioctl.c + readwrit.c Abstract: This is a simple form of function driver for Fm device. The driver doesn't handle any PnP and Power events because the framework provides - default behaviour for those events. This driver has enough support to - allow an user application (toast/notify.exe) to open the device + default behavior for those events. This driver has enough support to + allow a user application (toast/notify.exe) to open the device interface registered by the driver and send read, write or ioctl requests. Environment: @@ -49,8 +49,8 @@ Arguments: Length - Length of the IO operation The default property of the queue is to not dispatch - zero lenght read & write requests to the driver and - complete is with status success. So we will never get + zero length read & write requests to the driver and + complete it with status success. So we will never get a zero length request. Return Value: @@ -117,8 +117,8 @@ Arguments: Length - Length of the IO operation The default property of the queue is to not dispatch - zero lenght read & write requests to the driver and - complete is with status success. So we will never get + zero length read & write requests to the driver and + complete it with status success. So we will never get a zero length request. Return Value: @@ -193,8 +193,8 @@ Arguments: Length - Length of the IO operation The default property of the queue is to not dispatch - zero lenght read & write requests to the driver and - complete is with status success. So we will never get + zero length read & write requests to the driver and + complete it with status success. So we will never get a zero length request. Return Value: diff --git a/network/ndis/extension/base/SxApi.h b/network/ndis/extension/base/SxApi.h index 64dca5f7..a8c4c0db 100644 --- a/network/ndis/extension/base/SxApi.h +++ b/network/ndis/extension/base/SxApi.h @@ -47,7 +47,7 @@ extern PWCHAR SxExtServiceName; extern ULONG SxExtAllocationTag; // -// The request ID used to identify OIDs initiated from this extension. +// The request ID used to identify OIDs initiated from this extension. // extern ULONG SxExtOidRequestId; @@ -55,19 +55,19 @@ extern ULONG SxExtOidRequestId; /*++ SxExtInitialize - + Routine Description: This function is called from the SxBase Library during DriverEntry. - An extension should allocate/initalize all global data in this function. - + An extension should allocate/initialize all global data in this function. + Arguments: NULL - + Return Value: NDIS_STATUS_SUCCESS succeeds driver entry. - + NDIS_STATUS_*** fails driver entry. - + --*/ NDIS_STATUS SxExtInitialize(); @@ -76,17 +76,17 @@ SxExtInitialize(); /*++ SxExtUninitialize - + Routine Description: This function is called from the SxBase Library during DriverUnload. An extension should free/reset all global data in this function. - + Arguments: NULL - + Return Value: VOID - + --*/ VOID SxExtUninitialize(); @@ -95,28 +95,28 @@ SxExtUninitialize(); /*++ SxExtCreateSwitch - + Routine Description: This function is called when an extension binds to a new switch. All switch specific data should be allocated during this function. OIDs cannot be sent from this function, and both the control and data paths are inactive. - + Arguments: Switch - the Switch Object currently being created - + ExtensionContext - Extension context specific to the switch being createf. This context will be passed back to the extension for all function calls in SxApi - + Return Value: NDIS_STATUS_SUCCESS succeeds switch creation. - + NDIS_STATUS_RESOURCES fails switch creation because of insufficient resources. - + NDIS_STATUS_FAILURE fails switch creation. - + --*/ NDIS_STATUS SxExtCreateSwitch( @@ -124,25 +124,25 @@ SxExtCreateSwitch( _Outptr_result_maybenull_ PNDIS_HANDLE *ExtensionContext ); - + /*++ SxExtDeleteSwitch - + Routine Description: This function is called when an extension binds to a new switch. All switch specific data should be allocated/initialized during this function. - + Arguments: Switch - the Switch being deleted - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being deleted. - + Return Value: VOID - + --*/ VOID SxExtDeleteSwitch( @@ -150,54 +150,54 @@ SxExtDeleteSwitch( _In_ NDIS_HANDLE ExtensionContext ); - + /*++ SxExtActivateSwitch - + Routine Description: This function is called to activate a switch. The function can be called while the switch is Running or Paused and should be used to bootstrap the switch if it was not Active when it was created. - + Arguments: Switch - the Switch being activated - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being restarted. - + Return Value: VOID - ---*/ + +--*/ VOID SxExtActivateSwitch( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext ); - + /*++ SxExtRestartSwitch - + Routine Description: This function is called to restart a switch from a paused state. - + Arguments: Switch - the Switch being restarted - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being restarted. - + Return Value: NDIS_STATUS_SUCCESS succeeds switch restart. - + NDIS_STATUS_RESOURCES fails switch restart because of insufficient resources. - + NDIS_STATUS_FAILURE fails switch restart. - + --*/ NDIS_STATUS SxExtRestartSwitch( @@ -209,20 +209,20 @@ SxExtRestartSwitch( /*++ SxExtPauseSwitch - + Routine Description: This function is called to pause a switch from a running state. - + Arguments: Switch - the Switch being paused - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch being paused - + Return Value: VOID - ---*/ + +--*/ VOID SxExtPauseSwitch( _In_ PSX_SWITCH_OBJECT Switch, @@ -233,24 +233,24 @@ SxExtPauseSwitch( /*++ SxExtCreatePort - + Routine Description: This function is called to create a new port on a switch. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being created - + Return Value: NDIS_STATUS_SUCCESS to succeed port creation - + NDIS_STATUS_*** to fail port creation - ---*/ + +--*/ NDIS_STATUS SxExtCreatePort( _In_ PSX_SWITCH_OBJECT Switch, @@ -258,26 +258,26 @@ SxExtCreatePort( _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtUpdatePort - + Routine Description: This function is called to update an already created port. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the port being updated - + Return Value: VOID - ---*/ + +--*/ VOID SxExtUpdatePort( _In_ PSX_SWITCH_OBJECT Switch, @@ -285,32 +285,32 @@ SxExtUpdatePort( _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtCreateNic - + Routine Description: This function is called to create a new NIC to be connected to a switch. The extension may allocate context for this NIC, and traffic may start to flow from this NIC, but it may not be used as a destination until SxExtConnectNic has been called. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being created - + Return Value: NDIS_STATUS_SUCCESS to succeed NIC creation - + NDIS_STATUS_*** to fail NIC creation - ---*/ + +--*/ NDIS_STATUS SxExtCreateNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -318,28 +318,28 @@ SxExtCreateNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtConnectNic - + Routine Description: This function is called to connect a NIC to a switch. After returning from this function the extension can use this NIC as a destination. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being connected - + Return Value: VOID - ---*/ + +--*/ VOID SxExtConnectNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -347,26 +347,26 @@ SxExtConnectNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtUpdateNic - + Routine Description: This function is called to update an already created NIC. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being updated - + Return Value: VOID - ---*/ + +--*/ VOID SxExtUpdateNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -374,28 +374,28 @@ SxExtUpdateNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtDisconnectNic - + Routine Description: This function is called to disconnect a NIC from a switch. After returning from this function the extension cannot use this NIC as a destination. - + Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being disconnected - + Return Value: VOID - ---*/ + +--*/ VOID SxExtDisconnectNic( _In_ PSX_SWITCH_OBJECT Switch, @@ -403,26 +403,26 @@ SxExtDisconnectNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtDeleteNic - + Routine Description: This function is called to delete a NIC from a switch. - No futher traffic/control will be recieved for this NIC. + No further traffic/control will be received for this NIC. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Nic - the NIC being deleted - + Return Value: VOID - + --*/ VOID SxExtDeleteNic( @@ -431,27 +431,27 @@ SxExtDeleteNic( _In_ PNDIS_SWITCH_NIC_PARAMETERS Nic ); - + /*++ SxExtTeardownPort - + Routine Description: This function is called to start deletion of a port on a switch. - Upon recieving this call, no further references may be taken + Upon receiving this call, no further references may be taken on the given port. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being deleted - + Return Value: VOID - + --*/ VOID SxExtTeardownPort( @@ -464,78 +464,78 @@ SxExtTeardownPort( /*++ SxExtDeletePort - + Routine Description: This function is called to finish deletion of a port on a switch. - Upon recieving this call, no traffic/control will be recieved + Upon receiving this call, no traffic/control will be received for this port. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + Port - the Port being deleted - + Return Value: VOID - + --*/ VOID -SxExtDeletePort( +SxExtDeletePort( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_PORT_PARAMETERS Port ); - + /*++ SxExtSaveNic - + Routine Description: This function is called to retrieve save data for a given NIC. This function will be called until all extensions have finished saving data. - + An new save for this NIC will not start until SxExtSaveNicComplete has been received. - + If returning NDIS_STATUS_SUCCESS from this function, and BytesWritten > 0 you must write to the ExtensionId, ExtensionFriendlyName, SaveDataSize and SaveData fields in SaveState. SxExtUniqueName MUST be written to ExtensionId. SxExtFriendlyName should be written to ExtensionFriendlyName. - + If returning NDIS_STATUS_SUCCESS with BytesWritten == 0, DO NOT write any data to any fields. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information and buffer to save to - + BytesWritten - the # of bytes written to the save buffer - + BytesNeeded - the length of the save buffer needed - + Return Value: NDIS_STATUS_SUCCESS - if the buffer was successfully written, or not needed and BytesWritten is set to 0 - + NDIS_STATUS_BUFFER_TOO_SHORT - if the buffer is too short for the necessary save, write the length needed in BytesNeeded NDIS_STATUS_*** - to fail the save operation - + --*/ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _Inout_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -547,123 +547,123 @@ SxExtSaveNic( /*++ SxExtSaveNicComplete - + Routine Description: This function is called to notify the extension that saving the given NIC has been completed by all extensions. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + Return Value: VOID - ---*/ + +--*/ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState ); - + /*++ SxExtNicRestore - + Routine Description: This function is called to restore previously saved data. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + BytesRestored - the number of bytes restored from the saved data - + Return Value: NDIS_STATUS_SUCCESS - if this data belongs to this extension, and was successfully restored (BytesRestored written) OR this data does not belong to this extension - (BytesRestored == 0) - + (BytesRestored == 0) + NDIS_STATUS_*** - there was an error while attempting to restore this data - ---*/ + +--*/ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState, _Out_ PULONG BytesRestored ); - + /*++ SxExtNicRestoreComplete - + Routine Description: This function is called to signify the end of a restore operation. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SaveState - the save information - + Return Value: VOID - ---*/ + +--*/ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( _In_ PSX_SWITCH_OBJECT Switch, _In_ NDIS_HANDLE ExtensionContext, _In_ PNDIS_SWITCH_NIC_SAVE_STATE SaveState ); - - + + /*++ SxExtAddSwitchProperty - + Routine Description: This function is called to add a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtAddSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -675,31 +675,31 @@ SxExtAddSwitchProperty( /*++ SxExtUpdateSwitchProperty - + Routine Description: This function is called to update a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be updated - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtUpdateSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -707,28 +707,28 @@ SxExtUpdateSwitchProperty( _In_ PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ); - + /*++ SxExtDeleteSwitchProperty - + Routine Description: This function is called to delete a property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchProperty - the property to be deleted - + Return Value: TRUE - if the policy belongs to this extension - + FALSE - otherwise - ---*/ + +--*/ BOOLEAN SxExtDeleteSwitchProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -740,32 +740,32 @@ SxExtDeleteSwitchProperty( /*++ SxExtAddPortProperty - + Routine Description: This function is called to add a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtAddPortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -777,32 +777,32 @@ SxExtAddPortProperty( /*++ SxExtUpdatePortProperty - + Routine Description: This function is called to update a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortProperty - the property to be applied - + Return Value: NDIS_STATUS_NOT_SUPPORTED - if the policy is not consumed by this extension - + NDIS_STATUS_SUCCESS - if the policy is consumed by this extension, and can successfully be enforced - + STATUS_DATA_NOT_ACCEPTED - if the policy is consumed by this extension, but cannot be enforced - + NDIS_STATUS_*** - if the policy is consumed by this extension, and setting the valid policy failed - ---*/ + +--*/ NDIS_STATUS SxExtUpdatePortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -810,29 +810,29 @@ SxExtUpdatePortProperty( _In_ PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ); - + /*++ SxExtDeletePortProperty - + Routine Description: This function is called to delete a property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - - SwitchProperty - the property to be deleted - + + PortProperty - the property to be deleted + Return Value: TRUE - if the policy is not consumed by this extension - + FALSE - otherwise - ---*/ + +--*/ BOOLEAN SxExtDeletePortProperty( _In_ PSX_SWITCH_OBJECT Switch, @@ -840,33 +840,33 @@ SxExtDeletePortProperty( _In_ PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS PortProperty ); - + /*++ SxExtQuerySwitchFeatureStatus - + Routine Description: This function is called to query the status of a custom property on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + SwitchFeatureStatus - the property buffer - + BytesNeeded - if SwitchFeatureStatus is too small, this should be set to the size buffer needed - + Return Value: TRUE - return true if this property belongs to this extension, if BytesNeeded > 0, the buffer will be reallocated and this function will be called again - + FALSE - otherwise - + --*/ BOOLEAN SxExtQuerySwitchFeatureStatus( @@ -880,29 +880,29 @@ SxExtQuerySwitchFeatureStatus( /*++ SxExtQueryPortFeatureStatus - + Routine Description: This function is called to query the status of a custom property on the given port, on the given switch. Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + PortFeatureStatus - the property buffer - + BytesNeeded - if PortFeatureStatus is too small, this should be set to the size buffer needed - + Return Value: TRUE - return true if this property belongs to this extension, if BytesNeeded > 0, the buffer will be reallocated and this function will be called again - + FALSE - otherwise - + --*/ BOOLEAN SxExtQueryPortFeatureStatus( @@ -911,14 +911,14 @@ SxExtQueryPortFeatureStatus( _Inout_ PNDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS PortFeatureStatus, _Inout_ PULONG BytesNeeded ); - - + + /*++ SxExtProcessNicRequest - + Routine Description: - This function is called upon the reciept of an OID_SWITCH_NIC_REQUEST + This function is called upon the receipt of an OID_SWITCH_NIC_REQUEST to the extension. If an extension wishes to redirect the OID, it must return a valid DestinationPortId and DestinationNicIndex, which it has taken a @@ -927,30 +927,30 @@ Routine Description: a valid SourcePortId and SourceNicIndex, which it has taken a reference on. The extension can change the OidRequest if it needs to. - + !! This function should only be used by forwarding extensions. !! Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + OidRequest - the OID wrapped by the NIC request - + SourcePortId - the source PortId to set - + SourceNicIndex - the source NicIndex to set - + DestinationPortId - the destination PortId to set - + DestinationNicIndex - the destination NicIndex to set - + Return Value: NDIS_STATUS_SUCCESS - sends OID - + NDIS_STATUS_*** - complete OID with given status - + --*/ NDIS_STATUS SxExtProcessNicRequest( @@ -967,7 +967,7 @@ SxExtProcessNicRequest( /*++ SxExtProcessNicRequestComplete - + Routine Description: This function is called upon the completion of an OID_SWITCH_NIC_REQUEST that this extension has previously altered. @@ -978,18 +978,26 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - - NicOidRequest - the OID buffer, encapsulated with source/destination info - + + OidRequest - the OID buffer, encapsulated with source/destination info + + SourcePortId - the source PortId of the OID completion + + SourceNicIndex - the source NicIndex of the OID completion + + DestinationPortId - the destination PortId of the OID completion + + DestinationNicIndex - the destination NicIndex of the OID completion + Status - the status the OID completed with - + Return Value: NDIS_STATUS - the status to complete the OID request with - ---*/ + +--*/ NDIS_STATUS SxExtProcessNicRequestComplete( _In_ PSX_SWITCH_OBJECT Switch, @@ -1001,43 +1009,43 @@ SxExtProcessNicRequestComplete( _In_ NDIS_SWITCH_NIC_INDEX DestinationNicIndex, _In_ NDIS_STATUS Status ); - + /*++ SxExtProcessNicStatus - + Routine Description: - This function is called upon the reciept of an NDIS_STATUS_SWITCH_NIC_STATUS + This function is called upon the receipt of an NDIS_STATUS_SWITCH_NIC_STATUS to the extension. If the extension wishes to modify the status indication, it should send its own status indication using NdisFIndicateStatus and return a failure status. - If the extension wishes to drop the status indiction, it should return + If the extension wishes to drop the status indication, it should return failure status, though this should be done very sparingly and carefully. - + !! This function should only be used by forwarding extensions. !! Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + StatusIndication - the indication wrapped by the NIC status indication - + SourcePortId - the source PortId of the indication - + SourceNicIndex - the source NicIndex of the indication - + Return Value: NDIS_STATUS_SUCCESS - return to continue forwarding this indication - + NDIS_STATUS_*** - if the extension wants to modify the status if modifying the status the extension should indicate its own modified status using SxLibIssueNicStatusIndicationUnsafe as soon as possible - + --*/ NDIS_STATUS SxExtProcessNicStatus( @@ -1048,11 +1056,11 @@ SxExtProcessNicStatus( _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ); - + /*++ SxExtStartNetBufferListsIngress - + Routine Description: This function is called upon the receipt on an NBL on ingress. The extension should call SxLibSendNetBufferListsIngress to continue @@ -1063,19 +1071,19 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL to be sent - + SendFlags - the send flags from NDIS, equivalent to NDIS send flags for NdisFSendNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartNetBufferListsIngress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1088,7 +1096,7 @@ SxExtStartNetBufferListsIngress( /*++ SxExtStartNetBufferListsEgress - + Routine Description: This function is called upon the receipt on an NBL on egress. The extension should call SxLibSendNetBufferListsEgress to continue @@ -1098,21 +1106,21 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL to be sent - + NumberOfNetBufferLists - the number of NBLs in NetBufferLists - + ReceiveFlags - the receive flags from NDIS, equivalent to NDIS receive flags for NdisFIndicateReceiveNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartNetBufferListsEgress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1122,11 +1130,11 @@ SxExtStartNetBufferListsEgress( _In_ ULONG ReceiveFlags ); - + /*++ SxExtStartCompleteNetBufferListsEgress - + Routine Description: This function is called upon the completion of an NBL on egress. The extension must call SxLibCompleteNetBufferListsEgress @@ -1134,19 +1142,19 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL being completed - + ReturnFlags - the return flags from NDIS, equivalent to NDIS return flags for NdisFReturnNetBufferLists - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartCompleteNetBufferListsEgress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1155,16 +1163,16 @@ SxExtStartCompleteNetBufferListsEgress( _In_ ULONG ReturnFlags ); - + /*++ SxExtStartCompleteNetBufferListsIngress - + Routine Description: This function is called upon the completion of an NBL on ingress. The extension must call SxLibCompleteNetBufferListsIngress once it has finished processing the NBL. - + If there are NBLs injected by this extension in NetBufferLists, the extension must NOT call SxLibCompleteNetBufferListsIngress, and instead call SxLibCompletedInjectedNetBufferLists with the number @@ -1172,20 +1180,20 @@ Routine Description: Arguments: Switch - the Switch context - + ExtensionContext - The extension context allocated in SxExtCreateSwitch for the switch - + NetBufferLists - the NBL being completed - + SendCompleteFlags - the send complete flags from NDIS, equivalent to NDIS send complete flags for NdisFSendNetBufferListsComplete - + Return Value: VOID - ---*/ + +--*/ VOID SxExtStartCompleteNetBufferListsIngress( _In_ PSX_SWITCH_OBJECT Switch, @@ -1193,4 +1201,4 @@ SxExtStartCompleteNetBufferListsIngress( _In_ PNET_BUFFER_LIST NetBufferLists, _In_ ULONG SendCompleteFlags ); - + diff --git a/network/ndis/extension/base/SxBase.c b/network/ndis/extension/base/SxBase.c index f45f8b79..ad84138a 100644 --- a/network/ndis/extension/base/SxBase.c +++ b/network/ndis/extension/base/SxBase.c @@ -42,7 +42,7 @@ SxpNdisProcessMethodOid( _Out_ PULONG BytesNeeded ); - + // // DriverEntry // http://msdn.microsoft.com/en-us/library/ff544113(v=VS.85).aspx @@ -59,7 +59,7 @@ DriverEntry( NDIS_STRING serviceName; UNREFERENCED_PARAMETER(RegistryPath); - + // // Initialize extension specific data. // @@ -86,10 +86,10 @@ DriverEntry( fChars.FriendlyName = SxExtensionFriendlyName; fChars.UniqueName = SxExtensionGuid; fChars.ServiceName = serviceName; - + fChars.SetOptionsHandler = SxNdisSetOptions; fChars.SetFilterModuleOptionsHandler = SxNdisSetFilterModuleOptions; - + fChars.AttachHandler = SxNdisAttach; fChars.DetachHandler = SxNdisDetach; fChars.PauseHandler = SxNdisPause; @@ -100,14 +100,14 @@ DriverEntry( fChars.CancelSendNetBufferListsHandler = SxNdisCancelSendNetBufferLists; fChars.ReceiveNetBufferListsHandler = SxNdisReceiveNetBufferLists; fChars.ReturnNetBufferListsHandler = SxNdisReturnNetBufferLists; - + fChars.OidRequestHandler = SxNdisOidRequest; fChars.OidRequestCompleteHandler = SxNdisOidRequestComplete; fChars.CancelOidRequestHandler = SxNdisCancelOidRequest; - + fChars.NetPnPEventHandler = SxNdisNetPnPEvent; fChars.StatusHandler = SxNdisStatus; - + NdisAllocateSpinLock(&SxExtensionListLock); InitializeListHead(&SxExtensionList); @@ -129,7 +129,7 @@ Cleanup: } NdisFreeSpinLock(&SxExtensionListLock); - + SxExtUninitialize(); } @@ -150,7 +150,7 @@ SxNdisUnload( UNREFERENCED_PARAMETER(DriverObject); SxExtUninitialize(); - + NdisFDeregisterFilterDriver(SxDriverHandle); NdisFreeSpinLock(&SxExtensionListLock); } @@ -171,7 +171,7 @@ SxNdisSetOptions( UNREFERENCED_PARAMETER(DriverContext); return NDIS_STATUS_SUCCESS; } - + // // FilterSetModuleOptions Function @@ -206,7 +206,7 @@ SxNdisAttach( NDIS_SWITCH_CONTEXT switchContext; NDIS_SWITCH_OPTIONAL_HANDLERS switchHandler; PSX_SWITCH_OBJECT switchObject; - + UNREFERENCED_PARAMETER(SxDriverContext); DEBUGP(DL_TRACE, ("===>SxAttach: NdisFilterHandle %p\n", NdisFilterHandle)); @@ -291,11 +291,11 @@ SxNdisAttach( switchObject->ControlFlowState = SxSwitchAttached; switchObject->DataFlowState = SxSwitchPaused; - + NdisAcquireSpinLock(&SxExtensionListLock); InsertHeadList(&SxExtensionList, &switchObject->Link); NdisReleaseSpinLock(&SxExtensionListLock); - + Cleanup: if (status != NDIS_STATUS_SUCCESS) @@ -331,24 +331,24 @@ SxNdisDetach( // NT_ASSERT(switchObject->DataFlowState == SxSwitchPaused); switchObject->ControlFlowState = SxSwitchDetached; - + KeMemoryBarrier(); - + while(switchObject->PendingOidCount > 0) { NdisMSleep(1000); } - + SxExtDeleteSwitch(switchObject, switchObject->ExtensionContext); NdisAcquireSpinLock(&SxExtensionListLock); RemoveEntryList(&switchObject->Link); NdisReleaseSpinLock(&SxExtensionListLock); - + ExFreePool(switchObject); // - // Alway return success. + // Always return success. // DEBUGP(DL_TRACE, ("<===SxDetach Successfully\n")); @@ -375,15 +375,15 @@ SxNdisPause( ("===>NDISLWF SxPause: SxInstance %p\n", FilterModuleContext)); SxExtPauseSwitch(switchObject, switchObject->ExtensionContext); - + // // Set the flag that the filter is going to pause. // NT_ASSERT(switchObject->DataFlowState == SxSwitchRunning); switchObject->DataFlowState = SxSwitchPaused; - + KeMemoryBarrier(); - + while(switchObject->PendingInjectedNblCount > 0) { NdisMSleep(1000); @@ -413,7 +413,7 @@ SxNdisRestart( DEBUGP(DL_TRACE, ("===>SxRestart: FilterModuleContext %p\n", FilterModuleContext)); - + status = SxExtRestartSwitch(switchObject, switchObject->ExtensionContext); if (status != NDIS_STATUS_SUCCESS) @@ -424,7 +424,7 @@ SxNdisRestart( NT_ASSERT(switchObject->DataFlowState == SxSwitchPaused); switchObject->DataFlowState = SxSwitchRunning; - + DEBUGP(DL_TRACE, ("<===SxRestart: FilterModuleContext %p, status %x\n", FilterModuleContext, @@ -452,11 +452,11 @@ SxNdisOidRequest( PVOID *cloneRequestContext; BOOLEAN completeOid = FALSE; ULONG bytesNeeded = 0; - + status = NDIS_STATUS_SUCCESS; DEBUGP(DL_TRACE, ("===>SxOidRequest: OidRequest %p.\n", OidRequest)); - + NdisInterlockedIncrement(&switchObject->PendingOidCount); status = NdisAllocateCloneOidRequest(switchObject->NdisFilterHandle, @@ -471,15 +471,15 @@ SxNdisOidRequest( cloneRequestContext = (PVOID*)(&clonedRequest->SourceReserved[0]); *cloneRequestContext = OidRequest; - + switch (clonedRequest->RequestType) - { + { case NdisRequestSetInformation: status = SxpNdisProcessSetOid(switchObject, clonedRequest, &completeOid); break; - + case NdisRequestMethod: status = SxpNdisProcessMethodOid(switchObject, clonedRequest, @@ -488,7 +488,7 @@ SxNdisOidRequest( break; } - + if (completeOid) { NdisFreeCloneOidRequest(switchObject->NdisFilterHandle, clonedRequest); @@ -580,7 +580,7 @@ SxNdisOidRequestComplete( NdisOidRequest->DATA.METHOD_INFORMATION.BytesNeeded; originalRequest->DATA.METHOD_INFORMATION.BytesWritten = NdisOidRequest->DATA.METHOD_INFORMATION.BytesWritten; - + if (NdisOidRequest->DATA.METHOD_INFORMATION.Oid == OID_SWITCH_NIC_REQUEST && switchObject->OldNicRequest != NULL) { @@ -593,23 +593,23 @@ SxNdisOidRequestComplete( nicOidRequestBuf->DestinationPortId, nicOidRequestBuf->DestinationNicIndex, Status); - + originalRequest->DATA.METHOD_INFORMATION.InformationBuffer = switchObject->OldNicRequest; switchObject->OldNicRequest = NULL; ExFreePoolWithTag(nicOidRequestBuf, SxExtAllocationTag); } - + break; case NdisRequestSetInformation: header = originalRequest->DATA.SET_INFORMATION.InformationBuffer; - + originalRequest->DATA.SET_INFORMATION.BytesRead = NdisOidRequest->DATA.SET_INFORMATION.BytesRead; originalRequest->DATA.SET_INFORMATION.BytesNeeded = NdisOidRequest->DATA.SET_INFORMATION.BytesNeeded; - + if (NdisOidRequest->DATA.METHOD_INFORMATION.Oid == OID_SWITCH_PORT_CREATE && Status != NDIS_STATUS_SUCCESS) { @@ -623,7 +623,7 @@ SxNdisOidRequestComplete( SxExtDeleteNic(switchObject, switchObject->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); - + } break; @@ -647,7 +647,7 @@ SxNdisOidRequestComplete( Status); DEBUGP(DL_TRACE, ("<===SxOidRequestComplete.\n")); - + Cleanup: NdisInterlockedDecrement(&switchObject->PendingOidCount); } @@ -667,7 +667,7 @@ SxNdisSendNetBufferLists( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + UNREFERENCED_PARAMETER(PortNumber); SxExtStartNetBufferListsIngress(switchObject, @@ -713,7 +713,7 @@ SxNdisReceiveNetBufferLists( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + UNREFERENCED_PARAMETER(PortNumber); SxExtStartNetBufferListsEgress(switchObject, @@ -773,9 +773,9 @@ SxNdisNetPnPEvent( ) { PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; - + if (NetPnPEvent->NetPnPEvent.NetEvent == NetEventSwitchActivate) - { + { // // Switch Activation must be passed along regardless of successful // initialization. @@ -783,7 +783,7 @@ SxNdisNetPnPEvent( SxExtActivateSwitch(switchObject, switchObject->ExtensionContext); } - + return NdisFNetPnPEvent(switchObject->NdisFilterHandle, NetPnPEvent); } @@ -804,14 +804,14 @@ SxNdisStatus( PSX_SWITCH_OBJECT switchObject = (PSX_SWITCH_OBJECT)FilterModuleContext; PNDIS_SWITCH_NIC_STATUS_INDICATION nicIndication; PNDIS_STATUS_INDICATION originalIndication; - + if (StatusIndication->Header.Type != NDIS_OBJECT_TYPE_STATUS_INDICATION || StatusIndication->Header.Revision != NDIS_STATUS_INDICATION_REVISION_1 || StatusIndication->Header.Size < NDIS_SIZEOF_STATUS_INDICATION_REVISION_1) { goto Cleanup; } - + // // Only NDIS_STATUS_SWITCH_NIC_STAUTUS indications need to be processed // by switch extensions. @@ -820,24 +820,24 @@ SxNdisStatus( { goto Cleanup; } - + nicIndication = StatusIndication->StatusBuffer; - + if (nicIndication->Header.Type != NDIS_OBJECT_TYPE_STATUS_INDICATION || nicIndication->Header.Revision != NDIS_SWITCH_NIC_STATUS_INDICATION_REVISION_1 || nicIndication->Header.Size < NDIS_SIZEOF_SWITCH_NIC_STATUS_REVISION_1) { goto Cleanup; } - + originalIndication = nicIndication->StatusIndication; - + status = SxExtProcessNicStatus(switchObject, switchObject->ExtensionContext, originalIndication, nicIndication->SourcePortId, nicIndication->SourceNicIndex); - + Cleanup: if (status == NDIS_STATUS_SUCCESS) { @@ -846,7 +846,7 @@ Cleanup: } return; - + } @@ -861,26 +861,26 @@ SxpNdisProcessSetOid( NDIS_OID oid = OidRequest->DATA.SET_INFORMATION.Oid; PNDIS_OBJECT_HEADER header; ULONG bytesRestored = 0; - + *Complete = FALSE; - + header = OidRequest->DATA.SET_INFORMATION.InformationBuffer; - + if (OidRequest->DATA.SET_INFORMATION.InformationBufferLength != 0 && - OidRequest->DATA.SET_INFORMATION.InformationBufferLength < + OidRequest->DATA.SET_INFORMATION.InformationBufferLength < sizeof(NDIS_OBJECT_HEADER)) { status = NDIS_STATUS_NOT_SUPPORTED; *Complete = TRUE; goto Cleanup; } - + if (OidRequest->DATA.SET_INFORMATION.InformationBufferLength == 0) { *Complete = FALSE; goto Cleanup; } - + switch(oid) { case OID_SWITCH_PROPERTY_ADD: @@ -893,7 +893,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PROPERTY_ADD) { status = SxExtAddSwitchProperty(Switch, @@ -906,7 +906,7 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PROPERTY_PARAMETERS)header); } - + if (status == NDIS_STATUS_NOT_SUPPORTED) { status = NDIS_STATUS_SUCCESS; @@ -916,7 +916,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + break; case OID_SWITCH_PROPERTY_DELETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -927,13 +927,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtDeleteSwitchProperty(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PROPERTY_DELETE_PARAMETERS)header); - + break; - + case OID_SWITCH_PORT_PROPERTY_ADD: case OID_SWITCH_PORT_PROPERTY_UPDATE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -944,7 +944,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PORT_PROPERTY_ADD) { status = SxExtAddPortProperty(Switch, @@ -957,7 +957,7 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS)header); } - + if (status == NDIS_STATUS_NOT_SUPPORTED) { status = NDIS_STATUS_SUCCESS; @@ -967,9 +967,9 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + break; - + case OID_SWITCH_PORT_PROPERTY_DELETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS_REVISION_1 || @@ -979,13 +979,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtDeletePortProperty(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS)header); - + break; - + case OID_SWITCH_PORT_CREATE: case OID_SWITCH_PORT_UPDATED: case OID_SWITCH_PORT_TEARDOWN: @@ -998,26 +998,26 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_PORT_CREATE) { status = SxExtCreatePort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; } } else if (oid == OID_SWITCH_PORT_UPDATED) - { + { SxExtUpdatePort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); } else if (oid == OID_SWITCH_PORT_TEARDOWN) - { + { SxExtTeardownPort(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); @@ -1028,9 +1028,9 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_PORT_PARAMETERS)header); } - + break; - + case OID_SWITCH_NIC_CREATE: case OID_SWITCH_NIC_CONNECT: case OID_SWITCH_NIC_UPDATED: @@ -1044,7 +1044,7 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + if (oid == OID_SWITCH_NIC_CREATE) { status = SxExtCreateNic(Switch, @@ -1056,7 +1056,7 @@ SxpNdisProcessSetOid( } } else if (oid == OID_SWITCH_NIC_CONNECT) - { + { SxExtConnectNic(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); @@ -1079,9 +1079,9 @@ SxpNdisProcessSetOid( Switch->ExtensionContext, (PNDIS_SWITCH_NIC_PARAMETERS)header); } - + break; - + case OID_SWITCH_NIC_RESTORE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1090,12 +1090,12 @@ SxpNdisProcessSetOid( status = NDIS_STATUS_NOT_SUPPORTED; goto Cleanup; } - + status = SxExtNicRestore(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_SAVE_STATE)header, &bytesRestored); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; @@ -1104,8 +1104,8 @@ SxpNdisProcessSetOid( { *Complete = TRUE; } - - break; + + break; case OID_SWITCH_NIC_SAVE_COMPLETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || @@ -1116,13 +1116,13 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + SxExtSaveNicComplete(Switch, Switch->ExtensionContext, - (PNDIS_SWITCH_NIC_SAVE_STATE)header); + (PNDIS_SWITCH_NIC_SAVE_STATE)header); break; - + case OID_SWITCH_NIC_RESTORE_COMPLETE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1132,17 +1132,17 @@ SxpNdisProcessSetOid( *Complete = TRUE; goto Cleanup; } - + SxExtNicRestoreComplete(Switch, Switch->ExtensionContext, - (PNDIS_SWITCH_NIC_SAVE_STATE)header); + (PNDIS_SWITCH_NIC_SAVE_STATE)header); break; - + default: break; } - + Cleanup: return status; } @@ -1165,12 +1165,12 @@ SxpNdisProcessMethodOid( NDIS_SWITCH_NIC_INDEX destNic, sourceNic; ULONG bytesWritten = 0; ULONG bytesNeeded = 0; - + *Complete = FALSE; *BytesNeeded = 0; - + header = OidRequest->DATA.METHOD_INFORMATION.InformationBuffer; - + switch(oid) { case OID_SWITCH_FEATURE_STATUS_QUERY: @@ -1182,19 +1182,19 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtQuerySwitchFeatureStatus(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_FEATURE_STATUS_PARAMETERS)header, BytesNeeded); - + if (*BytesNeeded > 0) { status = NDIS_STATUS_BUFFER_TOO_SHORT; } - + break; - + case OID_SWITCH_PORT_FEATURE_STATUS_QUERY: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1 || @@ -1204,19 +1204,19 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + *Complete = SxExtQueryPortFeatureStatus(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_PORT_FEATURE_STATUS_PARAMETERS)header, BytesNeeded); - + if (*BytesNeeded > 0) { status = NDIS_STATUS_BUFFER_TOO_SHORT; } - + break; - + case OID_SWITCH_NIC_REQUEST: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_OID_REQUEST_REVISION_1 || @@ -1226,14 +1226,14 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + nicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)header; - + sourcePort = nicOidRequest->SourcePortId; sourceNic = nicOidRequest->SourceNicIndex; destPort = nicOidRequest->DestinationPortId; destNic = nicOidRequest->DestinationNicIndex; - + status = SxExtProcessNicRequest(Switch, Switch->ExtensionContext, nicOidRequest->OidRequest, @@ -1241,13 +1241,13 @@ SxpNdisProcessMethodOid( &sourceNic, &destPort, &destNic); - + if (status != NDIS_STATUS_SUCCESS) { *Complete = TRUE; goto Cleanup; } - + if (sourcePort != nicOidRequest->SourcePortId || sourceNic != nicOidRequest->SourceNicIndex || destPort != nicOidRequest->DestinationPortId || @@ -1255,31 +1255,31 @@ SxpNdisProcessMethodOid( { ASSERT(Switch->OldNicRequest == NULL); Switch->OldNicRequest = nicOidRequest; - + newNicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)ExAllocatePool2( POOL_FLAG_NON_PAGED, sizeof(NDIS_SWITCH_NIC_OID_REQUEST), SxExtAllocationTag); - + if (newNicOidRequest == NULL) { status = NDIS_STATUS_RESOURCES; *Complete = TRUE; goto Cleanup; } - + newNicOidRequest->Header = nicOidRequest->Header; newNicOidRequest->SourcePortId = sourcePort; newNicOidRequest->SourceNicIndex = sourceNic; newNicOidRequest->DestinationPortId = destPort; newNicOidRequest->DestinationNicIndex = destNic; newNicOidRequest->OidRequest = nicOidRequest->OidRequest; - + OidRequest->DATA.METHOD_INFORMATION.InformationBuffer = newNicOidRequest; } - + break; - + case OID_SWITCH_NIC_SAVE: if (header->Type != NDIS_OBJECT_TYPE_DEFAULT || header->Revision < NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 || @@ -1289,13 +1289,13 @@ SxpNdisProcessMethodOid( *Complete = TRUE; goto Cleanup; } - + status = SxExtSaveNic(Switch, Switch->ExtensionContext, (PNDIS_SWITCH_NIC_SAVE_STATE)header, &bytesWritten, &bytesNeeded); - + if (status == NDIS_STATUS_SUCCESS && bytesWritten > 0) { @@ -1311,13 +1311,13 @@ SxpNdisProcessMethodOid( { *Complete = TRUE; } - + break; - + default: break; } - + Cleanup: return status; } @@ -1351,7 +1351,7 @@ Return Value: { PSX_OID_REQUEST oidRequest; ULONG bytesNeeded; - + UNREFERENCED_PARAMETER(Switch); bytesNeeded = 0; @@ -1381,7 +1381,7 @@ Return Value: // Save away the completion status. // oidRequest->Status = Status; - + // // Save bytesNeeded // diff --git a/network/ndis/extension/base/SxBase.h b/network/ndis/extension/base/SxBase.h index 5d34ee03..b5471f28 100644 --- a/network/ndis/extension/base/SxBase.h +++ b/network/ndis/extension/base/SxBase.h @@ -4,7 +4,7 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Module Name: - SxBase.c + SxBase.h Abstract: @@ -58,18 +58,18 @@ typedef struct _SX_SWITCH_OBJECT // SX_SWITCH_DATAFLOW_STATE DataFlowState; SX_SWITCH_CONTROLFLOW_STATE ControlFlowState; - + // // Management fields. // volatile LONG PendingInjectedNblCount; volatile LONG PendingOidCount; - + // // Control Path Management. // PNDIS_SWITCH_NIC_OID_REQUEST OldNicRequest; - + } SX_SWITCH_OBJECT, *PSX_SWITCH_OBJECT; typedef struct _SX_OID_REQUEST diff --git a/network/ndis/extension/base/SxLibrary.c b/network/ndis/extension/base/SxLibrary.c index c4b12d45..196582f3 100644 --- a/network/ndis/extension/base/SxLibrary.c +++ b/network/ndis/extension/base/SxLibrary.c @@ -34,29 +34,29 @@ SxLibSendNetBufferListsIngress( PNET_BUFFER_LIST *curDropNbl = &dropNbl; NDIS_SWITCH_PORT_ID curSourcePort; NDIS_STRING filterReason; - + dispatch = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags); sameSource = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE); - + InterlockedAdd(&Switch->PendingInjectedNblCount, NumInjectedNetBufferLists); KeMemoryBarrier(); - + if (Switch->DataFlowState != SxSwitchRunning) { RtlInitUnicodeString(&filterReason, L"Extension Paused"); - + sendCompleteFlags = (dispatch) ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0; sendCompleteFlags |= (sameSource) ? NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE : 0; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); - + if (sameSource) { for (curNbl = NetBufferLists; curNbl != NULL; curNbl = curNbl->Next) { ++numNbls; } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -66,11 +66,11 @@ SxLibSendNetBufferListsIngress( numNbls, NetBufferLists, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, NetBufferLists, - sendCompleteFlags); + sendCompleteFlags); } else { @@ -79,9 +79,9 @@ SxLibSendNetBufferListsIngress( { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + if(curSourcePort == fwdDetail->SourcePortId) { *curDropNbl = curNbl; @@ -99,7 +99,7 @@ SxLibSendNetBufferListsIngress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, dropNbl, @@ -111,7 +111,7 @@ SxLibSendNetBufferListsIngress( curSourcePort = fwdDetail->SourcePortId; } } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -121,21 +121,21 @@ SxLibSendNetBufferListsIngress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsIngress(Switch, Switch->ExtensionContext, dropNbl, sendCompleteFlags); - } - + } + goto Cleanup; } - + NdisFSendNetBufferLists(Switch->NdisFilterHandle, NetBufferLists, NDIS_DEFAULT_PORT_NUMBER, SendFlags); - + Cleanup: return; } @@ -159,23 +159,23 @@ SxLibSendNetBufferListsEgress( PNET_BUFFER_LIST dropNbl = NULL; PNET_BUFFER_LIST *curDropNbl = &dropNbl; NDIS_STRING filterReason; - + dispatch = NDIS_TEST_RECEIVE_AT_DISPATCH_LEVEL(ReceiveFlags); sameSource = NDIS_TEST_RECEIVE_FLAG(ReceiveFlags, NDIS_RECEIVE_FLAGS_SWITCH_SINGLE_SOURCE); - + if (Switch->DataFlowState != SxSwitchRunning) { RtlInitUnicodeString(&filterReason, L"Extension Paused"); - + returnFlags = (dispatch) ? NDIS_RETURN_FLAGS_DISPATCH_LEVEL : 0; returnFlags |= NDIS_RETURN_FLAGS_SWITCH_SINGLE_SOURCE; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); - + if (sameSource) { sourcePortId = fwdDetail->SourcePortId; - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -185,7 +185,7 @@ SxLibSendNetBufferListsEgress( NumberOfNetBufferLists, NetBufferLists, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, NetBufferLists, @@ -199,9 +199,9 @@ SxLibSendNetBufferListsEgress( { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + if(curSourcePort == fwdDetail->SourcePortId) { *curDropNbl = curNbl; @@ -219,7 +219,7 @@ SxLibSendNetBufferListsEgress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, dropNbl, @@ -231,7 +231,7 @@ SxLibSendNetBufferListsEgress( curSourcePort = fwdDetail->SourcePortId; } } - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -241,22 +241,22 @@ SxLibSendNetBufferListsEgress( numNbls, dropNbl, &filterReason); - + SxExtStartCompleteNetBufferListsEgress(Switch, Switch->ExtensionContext, dropNbl, returnFlags); - } - + } + goto Cleanup; } - + NdisFIndicateReceiveNetBufferLists(Switch->NdisFilterHandle, NetBufferLists, NDIS_DEFAULT_PORT_NUMBER, NumberOfNetBufferLists, ReceiveFlags); - + Cleanup: return; } @@ -407,17 +407,17 @@ Cleanup: { *BytesNeeded = bytesNeeded; } - + if (!asyncCompletion) { NdisInterlockedDecrement(&Switch->PendingOidCount); } - + if (oidRequest != NULL) { ExFreePoolWithTag(oidRequest, SxExtAllocationTag); } - + return status; } @@ -429,11 +429,11 @@ SxLibGetSwitchParametersUnsafe( ) { NDIS_STATUS status; - + SwitchParameters->Header.Revision = NDIS_SWITCH_PARAMETERS_REVISION_1; SwitchParameters->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; SwitchParameters->Header.Size = sizeof(NDIS_SWITCH_PARAMETERS); - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_PARAMETERS, @@ -443,7 +443,7 @@ SxLibGetSwitchParametersUnsafe( 0, 0, NULL); - + return status; } @@ -458,32 +458,32 @@ SxLibGetPortArrayUnsafe( ULONG BytesNeeded = 0; PNDIS_SWITCH_PORT_ARRAY portArray = NULL; ULONG arrayLength = 0; - - do + + do { if (portArray != NULL) { ExFreePoolWithTag(portArray, SxExtAllocationTag); } - + if (BytesNeeded != 0) { arrayLength = BytesNeeded; portArray = ExAllocatePool2(POOL_FLAG_NON_PAGED, arrayLength, SxExtAllocationTag); - + if (portArray == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + portArray->Header.Revision = NDIS_SWITCH_PORT_ARRAY_REVISION_1; portArray->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; portArray->Header.Size = (USHORT)arrayLength; } - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_PORT_ARRAY, @@ -493,9 +493,9 @@ SxLibGetPortArrayUnsafe( 0, 0, &BytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + *PortArray = portArray; Cleanup: if (status != NDIS_STATUS_SUCCESS && @@ -503,7 +503,7 @@ Cleanup: { ExFreePoolWithTag(portArray, SxExtAllocationTag); } - + return status; } @@ -518,32 +518,32 @@ SxLibGetNicArrayUnsafe( ULONG BytesNeeded = 0; PNDIS_SWITCH_NIC_ARRAY nicArray = NULL; ULONG arrayLength = 0; - - do + + do { if (nicArray != NULL) { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + if (BytesNeeded != 0) { arrayLength = BytesNeeded; nicArray = ExAllocatePool2(POOL_FLAG_NON_PAGED, arrayLength, SxExtAllocationTag); - + if (nicArray == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + nicArray->Header.Revision = NDIS_SWITCH_PORT_ARRAY_REVISION_1; nicArray->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; nicArray->Header.Size = (USHORT)arrayLength; } - + status = SxLibIssueOidRequest(Switch, NdisRequestQueryInformation, OID_SWITCH_NIC_ARRAY, @@ -553,9 +553,9 @@ SxLibGetNicArrayUnsafe( 0, 0, &BytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + *NicArray = nicArray; Cleanup: if (status != NDIS_STATUS_SUCCESS && @@ -563,7 +563,7 @@ Cleanup: { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + return status; } @@ -581,13 +581,13 @@ SxLibGetSwitchPropertyUnsafe( ULONG bytesNeeded = 0; PNDIS_SWITCH_PROPERTY_ENUM_PARAMETERS outputBuffer = NULL; USHORT outputBufferLength = sizeof(NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS); - + propertyParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; propertyParameters.Header.Revision = NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_REVISION_1; - + propertyParameters.PropertyType = PropertyType; propertyParameters.SerializationVersion = NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1; - + // // For Built-in properties, the ID is unnecessary. // @@ -601,18 +601,18 @@ SxLibGetSwitchPropertyUnsafe( { ASSERT(PropertyType != NdisSwitchPropertyTypeCustom); } - + outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - - do + + do { if (bytesNeeded != 0) { @@ -622,20 +622,20 @@ SxLibGetSwitchPropertyUnsafe( outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } } - + if(outputBufferLength >= sizeof(propertyParameters)) { NdisMoveMemory(outputBuffer, &propertyParameters, sizeof(propertyParameters)); - + } - + status = SxLibIssueOidRequest(Switch, NdisRequestMethod, OID_SWITCH_PROPERTY_ENUM, @@ -645,19 +645,19 @@ SxLibGetSwitchPropertyUnsafe( 0, 0, &bytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - -Cleanup: + +Cleanup: if (status != NDIS_STATUS_SUCCESS && outputBuffer != NULL) { ExFreePoolWithTag(outputBuffer, SxExtAllocationTag); outputBuffer = NULL; } - + *SwitchPropertyEnumParameters = outputBuffer; - + return status; } @@ -676,14 +676,14 @@ SxLibGetPortPropertyUnsafe( ULONG bytesNeeded = 0; PNDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS outputBuffer = NULL; USHORT outputBufferLength = sizeof(NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS); - + propertyParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; propertyParameters.Header.Revision = NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_REVISION_1; - + propertyParameters.PortId = PortId; propertyParameters.PropertyType = PropertyType; propertyParameters.SerializationVersion = NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1; - + // // For Built-in properties, the ID is unnecessary. // @@ -697,18 +697,18 @@ SxLibGetPortPropertyUnsafe( { ASSERT(PropertyType != NdisSwitchPortPropertyTypeCustom); } - + outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - - do + + do { if (bytesNeeded != 0) { @@ -718,20 +718,20 @@ SxLibGetPortPropertyUnsafe( outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outputBufferLength, SxExtAllocationTag); - + if (outputBuffer == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } } - + if(outputBufferLength >= sizeof(propertyParameters)) { outputBuffer->Header.Size = outputBufferLength; NdisMoveMemory(outputBuffer, &propertyParameters, sizeof(propertyParameters)); } - + status = SxLibIssueOidRequest(Switch, NdisRequestMethod, OID_SWITCH_PORT_PROPERTY_ENUM, @@ -741,9 +741,9 @@ SxLibGetPortPropertyUnsafe( 0, 0, &bytesNeeded); - + } while(status == NDIS_STATUS_INVALID_LENGTH); - + Cleanup: if (status != NDIS_STATUS_SUCCESS && outputBuffer != NULL) @@ -751,9 +751,9 @@ Cleanup: ExFreePoolWithTag(outputBuffer, SxExtAllocationTag); outputBuffer = NULL; } - + *PortPropertyEnumParameters = outputBuffer; - + return status; } @@ -788,27 +788,27 @@ SxLibIssueNicStatusIndicationUnsafe( NDIS_STATUS_INDICATION statusIndication; NDIS_STATUS_INDICATION wrappedIndication; NDIS_SWITCH_NIC_STATUS_INDICATION nicIndication; - + NdisZeroMemory(&wrappedIndication, sizeof(wrappedIndication)); - + wrappedIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; wrappedIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; wrappedIndication.Header.Size = NDIS_SIZEOF_STATUS_INDICATION_REVISION_1; - + wrappedIndication.SourceHandle = Switch->NdisFilterHandle; wrappedIndication.PortNumber = NDIS_DEFAULT_PORT_NUMBER; - + wrappedIndication.StatusCode = StatusCode; wrappedIndication.StatusBuffer = StatusBuffer; wrappedIndication.StatusBufferSize = StatusBufferSize; - + NdisZeroMemory(&nicIndication, sizeof(nicIndication)); - + nicIndication.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; nicIndication.Header.Revision = NDIS_SWITCH_NIC_STATUS_INDICATION_REVISION_1; nicIndication.Header.Size = NDIS_SIZEOF_SWITCH_NIC_STATUS_REVISION_1; nicIndication.StatusIndication = &wrappedIndication; - + if (IsDestination) { nicIndication.DestinationPortId = PortId; @@ -819,20 +819,20 @@ SxLibIssueNicStatusIndicationUnsafe( nicIndication.SourcePortId = PortId; nicIndication.SourceNicIndex = NicIndex; } - + NdisZeroMemory(&statusIndication, sizeof(statusIndication)); - + statusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; statusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; statusIndication.Header.Size = NDIS_SIZEOF_STATUS_INDICATION_REVISION_1; - + statusIndication.SourceHandle = Switch->NdisFilterHandle; statusIndication.PortNumber = NDIS_DEFAULT_PORT_NUMBER; - + statusIndication.StatusCode = NDIS_STATUS_SWITCH_NIC_STATUS; statusIndication.StatusBuffer = &nicIndication; statusIndication.StatusBufferSize = sizeof(nicIndication); - + NdisFIndicateStatus(Switch->NdisFilterHandle, &statusIndication); } diff --git a/network/ndis/extension/base/SxLibrary.h b/network/ndis/extension/base/SxLibrary.h index 2d9a30af..7071ab0c 100644 --- a/network/ndis/extension/base/SxLibrary.h +++ b/network/ndis/extension/base/SxLibrary.h @@ -18,32 +18,32 @@ Abstract: /*++ SxLibSendNetBufferListsIngress - + Routine Description: This function is called to forward NBLs on ingress. The extension MUST call this function, or call SxLibCompleteNetBufferListsIngress for every NBL in NetBufferLists, - recieved in SxExtStartNetBufferListsIngress. - + received in SxExtStartNetBufferListsIngress. + This function can also be called to inject NBLs. If there are NBLs in NetBufferLists that are initiated by the extension, NumInjectedNetBufferLists must be the number of new NBLs. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + SendFlags - the SendFlags equivalent to NDIS flags for NdisFSendNetBufferLists - + NumInjectedNetBufferLists - the number of NBLs in NetBufferLists initiated by the extension - + Return Value: VOID - + --*/ VOID SxLibSendNetBufferListsIngress( @@ -53,31 +53,31 @@ SxLibSendNetBufferListsIngress( _In_ ULONG NumInjectedNetBufferLists ); - + /*++ SxLibSendNetBufferListsEgress - + Routine Description: This function is called to forward NBLs on egress. The extension MUST call this function, or call SxLibCompleteNetBufferListsEgress for every NBL in NetBufferLists - recieved in SxExtStartNetBufferListsEgress. - + received in SxExtStartNetBufferListsEgress. + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + NumberOfNetBufferLists - the number of NBLs in NetBufferLists - + ReceiveFlags - the ReceiveFlags equivalent to NDIS flags for NdisFIndicateReceiveNetBufferLists - + Return Value: VOID - + --*/ VOID SxLibSendNetBufferListsEgress( @@ -87,28 +87,28 @@ SxLibSendNetBufferListsEgress( _In_ ULONG ReceiveFlags ); - + /*++ SxLibCompleteNetBufferListsEgress - + Routine Description: This function is called to complete NBLs on egress. - The extension MUST call this function for all NBLs recieved + The extension MUST call this function for all NBLs received in SxExtStartCompleteNetBufferListsEgress. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + ReturnFlags - the ReceiveFlags equivalent to NDIS flags for NdisFReturnNetBufferLists - + Return Value: VOID - + --*/ VOID SxLibCompleteNetBufferListsEgress( @@ -120,25 +120,25 @@ SxLibCompleteNetBufferListsEgress( /*++ SxLibCompleteNetBufferListsIngress - + Routine Description: This function is called to complete NBLs on ingress. The extension MUST call this function, or - SxLibCompletedInjectedNetBufferLists for all NBLs recieved in + SxLibCompletedInjectedNetBufferLists for all NBLs received in SxExtStartCompleteNetBufferListsEgress. - + Arguments: Switch - the Switch context - + NetBufferLists - the NBLs to send - + SendCompleteFlags - the ReceiveFlags equivalent to NDIS flags for NdisFSendNetBufferListsComplete - + Return Value: VOID - + --*/ VOID SxLibCompleteNetBufferListsIngress( @@ -147,32 +147,32 @@ SxLibCompleteNetBufferListsIngress( _In_ ULONG SendCompleteFlags ); - + /*++ SxLibCompletedInjectedNetBufferLists - + Routine Description: This function is called after completing NBLs injected by the extension. - + Arguments: Switch - the Switch context - + NumInjectedNetBufferLists - the number of NBLs completed - + Return Value: VOID - + --*/ VOID SxLibCompletedInjectedNetBufferLists( _In_ PSX_SWITCH_OBJECT Switch, _In_ ULONG NumInjectedNetBufferLists - ); + ); + - /*++ SxLibIssueOidRequest @@ -185,12 +185,12 @@ Routine Description: NOTE: this assumes that the calling routine ensures validity of the filter handle until this returns. - + This function can only be called at PASSIVE_LEVEL. Arguments: - Switch - pointer to our switch object. + SxSwitch - pointer to our switch object. RequestType - NdisRequest[Set|Query|method]Information. @@ -203,8 +203,8 @@ Arguments: OutputBufferLength - valid only for method request. MethodId - valid only for method request. - - Timeout - The timeout in seconds for the OID. + + Timeout - The timeout in seconds for the OID. BytesNeeded - place to return bytes read/written. @@ -225,88 +225,88 @@ SxLibIssueOidRequest( _In_ UINT Timeout, _Out_ PULONG BytesNeeded ); - + /*++ SxLibGetSwitchParametersUnsafe - + Routine Description: This function is called to get the current state of the switch. - + Arguments: Switch - the Switch context - + SwitchParameters - the returned switch parameters - + Return Value: NDIS_STATUS_SUCCESS - if SwitchParameters was successfully returned - + NDIS_STATUS_*** - otherwise - ---*/ + +--*/ NDIS_STATUS SxLibGetSwitchParametersUnsafe( _In_ PSX_SWITCH_OBJECT Switch, _Out_ PNDIS_SWITCH_PARAMETERS SwitchParameters ); - + /*++ SxLibGetPortArrayUnsafe - + Routine Description: This function is called to get the current array of ports. - - NOTE: It is necessary to synchonize this with SxExtPortCreate + + NOTE: It is necessary to synchronize this with SxExtPortCreate and SxExtPortTeardown. - + Arguments: Switch - the Switch context - + PortArray - the returned port array - + Return Value: NDIS_STATUS_SUCCESS - if PortArray was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetPortArrayUnsafe( _In_ PSX_SWITCH_OBJECT Switch, _Out_ PNDIS_SWITCH_PORT_ARRAY *PortArray - ); + ); + - /*++ SxLibGetNicArrayUnsafe - + Routine Description: This function is called to get the current array of NICs. - - NOTE: It is necessary to synchonize this with SxExtNicConnect + + NOTE: It is necessary to synchronize this with SxExtNicConnect and SxExtNicDisconnect. - + Arguments: - Switch - the Switch context - + SxSwitch - the Switch context + NicArray - the returned NIC array - + Return Value: NDIS_STATUS_SUCCESS - if NicArray was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetNicArrayUnsafe( @@ -317,32 +317,30 @@ SxLibGetNicArrayUnsafe( /*++ SxLibGetSwitchPropertyUnsafe - + Routine Description: This function is called to get the current array of the switch property queried. - - NOTE: It is necessary to synchonize this with SxExtAddSwitchProperty + + NOTE: It is necessary to synchronize this with SxExtAddSwitchProperty and SxExtDeleteSwitchProperty. - + Arguments: Switch - the Switch context - + PropertyType - the PropertyType to query for - + PropertyId - the GUID of the property (from mof file) - - PropertyVersion - the version of the property - + SwitchPropertyEnumParameters - the returned property enum - + Return Value: NDIS_STATUS_SUCCESS - if SwitchPropertyEnumParameters was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetSwitchPropertyUnsafe( @@ -355,32 +353,32 @@ SxLibGetSwitchPropertyUnsafe( /*++ SxLibGetPortPropertyUnsafe - + Routine Description: This function is called to get the current array of the switch property queried. - - NOTE: It is necessary to synchonize this with SxExtAddPortProperty + + NOTE: It is necessary to synchronize this with SxExtAddPortProperty and SxExtDeletePortProperty. - + Arguments: Switch - the Switch context - + PortId - the port to query from - + PropertyType - the PropertyType to query for - + PropertyId - the GUID of the property (from mof file) - + PortPropertyEnumParameters - the returned property enum - + Return Value: NDIS_STATUS_SUCCESS - if PortPropertyEnumParameters was successfully allocated and returned - + NDIS_STATUS_*** - otherwise - + --*/ NDIS_STATUS SxLibGetPortPropertyUnsafe( @@ -394,25 +392,25 @@ SxLibGetPortPropertyUnsafe( /*++ SxLibRevokeVfUnsafe - + Routine Description: This function is called revoke the VF assignment for the given VM. - + NOTE: This must be synchonized with SxExtNicConnect and SxExtNicDisconnect for the PortId given, and ReferenceSwitchNic must have been successfully called. - + Arguments: Switch - the Switch context - + PortId - the port the VM is connected to - + Return Value: VOID - ---*/ + +--*/ VOID SxLibRevokeVfUnsafe( _In_ PSX_SWITCH_OBJECT Switch, @@ -422,35 +420,35 @@ SxLibRevokeVfUnsafe( /*++ SxLibIssueNicStatusIndicationUnsafe - + Routine Description: This function is called issue a NIC status indication. - + NOTE: This must be synchonized with SxExtNicConnect and SxExtNicDisconnect for the PortId given, and ReferenceSwitchNic must have been successfully called. - + Arguments: Switch - the Switch context - + StatusCode - the status code to indicate - + PortId - the port to indicate to/from - + NicIndex - the nic index to indicate to/from - + IsDestination - TRUE if PortId/NicIndex is destination info FALSE if PortId/NicIndex is source info - + StatusBuffer - the StatusBuffer for the indication - + StatusBufferSize - the size of StatusBuffer - + Return Value: VOID - ---*/ + +--*/ VOID SxLibIssueNicStatusIndicationUnsafe( _In_ PSX_SWITCH_OBJECT Switch, @@ -461,4 +459,4 @@ SxLibIssueNicStatusIndicationUnsafe( _In_opt_ PVOID StatusBuffer, _In_ ULONG StatusBufferSize ); - + diff --git a/network/ndis/extension/base/sxbase.vcxproj b/network/ndis/extension/base/sxbase.vcxproj index aa23ad51..49a0f427 100644 --- a/network/ndis/extension/base/sxbase.vcxproj +++ b/network/ndis/extension/base/sxbase.vcxproj @@ -1,6 +1,14 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -26,6 +34,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>StaticLibrary</ConfigurationType> + </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> @@ -34,6 +50,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>StaticLibrary</ConfigurationType> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> <OutDir>$(IntDir)</OutDir> @@ -41,16 +65,28 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>sxbase</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetName>sxbase</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>sxbase</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetName>sxbase</TargetName> + </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> @@ -75,6 +111,30 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + </Midl> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> @@ -99,6 +159,30 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ResourceCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + </ResourceCompile> + <ClCompile> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <Midl> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630=1;NDIS_WDM=1</PreprocessorDefinitions> + </Midl> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + </Link> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="precompsrc.c"> <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -132,4 +216,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/network/ndis/extension/extensions.sln b/network/ndis/extension/extensions.sln index 6915713c..60c86c4d 100644 --- a/network/ndis/extension/extensions.sln +++ b/network/ndis/extension/extensions.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -25,10 +25,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mspassthroughext", "samples EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {116389EB-9596-42A0-9C05-66DBD2A62363}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {116389EB-9596-42A0-9C05-66DBD2A62363}.Debug|ARM64.Build.0 = Debug|ARM64 + {86E5643E-4462-4EDC-A315-07C2D260C5AD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {86E5643E-4462-4EDC-A315-07C2D260C5AD}.Debug|ARM64.Build.0 = Debug|ARM64 + {C0A48ACA-3961-4E93-B2B4-4D27E0106A3B}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C0A48ACA-3961-4E93-B2B4-4D27E0106A3B}.Debug|ARM64.Build.0 = Debug|ARM64 + {116389EB-9596-42A0-9C05-66DBD2A62363}.Release|ARM64.ActiveCfg = Release|ARM64 + {116389EB-9596-42A0-9C05-66DBD2A62363}.Release|ARM64.Build.0 = Release|ARM64 + {86E5643E-4462-4EDC-A315-07C2D260C5AD}.Release|ARM64.ActiveCfg = Release|ARM64 + {86E5643E-4462-4EDC-A315-07C2D260C5AD}.Release|ARM64.Build.0 = Release|ARM64 + {C0A48ACA-3961-4E93-B2B4-4D27E0106A3B}.Release|ARM64.ActiveCfg = Release|ARM64 + {C0A48ACA-3961-4E93-B2B4-4D27E0106A3B}.Release|ARM64.Build.0 = Release|ARM64 {116389EB-9596-42A0-9C05-66DBD2A62363}.Debug|x64.ActiveCfg = Debug|x64 {116389EB-9596-42A0-9C05-66DBD2A62363}.Debug|x64.Build.0 = Debug|x64 {116389EB-9596-42A0-9C05-66DBD2A62363}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof b/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof index 88105b2f..7d719ac3 100644 --- a/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof +++ b/network/ndis/extension/samples/forward/MSForwardExtPolicy.mof @@ -6,9 +6,9 @@ // #pragma namespace("\\\\.\\root\\virtualization\\v2") -[ Dynamic, +[ Dynamic, UUID("EB29F0F2-F5DC-45C6-81BB-3CD9F219BBBB"), - ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), + ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), Provider("VmmsWmiInstanceAndMethodProvider"), Locale(0x409), InterfaceVersion("1"), @@ -16,7 +16,7 @@ DisplayName("MSForwardExt MAC Address Policy") : Amended, Description("Source MAC Addresses to allow sends on MSForwardExt.") : Amended] class MSForwardExt_MacAddressRule : Msvm_EthernetSwitchFeatureSettingData { - + // // MAC Address set on switch to allow sends from. // @@ -29,4 +29,4 @@ class MSForwardExt_MacAddressRule : Msvm_EthernetSwitchFeatureSettingData { Description ( "Mac Address") : Amended] uint8 MacAddress[] = {}; -}; +}; diff --git a/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof b/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof index c9d509e8..c8e32760 100644 --- a/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof +++ b/network/ndis/extension/samples/forward/MSForwardExtPolicyStatus.mof @@ -6,9 +6,9 @@ // #pragma namespace("\\\\.\\root\\virtualization\\v2") -[ Dynamic, +[ Dynamic, UUID("A3E2AFF5-E6FA-4E52-AB74-13250BF7E8CF"), - ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), + ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), Provider("VmmsWmiInstanceAndMethodProvider"), Applicability("2"), Locale(0x409), @@ -17,7 +17,7 @@ DisplayName("MSForwardExt MAC Address Policy Status") : Amended, Description("The current array of PortIds with policy set to allow sends") : Amended] class MSForwardExt_MacAddressRuleStatus : Msvm_EthernetSwitchData { - + // // Array of PortId's currently allowing sends. // @@ -28,4 +28,4 @@ class MSForwardExt_MacAddressRuleStatus : Msvm_EthernetSwitchData { Description ( "Currently Allowed Port Ids") : Amended] uint32 AllowedPortIds[] = {}; -}; +}; diff --git a/network/ndis/extension/samples/forward/MsForwardExt.c b/network/ndis/extension/samples/forward/MsForwardExt.c index cabd6401..69583156 100644 --- a/network/ndis/extension/samples/forward/MsForwardExt.c +++ b/network/ndis/extension/samples/forward/MsForwardExt.c @@ -50,15 +50,15 @@ const NDIS_SWITCH_OBJECT_ID MacAddressPolicyStatusGuid = { 0x4E52, {0xAB, 0x74, 0x13, 0x25, 0x0B, 0xF7, 0xE8, 0xCF} }; - - + + NDIS_STATUS SxExtInitialize() /*++ - + Routine Description: No global information needed. - + --*/ { return NDIS_STATUS_SUCCESS; @@ -68,10 +68,10 @@ Routine Description: VOID SxExtUninitialize() /*++ - + Routine Description: No global information needed. - + --*/ { return; @@ -85,41 +85,41 @@ SxExtCreateSwitch( PNDIS_HANDLE *ExtensionContext ) /*++ - + Routine Description: This function allocated the switch context, and initializes its necessary members. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_CONTEXT switchContext; - + switchContext = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_CONTEXT), SxExtAllocationTag); - + if (switchContext == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisZeroMemory(switchContext, sizeof(MSFORWARD_CONTEXT)); InitializeListHead(&switchContext->NicList); InitializeListHead(&switchContext->PropertyList); - + switchContext->DispatchLock = NdisAllocateRWLock(Switch->NdisFilterHandle); if (switchContext->DispatchLock == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + switchContext->IsInitialRestart = TRUE; - + *ExtensionContext = (NDIS_HANDLE)switchContext; - + Cleanup: if (status != NDIS_STATUS_SUCCESS) { @@ -140,17 +140,17 @@ SxExtDeleteSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: This function deletes the switch by freeing all memory previously allocated. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; - + UNREFERENCED_PARAMETER(Switch); - + MsForwardClearNicListUnsafe(switchContext); MsForwardClearPropertyListUnsafe(switchContext); NdisFreeRWLock(switchContext->DispatchLock); @@ -167,7 +167,7 @@ SxExtActivateSwitch( { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; MsForwardInitSwitch(Switch, switchContext); - + return; } @@ -179,7 +179,7 @@ SxExtRestartSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: This function initializes the switch if it is the first restart. First it queries all of the MAC addresses set as custom @@ -188,7 +188,7 @@ Routine Description: Then it queries the NIC list and verifies it can support all of the NICs currently connected to the switch, and adds the NICs to the NIC list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -198,12 +198,12 @@ Routine Description: if (switchContext->IsInitialRestart) { status = SxLibGetSwitchParametersUnsafe(Switch, &switchParameters); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + if (switchParameters.IsActive) { status = MsForwardInitSwitch(Switch, switchContext); @@ -212,11 +212,11 @@ Routine Description: goto Cleanup; } } - + switchContext->IsInitialRestart = FALSE; } - -Cleanup: + +Cleanup: return status; } @@ -228,15 +228,15 @@ SxExtPauseSwitch( NDIS_HANDLE ExtensionContext ) /*++ - + Routine Description: No pause funtionality required. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -249,16 +249,16 @@ SxExtCreatePort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track ports, only NICs. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return NDIS_STATUS_SUCCESS; } @@ -271,16 +271,16 @@ SxExtUpdatePort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track ports, only NICs. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } @@ -293,18 +293,18 @@ SxExtCreateNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Allocate NIC, add to NIC list, and correlate with policy. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; NDIS_STATUS status = NDIS_STATUS_SUCCESS; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -312,9 +312,9 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + status = MsForwardAddNicUnsafe(switchContext, Nic->PermanentMacAddress, Nic->PortId, @@ -322,9 +322,9 @@ Routine Description: Nic->NicType, FALSE); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + return status; } @@ -337,18 +337,18 @@ SxExtConnectNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Mark already created NIC as connected. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -356,7 +356,7 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal && Nic->NicIndex != 0 && @@ -372,7 +372,7 @@ Routine Description: nicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, Nic->PortId, Nic->NicIndex); - + if(nicEntry != NULL) { nicEntry->Connected = TRUE; @@ -395,21 +395,21 @@ SxExtUpdateNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: This extension doesn't use any of the fields that can be updated. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtDisconnectNic( PSX_SWITCH_OBJECT Switch, @@ -417,18 +417,18 @@ SxExtDisconnectNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Mark already created NIC as disconnected. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -436,12 +436,12 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal) { if (Nic->NicIndex == switchContext->ExternalNicIndex) - { + { --(switchContext->NumDestinations); switchContext->ExternalNicConnected = FALSE; } @@ -451,7 +451,7 @@ Routine Description: nicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, Nic->PortId, Nic->NicIndex); - + if(nicEntry != NULL) { nicEntry->Connected = FALSE; @@ -466,7 +466,7 @@ Routine Description: NdisReleaseRWLock(switchContext->DispatchLock, &lockState); } - + _Use_decl_annotations_ VOID SxExtDeleteNic( @@ -475,18 +475,18 @@ SxExtDeleteNic( PNDIS_SWITCH_NIC_PARAMETERS Nic ) /*++ - + Routine Description: Delete created NIC, free related memory and remove from NIC list. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + // // Wait for lists to be initialized. // @@ -494,7 +494,7 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); if (Nic->NicType == NdisSwitchNicTypeExternal && Nic->NicIndex == switchContext->ExternalNicIndex) @@ -523,10 +523,10 @@ SxExtTeardownPort( PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track port state. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -537,16 +537,16 @@ Routine Description: _Use_decl_annotations_ VOID -SxExtDeletePort( +SxExtDeletePort( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_PORT_PARAMETERS Port ) /*++ - + Routine Description: This extension does not track port state. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -555,9 +555,9 @@ Routine Description: } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -565,63 +565,63 @@ SxExtSaveNic( PULONG BytesNeeded ) /*++ - + Routine Description: This extension does not save any data. - + --*/ -{ +{ UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesWritten = 0; *BytesNeeded = 0; return NDIS_STATUS_SUCCESS; } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, PULONG BytesRestored ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesRestored = 0; return NDIS_STATUS_SUCCESS; } @@ -629,22 +629,22 @@ Routine Description: _Use_decl_annotations_ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState ) /*++ - + Routine Description: This extension does not save any data. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } @@ -657,12 +657,12 @@ SxExtAddSwitchProperty( PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy. The function verifies the switch property is our MAC policy and then adds it to the property list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; @@ -670,14 +670,14 @@ Routine Description: PMSFORWARD_MAC_ADDRESS_POLICY macPolicy; PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchProperty->PropertyType != NdisSwitchPropertyTypeCustom) { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -687,17 +687,17 @@ Routine Description: { goto Cleanup; } - + if (SwitchProperty->PropertyVersion != MAC_ADDRESS_POLICY_VERSION) { goto Cleanup; } - + if (SwitchProperty->SerializationVersion != MAC_ADDRESS_POLICY_SERIALIZATION_VERSION) { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -705,31 +705,31 @@ Routine Description: { NdisMSleep(100); } - + customPolicy = NDIS_SWITCH_PROPERTY_PARAMETERS_GET_PROPERTY(SwitchProperty); macPolicy = NDIS_SWITCH_PROPERTY_CUSTOM_GET_BUFFER(customPolicy); - + if (macPolicy->MacAddressLength != 6) { status = NDIS_STATUS_DATA_NOT_ACCEPTED; - } + } else { NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + status = MsForwardAddMacPolicyUnsafe(switchContext, macPolicy, &SwitchProperty->PropertyInstanceId); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); } - + Cleanup: return status; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtUpdateSwitchProperty( PSX_SWITCH_OBJECT Switch, @@ -737,15 +737,15 @@ SxExtUpdateSwitchProperty( PNDIS_SWITCH_PROPERTY_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy, but does not allow updates for that policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); @@ -753,7 +753,7 @@ Routine Description: { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -763,19 +763,19 @@ Routine Description: { goto Cleanup; } - + if (SwitchProperty->PropertyVersion != MAC_ADDRESS_POLICY_VERSION) { goto Cleanup; } - + if (SwitchProperty->SerializationVersion != MAC_ADDRESS_POLICY_SERIALIZATION_VERSION) { goto Cleanup; } status = NDIS_STATUS_DATA_NOT_ACCEPTED; - + Cleanup: return status; } @@ -789,25 +789,25 @@ SxExtDeleteSwitchProperty( PNDIS_SWITCH_PROPERTY_DELETE_PARAMETERS SwitchProperty ) /*++ - + Routine Description: This extension enforces one custom switch policy. The function verifies the switch property is our MAC policy and then deletes it from the property list. - + --*/ { BOOLEAN delete = FALSE; PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; LOCK_STATE_EX lockState; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchProperty->PropertyType != NdisSwitchPropertyTypeCustom) { goto Cleanup; } - + // // Check if MAC Address Policy for this extension. // @@ -817,7 +817,7 @@ Routine Description: { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -825,23 +825,23 @@ Routine Description: { NdisMSleep(100); } - - + + delete = TRUE; NdisAcquireRWLockWrite(switchContext->DispatchLock, &lockState, 0); - + MsForwardDeleteMacPolicyUnsafe(switchContext, &SwitchProperty->PropertyInstanceId); - + NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + Cleanup: return delete; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtAddPortProperty( PSX_SWITCH_OBJECT Switch, @@ -849,20 +849,20 @@ SxExtAddPortProperty( PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. Because of this the extension fails the adding of these policies. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -870,14 +870,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -886,7 +886,7 @@ Routine Description: // status = NDIS_STATUS_DATA_NOT_ACCEPTED; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -897,7 +897,7 @@ Routine Description: return status; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS SxExtUpdatePortProperty( PSX_SWITCH_OBJECT Switch, @@ -905,20 +905,20 @@ SxExtUpdatePortProperty( PNDIS_SWITCH_PORT_PROPERTY_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. Because of this the extension fails the updating of these policies. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { NDIS_STATUS status = NDIS_STATUS_NOT_SUPPORTED; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -926,14 +926,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -942,7 +942,7 @@ Routine Description: // status = NDIS_STATUS_DATA_NOT_ACCEPTED; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -961,21 +961,21 @@ SxExtDeletePortProperty( PNDIS_SWITCH_PORT_PROPERTY_DELETE_PARAMETERS PortProperty ) /*++ - + Routine Description: This extension does not enforce VLAN. These policies are policies that should be supported by this extension, so it returns TRUE to complete the deletion. - + !! REAL FORWARDING EXTENSIONS SHOULD SUPPORT THESE PROPERTIES !! - + --*/ { BOOLEAN delete = FALSE; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + switch(PortProperty->PropertyType) { case NdisSwitchPortPropertyTypeCustom: @@ -983,14 +983,14 @@ Routine Description: // No Custom Port Properties. // break; - + case NdisSwitchPortPropertyTypeSecurity: // // This extension does need to look at security policy, pass it down. // An extension must always pass through Hyper-V security policy. // break; - + case NdisSwitchPortPropertyTypeVlan: // // Forwarding extensions must either enforce VLAN, or fail @@ -999,7 +999,7 @@ Routine Description: // delete = TRUE; break; - + case NdisSwitchPortPropertyTypeProfile: // // No Processing of Port Profile. @@ -1020,11 +1020,11 @@ SxExtQuerySwitchFeatureStatus( PULONG BytesNeeded ) /*++ - + Routine Description: This extension reports the status of its custom MAC policy by returning the list of PortId's currently allowing sends. - + --*/ { BOOLEAN consumed = FALSE; @@ -1041,26 +1041,26 @@ Routine Description: PNDIS_SWITCH_PORT_ID portIdArray; ULONG arrayIndex = 0; ULONG customBufferLength = 0; - + UNREFERENCED_PARAMETER(Switch); - + if (SwitchFeatureStatus->FeatureStatusType != NdisSwitchFeatureStatusTypeCustom) { goto Cleanup; } - + if (!RtlEqualMemory(&SwitchFeatureStatus->FeatureStatusId, &MacAddressPolicyStatusGuid, sizeof(NDIS_SWITCH_OBJECT_ID))) { goto Cleanup; } - + if (SwitchFeatureStatus->SerializationVersion != MAC_ADDRESS_POLICY_STATUS_SERIALIZATION_VERSION) { goto Cleanup; } - + // // Wait for lists to be initialized. // @@ -1068,52 +1068,52 @@ Routine Description: { NdisMSleep(100); } - + NdisAcquireRWLockRead(switchContext->DispatchLock, &lockState, 0); lockHeld = TRUE; - + if (switchContext->ExternalPortId != NDIS_SWITCH_DEFAULT_PORT_ID) { ++numAllowedSourcePorts; } - + if (!IsListEmpty(nicList)) { curEntry = nicList->Flink; - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->AllowSends) { ++numAllowedSourcePorts; } curEntry = curEntry->Flink; - + } while(curEntry != nicList); } - + customBufferLength = sizeof(MSFORWARD_MAC_ADDRESS_POLICY_STATUS) + (sizeof(NDIS_SWITCH_PORT_ID) * numAllowedSourcePorts); sizeNeeded = NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_PARAMETERS_REVISION_1 + NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1 + customBufferLength; - + consumed = TRUE; - + if (SwitchFeatureStatus->FeatureStatusBufferLength < sizeof(NDIS_SWITCH_FEATURE_STATUS_CUSTOM)) { *BytesNeeded = sizeNeeded; goto Cleanup; } - + customStatusBuffer = (PNDIS_SWITCH_FEATURE_STATUS_CUSTOM) (((PUINT8)SwitchFeatureStatus) + SwitchFeatureStatus->FeatureStatusBufferOffset); - + if (customStatusBuffer->Header.Type != NDIS_OBJECT_TYPE_DEFAULT || customStatusBuffer->Header.Revision != NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1 || customStatusBuffer->Header.Size != NDIS_SIZEOF_NDIS_SWITCH_FEATURE_STATUS_CUSTOM_REVISION_1) @@ -1121,42 +1121,42 @@ Routine Description: consumed = FALSE; goto Cleanup; } - - - + + + if (customStatusBuffer->FeatureStatusCustomBufferLength < customBufferLength) { *BytesNeeded = sizeNeeded; goto Cleanup; } - + macAddressPolicyBuffer = (PMSFORWARD_MAC_ADDRESS_POLICY_STATUS) (((PUINT8)customStatusBuffer) + customStatusBuffer->FeatureStatusCustomBufferOffset); - + macAddressPolicyBuffer->PortArrayLength = numAllowedSourcePorts; macAddressPolicyBuffer->PortArrayOffset = sizeof(MSFORWARD_MAC_ADDRESS_POLICY_STATUS); - + portIdArray = (PNDIS_SWITCH_PORT_ID) (((PUINT8)macAddressPolicyBuffer) + macAddressPolicyBuffer->PortArrayOffset); - - + + if (switchContext->ExternalPortId != NDIS_SWITCH_DEFAULT_PORT_ID) { portIdArray[arrayIndex] = switchContext->ExternalPortId; ++arrayIndex; } - + if (!IsListEmpty(nicList)) { curEntry = nicList->Flink; - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->AllowSends) { portIdArray[arrayIndex] = nic->PortId; @@ -1164,7 +1164,7 @@ Routine Description: } curEntry = curEntry->Flink; - + } while(curEntry != nicList); } @@ -1178,7 +1178,7 @@ Cleanup: return consumed; } - + _Use_decl_annotations_ BOOLEAN @@ -1189,17 +1189,17 @@ SxExtQueryPortFeatureStatus( PULONG BytesNeeded ) /*++ - + Routine Description: This extension has no custom port properties. - + --*/ { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } @@ -1216,24 +1216,24 @@ SxExtProcessNicRequest( PNDIS_SWITCH_NIC_INDEX DestinationNicIndex ) /*++ - + Routine Description: - The only NIC request this extension cares about is + The only NIC request this extension cares about is OID_NIC_SWITCH_ALLOCATE_VF. We must fail all VF allocations so that traffic flows through the extension and we can enforce policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); - + // // Do not allow VF allocations, as all VM traffic must flow // through our extension. @@ -1243,7 +1243,7 @@ Routine Description: { status = NDIS_STATUS_FAILURE; } - + return status; } @@ -1261,11 +1261,11 @@ SxExtProcessNicRequestComplete( NDIS_STATUS Status ) /*++ - + Routine Description: This function will never be called because we do not redirect or edit any NIC requests. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -1276,13 +1276,13 @@ Routine Description: UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); UNREFERENCED_PARAMETER(Status); - + // // This function should never be called as we don't set any // source/destination info in SxExtProcessNicRequest. // ASSERT(FALSE); - + return Status; } @@ -1297,11 +1297,11 @@ SxExtProcessNicStatus( NDIS_SWITCH_NIC_INDEX SourceNicIndex ) /*++ - + Routine Description: This extension does not need to process any status indications. - + --*/ { UNREFERENCED_PARAMETER(Switch); @@ -1309,7 +1309,7 @@ Routine Description: UNREFERENCED_PARAMETER(StatusIndication); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -1323,7 +1323,7 @@ SxExtStartNetBufferListsIngress( ULONG SendFlags ) /*++ - + Routine Description: The function sets the destination lists of the NBLs forwarded through the switch. @@ -1331,13 +1331,13 @@ Routine Description: Internal NIC, or NICs with MAC Policy set. The extension determines the source by searching for the source MAC address in the NIC list. - + The extension sets destinations by looking at the destination MAC address. If the destination MAC address is a multicast or broadcast address, the extension broadcasts the NBL to all ports, except the source. If the destination MAC is a VM, the extension sets the VM as the destitation. Otherwise the extension sets the External port as the destination. - + --*/ { PMSFORWARD_CONTEXT switchContext = (PMSFORWARD_CONTEXT)ExtensionContext; @@ -1368,13 +1368,13 @@ Routine Description: PNET_BUFFER_LIST nativeForwardedNbls = NULL; PNET_BUFFER_LIST *nextExtForwardNbl = &extForwardedNbls; PNET_BUFFER_LIST *nextNativeForwardedNbl = &nativeForwardedNbls; - + dispatch = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_DISPATCH_LEVEL); sameSource = NDIS_TEST_SEND_FLAG(SendFlags, NDIS_SEND_FLAGS_SWITCH_SINGLE_SOURCE); - + sendCompleteFlags |= (dispatch) ? NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL : 0; SendFlags |= NDIS_SEND_FLAGS_SWITCH_DESTINATION_GROUP; - + // // Take DispatchLock so no NICs disconnect while we're setting destinations. // @@ -1384,9 +1384,9 @@ Routine Description: fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(NetBufferLists); sourcePort = fwdDetail->SourcePortId; sourceIndex = (NDIS_SWITCH_NIC_INDEX)fwdDetail->SourceNicIndex; - + sendCompleteFlags |= NDIS_SEND_COMPLETE_FLAGS_SWITCH_SINGLE_SOURCE; - + sourceNicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, sourcePort, sourceIndex); @@ -1398,11 +1398,11 @@ Routine Description: { ++numDropNbls; } - - *nextDropNbl = NetBufferLists; - + + *nextDropNbl = NetBufferLists; + RtlInitUnicodeString(&filterReason, L"Blocked by Source MAC Policy"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1412,10 +1412,10 @@ Routine Description: numDropNbls, dropNbl, &filterReason); - + goto Cleanup; } - + // // If nicEntry is not found, and is not external port, // we must have failed to allocate this port. @@ -1428,11 +1428,11 @@ Routine Description: { ++numDropNbls; } - + *nextDropNbl = NetBufferLists; - + RtlInitUnicodeString(&filterReason, L"Low Resources"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1442,11 +1442,11 @@ Routine Description: numDropNbls, dropNbl, &filterReason); - + goto Cleanup; - } + } } - + // // Split NBL list into NBLs to be forwarded by us, and those that require // native forwarding. @@ -1467,14 +1467,14 @@ Routine Description: nextExtForwardNbl = &(curNbl->Next); } } - + for (curNbl = extForwardedNbls; curNbl != NULL; curNbl = nextNbl) { nextNbl = curNbl->Next; curNbl->Next = NULL; - + fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl); - + // // First check for allowed source if not same source. // @@ -1482,15 +1482,15 @@ Routine Description: { sourcePort = fwdDetail->SourcePortId; sourceIndex = (NDIS_SWITCH_NIC_INDEX)fwdDetail->SourceNicIndex; - + sourceNicEntry = MsForwardFindNicByPortIdUnsafe(switchContext, sourcePort, sourceIndex); - + if (sourceNicEntry != NULL && !sourceNicEntry->AllowSends) { RtlInitUnicodeString(&filterReason, L"Blocked by Source MAC Policy"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1500,7 +1500,7 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; @@ -1509,7 +1509,7 @@ Routine Description: sourcePort != switchContext->ExternalPortId) { RtlInitUnicodeString(&filterReason, L"Low Resources"); - + Switch->NdisSwitchHandlers.ReportFilteredNetBufferLists( Switch->NdisSwitchContext, &SxExtensionGuid, @@ -1519,13 +1519,13 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; - } + } } - + // // Ethernet Header is a guaranteed safe access. // @@ -1535,7 +1535,7 @@ Routine Description: LowPagePriority | MdlMappingNoExecute); curHeader = (PMSFORWARD_ETHERNET_HEADER) (curBuffer + (NET_BUFFER_LIST_FIRST_NB(curNbl))->CurrentMdlOffset); - + // // Check for broadcast. (Broadcast if multicast) // @@ -1551,11 +1551,11 @@ Routine Description: sendNbl, SendFlags, 0); - + sendNbl = NULL; nextSendNbl = &sendNbl; } - + if (fwdDetail->NumAvailableDestinations < (switchContext->NumDestinations - 1)) { status = Switch->NdisSwitchHandlers.GrowNetBufferListDestinations( @@ -1563,7 +1563,7 @@ Routine Description: curNbl, (switchContext->NumDestinations - 1 - fwdDetail->NumAvailableDestinations), &broadcastArray); - + if (status != NDIS_STATUS_SUCCESS) { RtlInitUnicodeString(&filterReason, L"Failed to grow destination list."); @@ -1576,7 +1576,7 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; @@ -1589,7 +1589,7 @@ Routine Description: curNbl, &broadcastArray); } - + MsForwardMakeBroadcastArrayUnsafe(switchContext, broadcastArray, sourcePort, @@ -1607,26 +1607,26 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + status = Switch->NdisSwitchHandlers.UpdateNetBufferListDestinations( Switch->NdisSwitchContext, curNbl, (switchContext->NumDestinations - 1), broadcastArray); ASSERT(status == NDIS_STATUS_SUCCESS); - + *nextSendNbl = curNbl; nextSendNbl = &(curNbl->Next); broadcast = TRUE; - + continue; } - + if (RtlEqualMemory(prevMacAddress, curHeader->Destination, @@ -1641,7 +1641,7 @@ Routine Description: curHeader->Destination); // // Not a VM or host, send to external. - // + // if (destinationNicEntry == NULL) { // @@ -1659,12 +1659,12 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + if (sourcePort == switchContext->ExternalPortId) { RtlInitUnicodeString(&filterReason, L"Destination == Source"); @@ -1677,12 +1677,12 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } - + curDestinationPort = switchContext->ExternalPortId; curDestinationIndex = switchContext->ExternalNicIndex; } @@ -1703,27 +1703,27 @@ Routine Description: 1, curNbl, &filterReason); - + *nextDropNbl = curNbl; nextDropNbl = &curNbl->Next; continue; } } - + RtlMoveMemory(prevMacAddress, curHeader->Destination, sizeof(prevMacAddress)); newDestination.PortId = curDestinationPort; newDestination.NicIndex = curDestinationIndex; newDestination.PreserveVLAN = 0; - + ASSERT(fwdDetail->NumAvailableDestinations > 0); status = Switch->NdisSwitchHandlers.AddNetBufferListDestination( Switch->NdisSwitchContext, curNbl, &newDestination); ASSERT(status == NDIS_STATUS_SUCCESS); - - if(sendNbl != NULL && + + if(sendNbl != NULL && (broadcast || (prevDestinationPort != curDestinationPort || prevDestinationIndex != curDestinationIndex))) @@ -1732,14 +1732,14 @@ Routine Description: sendNbl, SendFlags, 0); - + sendNbl = NULL; nextSendNbl = &sendNbl; } - + *nextSendNbl = curNbl; nextSendNbl = &(curNbl->Next); - + // // Done processing this NBL. // @@ -1747,10 +1747,10 @@ Routine Description: prevDestinationIndex = curDestinationIndex; broadcast = FALSE; } - + Cleanup: NdisReleaseRWLock(switchContext->DispatchLock, &lockState); - + if (sendNbl != NULL) { SxLibSendNetBufferListsIngress(Switch, @@ -1758,7 +1758,7 @@ Cleanup: SendFlags, 0); } - + if (nativeForwardedNbls != NULL) { SxLibSendNetBufferListsIngress(Switch, @@ -1766,7 +1766,7 @@ Cleanup: SendFlags, 0); } - + if (dropNbl != NULL) { SxLibCompleteNetBufferListsIngress(Switch, @@ -1786,14 +1786,14 @@ SxExtStartNetBufferListsEgress( ULONG ReceiveFlags ) /*++ - + Routine Description: No egress processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsEgress(Switch, NetBufferLists, NumberOfNetBufferLists, @@ -1810,14 +1810,14 @@ SxExtStartCompleteNetBufferListsEgress( ULONG ReturnFlags ) /*++ - + Routine Description: No egress processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsEgress(Switch, NetBufferLists, ReturnFlags); @@ -1833,14 +1833,14 @@ SxExtStartCompleteNetBufferListsIngress( ULONG SendCompleteFlags ) /*++ - + Routine Description: No ingress complete processing necessary. - + --*/ { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsIngress(Switch, NetBufferLists, SendCompleteFlags); @@ -1857,46 +1857,46 @@ MsForwardAddNicUnsafe( _In_ BOOLEAN Connected ) /*++ - + Routine Description: Add given NIC to the NIC list and correlate with MAC policy. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_NIC_LIST_ENTRY nicEntry = NULL; PLIST_ENTRY nicList = &SwitchContext->NicList; - + if (NicType == NdisSwitchNicTypeExternal) { goto Cleanup; } - + nicEntry = MsForwardFindNicByPortIdUnsafe(SwitchContext, - PortId, + PortId, NicIndex); - + if (nicEntry == NULL) { nicEntry = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_NIC_LIST_ENTRY), SxExtAllocationTag); - + if (nicEntry == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisZeroMemory(nicEntry, sizeof(MSFORWARD_NIC_LIST_ENTRY)); NdisMoveMemory(nicEntry->MacAddress, MacAddress, MSFORWARD_MAC_LENGTH); - + nicEntry->PortId = PortId; nicEntry->NicIndex = NicIndex; nicEntry->NicType = NicType; nicEntry->Connected = Connected; - + if (NicType == NdisSwitchNicTypeInternal) { nicEntry->AllowSends = TRUE; @@ -1905,10 +1905,10 @@ Routine Description: { nicEntry->AllowSends = MsForwardNicHasPolicy(SwitchContext, MacAddress); } - + InsertHeadList(nicList, &nicEntry->ListEntry); } - + Cleanup: return status; } @@ -1921,46 +1921,46 @@ MsForwardAddMacPolicyUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Add the given policy to the policy list and correlate with the NIC list. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PMSFORWARD_MAC_POLICY_LIST_ENTRY newPolicy; PMSFORWARD_NIC_LIST_ENTRY nic; - + newPolicy = MsForwardFindPolicyByMacAddressUnsafe(SwitchContext, MacPolicyBuffer->MacAddress); - + if (newPolicy == NULL) { newPolicy = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(MSFORWARD_MAC_POLICY_LIST_ENTRY), SxExtAllocationTag); - + if (newPolicy == NULL) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + NdisMoveMemory(&newPolicy->MacAddress, MacPolicyBuffer->MacAddress, sizeof(newPolicy->MacAddress)); - + NdisMoveMemory(&newPolicy->PropertyInstanceId, PropertyInstanceId, sizeof(NDIS_SWITCH_OBJECT_INSTANCE_ID)); - + InsertHeadList(&SwitchContext->PropertyList, &newPolicy->ListEntry); - + nic = MsForwardFindNicByMacAddressUnsafe(SwitchContext, MacPolicyBuffer->MacAddress); - + if (nic != NULL) { nic->AllowSends = TRUE; @@ -1970,7 +1970,7 @@ Routine Description: { status = NDIS_STATUS_DATA_NOT_ACCEPTED; } - + Cleanup: return status; } @@ -1982,30 +1982,30 @@ MsForwardDeleteMacPolicyUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Delete the given MAC policy, and coorelate with the NIC list. - + --*/ { PMSFORWARD_MAC_POLICY_LIST_ENTRY deletePolicy; PMSFORWARD_NIC_LIST_ENTRY nic; - + deletePolicy = MsForwardFindPolicyByPropertyInstanceIdUnsafe( SwitchContext, PropertyInstanceId); - + if (deletePolicy != NULL) { nic = MsForwardFindNicByMacAddressUnsafe(SwitchContext, deletePolicy->MacAddress); - + if (nic != NULL) { nic->AllowSends = FALSE; } - + RemoveEntryList(&deletePolicy->ListEntry); ExFreePoolWithTag(deletePolicy, SxExtAllocationTag); } @@ -2019,38 +2019,38 @@ MsForwardFindNicByPortIdUnsafe( _In_ NDIS_SWITCH_NIC_INDEX NicIndex ) /*++ - + Routine Description: Search for the NIC needed by port ID. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY curEntry = nicList->Flink; PMSFORWARD_NIC_LIST_ENTRY nic = NULL; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (nic->PortId == PortId && nic->NicIndex == NicIndex) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + nic = NULL; - + Cleanup: return nic; } @@ -2062,39 +2062,39 @@ MsForwardFindNicByMacAddressUnsafe( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Search for the NIC needed by MAC Address. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY curEntry = nicList->Flink; PMSFORWARD_NIC_LIST_ENTRY nic = NULL; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(MacAddress, nic->MacAddress, sizeof(nic->MacAddress))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + nic = NULL; - + Cleanup: return nic; } @@ -2106,39 +2106,39 @@ MsForwardFindPolicyByMacAddressUnsafe( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Search for the policy needed by MAC address. - + --*/ { PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY curEntry = propertyList->Flink; PMSFORWARD_MAC_POLICY_LIST_ENTRY policy = NULL; - + if (IsListEmpty(propertyList)) { goto Cleanup; } - + do { policy = CONTAINING_RECORD(curEntry, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(MacAddress, policy->MacAddress, sizeof(policy->MacAddress))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != propertyList); - + policy = NULL; - + Cleanup: return policy; } @@ -2150,44 +2150,44 @@ MsForwardFindPolicyByPropertyInstanceIdUnsafe( _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ) /*++ - + Routine Description: Search for the policy needed by PropertyInstanceId. - + --*/ { PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY curEntry = propertyList->Flink; PMSFORWARD_MAC_POLICY_LIST_ENTRY policy = NULL; - + if (IsListEmpty(propertyList)) { goto Cleanup; } - + do { policy = CONTAINING_RECORD(curEntry, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + if (RtlEqualMemory(PropertyInstanceId, &policy->PropertyInstanceId, sizeof(policy->PropertyInstanceId))) { goto Cleanup; } - + curEntry = curEntry->Flink; - + } while(curEntry != propertyList); - + policy = NULL; - + Cleanup: return policy; } - + NDIS_STATUS MsForwardDeleteNicUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -2195,56 +2195,56 @@ MsForwardDeleteNicUnsafe( _In_ NDIS_SWITCH_NIC_INDEX NicIndex ) /*++ - + Routine Description: Remove the NIC represented by the PortId and NicIndex from the NIC list and free its memory. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - + PMSFORWARD_NIC_LIST_ENTRY nicEntry = MsForwardFindNicByPortIdUnsafe(SwitchContext, PortId, NicIndex); - + if (nicEntry == NULL) { ASSERT(FALSE); goto Cleanup; } - + RemoveEntryList(&nicEntry->ListEntry); ExFreePoolWithTag(nicEntry, SxExtAllocationTag); -Cleanup: +Cleanup: return status; } - - + + VOID MsForwardClearNicListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Remove all NICs from the list and free all memory. - + --*/ { PMSFORWARD_NIC_LIST_ENTRY nic; PLIST_ENTRY nicList = &SwitchContext->NicList; PLIST_ENTRY headList = NULL; - + while (!IsListEmpty(nicList)) { headList = RemoveHeadList(nicList); - + nic = CONTAINING_RECORD(headList, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + ExFreePoolWithTag(nic, SxExtAllocationTag); } @@ -2257,24 +2257,24 @@ MsForwardClearPropertyListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Remove all properties from the list and free all memory. - + --*/ { PMSFORWARD_MAC_POLICY_LIST_ENTRY policy; PLIST_ENTRY propertyList = &SwitchContext->PropertyList; PLIST_ENTRY headList = NULL; - + while (!IsListEmpty(propertyList)) { headList = RemoveHeadList(propertyList); - + policy = CONTAINING_RECORD(headList, MSFORWARD_MAC_POLICY_LIST_ENTRY, ListEntry); - + ExFreePoolWithTag(policy, SxExtAllocationTag); } @@ -2288,17 +2288,17 @@ MsForwardNicHasPolicy( _In_reads_bytes_(6) PUCHAR MacAddress ) /*++ - + Routine Description: Returns TRUE if there is a correlated policy to the MAC address given. - + --*/ { return (MsForwardFindPolicyByMacAddressUnsafe(SwitchContext, MacAddress) != NULL); } - + VOID MsForwardMakeBroadcastArrayUnsafe( @@ -2308,11 +2308,11 @@ MsForwardMakeBroadcastArrayUnsafe( _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ) /*++ - + Routine Description: Creates the destination array of all connected NICs excluding the source given. - + --*/ { PLIST_ENTRY nicList = &SwitchContext->NicList; @@ -2320,17 +2320,17 @@ Routine Description: PMSFORWARD_NIC_LIST_ENTRY nic = NULL; UINT32 index = BroadcastArray->NumDestinations; PNDIS_SWITCH_PORT_DESTINATION destination; - + if (IsListEmpty(nicList)) { goto Cleanup; } - + do { nic = CONTAINING_RECORD(curEntry, MSFORWARD_NIC_LIST_ENTRY, ListEntry); - + if ((SourcePortId == nic->PortId && SourceNicIndex == nic->NicIndex) || !nic->Connected) @@ -2345,18 +2345,18 @@ Routine Description: continue; } } - + destination = NDIS_SWITCH_PORT_DESTINATION_AT_ARRAY_INDEX(BroadcastArray, index); NdisZeroMemory(destination, sizeof(NDIS_SWITCH_PORT_DESTINATION)); - + destination->PortId = nic->PortId; destination->NicIndex = nic->NicIndex; - + ++index; curEntry = curEntry->Flink; - + } while(curEntry != nicList); - + if (SourcePortId != SwitchContext->ExternalPortId && SwitchContext->ExternalNicConnected) { @@ -2364,7 +2364,7 @@ Routine Description: destination->PortId = SwitchContext->ExternalPortId; destination->NicIndex = SwitchContext->ExternalNicIndex; } - + Cleanup: return; } @@ -2376,10 +2376,10 @@ MsForwardInitSwitch( _In_ PMSFORWARD_CONTEXT SwitchContext ) /*++ - + Routine Description: Initializes the switch state. - + --*/ { NDIS_STATUS status = NDIS_STATUS_SUCCESS; @@ -2393,7 +2393,7 @@ Routine Description: PNDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS portPropertyParameters = NULL; PNDIS_SWITCH_PORT_PROPERTY_ENUM_INFO portPropertyInfo = NULL; PNDIS_SWITCH_PORT_PROPERTY_VLAN vlanProperty; - + ASSERT(!SwitchContext->IsActive); // @@ -2403,25 +2403,25 @@ Routine Description: NdisSwitchPropertyTypeCustom, (PNDIS_SWITCH_OBJECT_ID)&MacAddressPolicyGuid, &switchPropertyParameters); - + if (status != NDIS_STATUS_SUCCESS) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + switchPropertyInfo = NDIS_SWITCH_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO(switchPropertyParameters); - + for (arrIndex = 0; arrIndex < switchPropertyParameters->NumProperties; ++arrIndex) { // - // Should always get back v1 or later. It is safe to access the + // Should always get back v1 or later. It is safe to access the // v1 version of the structure if newer property is retrieved. // - ASSERT(switchPropertyInfo->PropertyVersion >= + ASSERT(switchPropertyInfo->PropertyVersion >= MAC_ADDRESS_POLICY_VERSION); customPropertyInfo = @@ -2433,35 +2433,35 @@ Routine Description: status = MsForwardAddMacPolicyUnsafe(SwitchContext, macAddressPolicy, &switchPropertyInfo->PropertyInstanceId); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + switchPropertyInfo = NDIS_SWITCH_PROPERTY_ENUM_INFO_GET_NEXT(switchPropertyInfo); } // // Now, get NIC list. - // + // status = SxLibGetNicArrayUnsafe(Switch, &nicArray); if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + for (arrIndex = 0; arrIndex < nicArray->NumElements; ++arrIndex) { curNic = NDIS_SWITCH_NIC_AT_ARRAY_INDEX(nicArray, arrIndex); - + status = Switch->NdisSwitchHandlers.ReferenceSwitchPort( Switch->NdisSwitchContext, curNic->PortId); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + // // Get VLAN Port property to ensure no VLAN set. // @@ -2470,26 +2470,26 @@ Routine Description: NdisSwitchPortPropertyTypeVlan, NULL, &portPropertyParameters); - + if (status != NDIS_STATUS_SUCCESS) { status = NDIS_STATUS_RESOURCES; goto Cleanup; } - + portPropertyInfo = NDIS_SWITCH_PORT_PROPERTY_ENUM_PARAMETERS_GET_FIRST_INFO(portPropertyParameters); // - // Should always get back v1 or later. It is safe to access the v1 + // Should always get back v1 or later. It is safe to access the v1 // version of the structure if newer property is retrieved. // - ASSERT(portPropertyInfo->PropertyVersion >= + ASSERT(portPropertyInfo->PropertyVersion >= NDIS_SWITCH_PORT_PROPERTY_VLAN_REVISION_1); vlanProperty = NDIS_SWITCH_PORT_PROPERTY_ENUM_INFO_GET_PROPERTY(portPropertyInfo); - + // // Real production code should support VLAN, // and not fail SxExtRestartSwitch. @@ -2500,13 +2500,13 @@ Routine Description: status = NDIS_STATUS_FAILURE; goto Cleanup; } - + status = Switch->NdisSwitchHandlers.DereferenceSwitchPort( Switch->NdisSwitchContext, curNic->PortId); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + // // If a VF is assigned to a NIC, then the traffic // flows through the VF and not the switch. This means @@ -2518,36 +2518,36 @@ Routine Description: Switch->NdisSwitchContext, curNic->PortId, curNic->NicIndex); - + ASSERT(status == NDIS_STATUS_SUCCESS); - + SxLibRevokeVfUnsafe(Switch, curNic->PortId); - + status = Switch->NdisSwitchHandlers.DereferenceSwitchNic( Switch->NdisSwitchContext, curNic->PortId, curNic->NicIndex); - + ASSERT(status == NDIS_STATUS_SUCCESS); } - + // // Now we've verified we can support the NIC, so // check if there's a property for it, and add it to // the NIC list. - // + // status = MsForwardAddNicUnsafe(SwitchContext, curNic->PermanentMacAddress, curNic->PortId, curNic->NicIndex, curNic->NicType, (curNic->NicState == NdisSwitchNicStateConnected)); - + if (status != NDIS_STATUS_SUCCESS) { goto Cleanup; } - + if (curNic->NicType == NdisSwitchNicTypeExternal && curNic->NicIndex != 0 && SwitchContext->ExternalPortId == 0) @@ -2562,7 +2562,7 @@ Routine Description: ++(SwitchContext->NumDestinations); } } - + SwitchContext->IsActive = TRUE; Cleanup: @@ -2570,17 +2570,17 @@ Cleanup: { ExFreePoolWithTag(switchPropertyParameters, SxExtAllocationTag); } - + if (portPropertyParameters != NULL) { ExFreePoolWithTag(portPropertyParameters, SxExtAllocationTag); } - + if (nicArray != NULL) { ExFreePoolWithTag(nicArray, SxExtAllocationTag); } - + return status; } diff --git a/network/ndis/extension/samples/forward/MsForwardExt.h b/network/ndis/extension/samples/forward/MsForwardExt.h index ed6ac629..5884fa7a 100644 --- a/network/ndis/extension/samples/forward/MsForwardExt.h +++ b/network/ndis/extension/samples/forward/MsForwardExt.h @@ -28,7 +28,7 @@ typedef struct _MSFORWARD_CONTEXT NDIS_SWITCH_PORT_ID ExternalPortId; NDIS_SWITCH_NIC_INDEX ExternalNicIndex; BOOLEAN ExternalNicConnected; - + // // This sample uses linked lists for the NICs and property // lookup. THIS IS NOT RECOMMENDED. @@ -36,7 +36,7 @@ typedef struct _MSFORWARD_CONTEXT LIST_ENTRY NicList; LIST_ENTRY PropertyList; PNDIS_RW_LOCK_EX DispatchLock; - + UINT32 NumDestinations; BOOLEAN IsInitialRestart; } MSFORWARD_CONTEXT, *PMSFORWARD_CONTEXT; @@ -119,7 +119,7 @@ extern const NDIS_SWITCH_OBJECT_ID MacAddressPolicyStatusGuid; // // Switch Property Macros -// +// #define MAC_ADDRESS_POLICY_VERSION 0x0100 #define MAC_ADDRESS_POLICY_SERIALIZATION_VERSION NDIS_SWITCH_OBJECT_SERIALIZATION_VERSION_1 @@ -142,26 +142,26 @@ MsForwardAddNicUnsafe( _In_ NDIS_SWITCH_NIC_TYPE NicType, _In_ BOOLEAN Connected ); - + NDIS_STATUS MsForwardDeleteNicUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ NDIS_SWITCH_PORT_ID PortId, _In_ NDIS_SWITCH_NIC_INDEX NicIndex ); - + VOID MsForwardClearNicListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ); - + PMSFORWARD_NIC_LIST_ENTRY MsForwardFindNicByPortIdUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ NDIS_SWITCH_PORT_ID PortId, _In_ NDIS_SWITCH_NIC_INDEX NicIndex ); - + PMSFORWARD_NIC_LIST_ENTRY MsForwardFindNicByMacAddressUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -174,7 +174,7 @@ MsForwardAddMacPolicyUnsafe( _In_ PMSFORWARD_MAC_ADDRESS_POLICY MacPolicyBuffer, _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ); - + VOID MsForwardDeleteMacPolicyUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -185,25 +185,25 @@ VOID MsForwardClearPropertyListUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext ); - + PMSFORWARD_MAC_POLICY_LIST_ENTRY MsForwardFindPolicyByMacAddressUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_reads_bytes_(6) PUCHAR MacAddress ); - + PMSFORWARD_MAC_POLICY_LIST_ENTRY MsForwardFindPolicyByPropertyInstanceIdUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_ PNDIS_SWITCH_OBJECT_INSTANCE_ID PropertyInstanceId ); - + BOOLEAN MsForwardNicHasPolicy( _In_ PMSFORWARD_CONTEXT SwitchContext, _In_reads_bytes_(6) PUCHAR MacAddress ); - + VOID MsForwardMakeBroadcastArrayUnsafe( _In_ PMSFORWARD_CONTEXT SwitchContext, @@ -211,7 +211,7 @@ MsForwardMakeBroadcastArrayUnsafe( _In_ NDIS_SWITCH_PORT_ID SourcePortId, _In_ NDIS_SWITCH_NIC_INDEX SourceNicIndex ); - + NDIS_STATUS MsForwardInitSwitch( _In_ PSX_SWITCH_OBJECT Switch, diff --git a/network/ndis/extension/samples/forward/msforwardext.inf b/network/ndis/extension/samples/forward/msforwardext.inf Binary files differindex 4af1b0fb..be4d37dc 100644 --- a/network/ndis/extension/samples/forward/msforwardext.inf +++ b/network/ndis/extension/samples/forward/msforwardext.inf diff --git a/network/ndis/extension/samples/forward/msforwardext.vcxproj b/network/ndis/extension/samples/forward/msforwardext.vcxproj index 7efe88a3..4c356ec9 100644 --- a/network/ndis/extension/samples/forward/msforwardext.vcxproj +++ b/network/ndis/extension/samples/forward/msforwardext.vcxproj @@ -1,6 +1,14 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -26,6 +34,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> @@ -34,6 +50,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> <OutDir>$(IntDir)</OutDir> @@ -41,16 +65,28 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>msforwardext</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetName>msforwardext</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>msforwardext</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetName>msforwardext</TargetName> + </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> @@ -65,6 +101,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </ResourceCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> @@ -79,6 +129,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions> + </ResourceCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> @@ -94,6 +158,21 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> + </Link> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> @@ -108,6 +187,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> + </Link> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="MsForwardExt.c"> <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -136,4 +229,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/network/ndis/extension/samples/forward/setRoute.ps1 b/network/ndis/extension/samples/forward/setRoute.ps1 index 71899087..bfb21f8d 100644 --- a/network/ndis/extension/samples/forward/setRoute.ps1 +++ b/network/ndis/extension/samples/forward/setRoute.ps1 @@ -10,7 +10,7 @@ function StringToMacAddress([String]$MacString) $macArray = @(); $byteOne = 0; $byteTwo = 0; - + for($i = 0; $i -lt 6; $i++) { $byteChars = $MacString.ToCharArray(2*$i, 2); @@ -44,7 +44,7 @@ foreach($vm in $vmArr) { $vmName = $vm.Name $adapters = Get-VmNetworkAdapter -VmName $vmName - + foreach($adapter in $adapters) { Write-Host "Setting Policy for $vmName..." diff --git a/network/ndis/extension/samples/passthrough/MsPassthroughExt.c b/network/ndis/extension/samples/passthrough/MsPassthroughExt.c index e99eeac5..1bf50f09 100644 --- a/network/ndis/extension/samples/passthrough/MsPassthroughExt.c +++ b/network/ndis/extension/samples/passthrough/MsPassthroughExt.c @@ -47,7 +47,7 @@ SxExtCreateSwitch( ) { UNREFERENCED_PARAMETER(Switch); - + *ExtensionContext = NULL; return NDIS_STATUS_SUCCESS; } @@ -62,7 +62,7 @@ SxExtDeleteSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -76,7 +76,7 @@ SxExtActivateSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -95,7 +95,7 @@ SxExtRestartSwitch( } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtPauseSwitch( PSX_SWITCH_OBJECT Switch, @@ -104,7 +104,7 @@ SxExtPauseSwitch( { UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); - + return; } @@ -120,7 +120,7 @@ SxExtCreatePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return NDIS_STATUS_SUCCESS; } @@ -136,7 +136,7 @@ SxExtUpdatePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } @@ -152,7 +152,7 @@ SxExtCreateNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return NDIS_STATUS_SUCCESS; } @@ -168,7 +168,7 @@ SxExtConnectNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -184,7 +184,7 @@ SxExtUpdateNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -200,7 +200,7 @@ SxExtDisconnectNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -216,7 +216,7 @@ SxExtDeleteNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Nic); - + return; } @@ -232,14 +232,14 @@ SxExtTeardownPort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } _Use_decl_annotations_ VOID -SxExtDeletePort( +SxExtDeletePort( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_PORT_PARAMETERS Port @@ -248,14 +248,14 @@ SxExtDeletePort( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(Port); - + return; } _Use_decl_annotations_ NDIS_STATUS -SxExtSaveNic( +SxExtSaveNic( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -266,7 +266,7 @@ SxExtSaveNic( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesWritten = 0; *BytesNeeded = 0; return NDIS_STATUS_SUCCESS; @@ -275,7 +275,7 @@ SxExtSaveNic( _Use_decl_annotations_ VOID -SxExtSaveNicComplete( +SxExtSaveNicComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState @@ -284,14 +284,14 @@ SxExtSaveNicComplete( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } -_Use_decl_annotations_ +_Use_decl_annotations_ NDIS_STATUS -SxExtNicRestore( +SxExtNicRestore( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState, @@ -301,7 +301,7 @@ SxExtNicRestore( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + *BytesRestored = 0; return NDIS_STATUS_SUCCESS; } @@ -309,7 +309,7 @@ SxExtNicRestore( _Use_decl_annotations_ VOID -SxExtNicRestoreComplete( +SxExtNicRestoreComplete( PSX_SWITCH_OBJECT Switch, NDIS_HANDLE ExtensionContext, PNDIS_SWITCH_NIC_SAVE_STATE SaveState @@ -318,7 +318,7 @@ SxExtNicRestoreComplete( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SaveState); - + return; } @@ -334,7 +334,7 @@ SxExtAddSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -350,7 +350,7 @@ SxExtUpdateSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -366,7 +366,7 @@ SxExtDeleteSwitchProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchProperty); - + return FALSE; } @@ -382,7 +382,7 @@ SxExtAddPortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -398,7 +398,7 @@ SxExtUpdatePortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return NDIS_STATUS_NOT_SUPPORTED; } @@ -414,7 +414,7 @@ SxExtDeletePortProperty( UNREFERENCED_PARAMETER(Switch); UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortProperty); - + return FALSE; } @@ -432,7 +432,7 @@ SxExtQuerySwitchFeatureStatus( UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(SwitchFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } @@ -450,10 +450,10 @@ SxExtQueryPortFeatureStatus( UNREFERENCED_PARAMETER(ExtensionContext); UNREFERENCED_PARAMETER(PortFeatureStatus); UNREFERENCED_PARAMETER(BytesNeeded); - + return FALSE; } - + _Use_decl_annotations_ NDIS_STATUS @@ -474,7 +474,7 @@ SxExtProcessNicRequest( UNREFERENCED_PARAMETER(SourceNicIndex); UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -500,10 +500,10 @@ SxExtProcessNicRequestComplete( UNREFERENCED_PARAMETER(DestinationPortId); UNREFERENCED_PARAMETER(DestinationNicIndex); UNREFERENCED_PARAMETER(Status); - + return NDIS_STATUS_SUCCESS; } - + _Use_decl_annotations_ NDIS_STATUS @@ -520,7 +520,7 @@ SxExtProcessNicStatus( UNREFERENCED_PARAMETER(StatusIndication); UNREFERENCED_PARAMETER(SourcePortId); UNREFERENCED_PARAMETER(SourceNicIndex); - + return NDIS_STATUS_SUCCESS; } @@ -535,7 +535,7 @@ SxExtStartNetBufferListsIngress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsIngress(Switch, NetBufferLists, SendFlags, @@ -543,7 +543,7 @@ SxExtStartNetBufferListsIngress( } -_Use_decl_annotations_ +_Use_decl_annotations_ VOID SxExtStartNetBufferListsEgress( PSX_SWITCH_OBJECT Switch, @@ -554,7 +554,7 @@ SxExtStartNetBufferListsEgress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibSendNetBufferListsEgress(Switch, NetBufferLists, NumberOfNetBufferLists, @@ -572,7 +572,7 @@ SxExtStartCompleteNetBufferListsEgress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsEgress(Switch, NetBufferLists, ReturnFlags); @@ -589,9 +589,9 @@ SxExtStartCompleteNetBufferListsIngress( ) { UNREFERENCED_PARAMETER(ExtensionContext); - + SxLibCompleteNetBufferListsIngress(Switch, NetBufferLists, SendCompleteFlags); } - + diff --git a/network/ndis/extension/samples/passthrough/mspassthroughext.inf b/network/ndis/extension/samples/passthrough/mspassthroughext.inf Binary files differindex 8339e7c8..71ecfbe8 100644 --- a/network/ndis/extension/samples/passthrough/mspassthroughext.inf +++ b/network/ndis/extension/samples/passthrough/mspassthroughext.inf diff --git a/network/ndis/extension/samples/passthrough/mspassthroughext.vcxproj b/network/ndis/extension/samples/passthrough/mspassthroughext.vcxproj index f18ca5fa..94751bcf 100644 --- a/network/ndis/extension/samples/passthrough/mspassthroughext.vcxproj +++ b/network/ndis/extension/samples/passthrough/mspassthroughext.vcxproj @@ -1,6 +1,14 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -26,6 +34,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> @@ -34,6 +50,14 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverType>WDM</DriverType> + <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> + <ConfigurationType>Driver</ConfigurationType> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> <OutDir>$(IntDir)</OutDir> @@ -41,16 +65,28 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> + </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>mspassthroughext</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <TargetName>mspassthroughext</TargetName> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>mspassthroughext</TargetName> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <TargetName>mspassthroughext</TargetName> + </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> @@ -65,6 +101,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </ResourceCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> @@ -79,6 +129,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <ClCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </ClCompile> + <Midl> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </Midl> + <ResourceCompile> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> + </ResourceCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> @@ -94,6 +158,21 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> + </Link> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> @@ -108,6 +187,20 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;.\..\..\base\$(IntDir)\sxbase.lib</AdditionalDependencies> + </Link> + <ClCompile> + <TreatWarningAsError>true</TreatWarningAsError> + <WarningLevel>Level4</WarningLevel> + <ExceptionHandling> + </ExceptionHandling> + </ClCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> + </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="MsPassthroughExt.c"> <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -136,4 +229,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/network/ndis/filter/filter.c b/network/ndis/filter/filter.c index 7145b887..2ccda62a 100644 --- a/network/ndis/filter/filter.c +++ b/network/ndis/filter/filter.c @@ -108,7 +108,7 @@ Return Value: // // TODO: Most handlers are optional, however, this sample includes them - // all for illustrative purposes. If you do not need a particular + // all for illustrative purposes. If you do not need a particular // handler, set it to NULL and NDIS will more efficiently pass the // operation through on your behalf. // @@ -250,7 +250,7 @@ Return Value: NDIS_STATUS_FAILURE: FilterAttach could not set up this instance of this filter and it has called NdisWriteErrorLogEntry with parameters specifying the reason for failure. -N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper +N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper layer can send Irps to the filter. --*/ @@ -275,7 +275,7 @@ N.B.: FILTER can use NdisRegisterDeviceEx to create a device, so the upper // Verify the media type is supported. This is a last resort; the // the filter should never have been bound to an unsupported miniport // to begin with. If this driver is marked as a Mandatory filter (which - // is the default for this sample; see the INF file), failing to attach + // is the default for this sample; see the INF file), failing to attach // here will leave the network adapter in an unusable state. // // Your setup/install code should not bind the filter to unsupported @@ -401,10 +401,10 @@ Return Value: NDIS_STATUS_SUCCESS if filter pauses successfully, NDIS_STATUS_PENDING if not. No other return value is allowed (pause must succeed, eventually). -N.B.: When the filter is in Pausing state, it can still process OID requests, +N.B.: When the filter is in Pausing state, it can still process OID requests, complete sending, and returning packets to NDIS, and also indicate status. - After this function completes, the filter must not attempt to send or - receive packets, but it may still process OID requests and status + After this function completes, the filter must not attempt to send or + receive packets, but it may still process OID requests and status indications. --*/ @@ -429,7 +429,7 @@ N.B.: When the filter is in Pausing state, it can still process OID requests, // // Do whatever work is required to bring the filter into the Paused state. // - // If you have diverted and queued any send or receive NBLs, return them + // If you have diverted and queued any send or receive NBLs, return them // now. // // If you send or receive original NBLs, stop doing that and wait for your @@ -498,7 +498,7 @@ Return Value: #if 0 // - // The code is here just to demonstrate how to call NDIS to write an + // The code is here just to demonstrate how to call NDIS to write an // event to the eventlog. // PWCHAR ErrorString = L"Ndislwf"; @@ -518,7 +518,7 @@ Return Value: // // This sample doesn't actually do anything with the configuration handle; // it is opened here for illustrative purposes. If you do not need to - // read configuration, you may omit the code manipulating the + // read configuration, you may omit the code manipulating the // ConfigurationHandle. // @@ -530,9 +530,9 @@ Return Value: NdisRestartAttributes = RestartParameters->RestartAttributes; // - // If NdisRestartAttributes is not NULL, then the filter can modify generic - // attributes and add new media specific info attributes at the end. - // Otherwise, if NdisRestartAttributes is NULL, the filter should not try to + // If NdisRestartAttributes is not NULL, then the filter can modify generic + // attributes and add new media specific info attributes at the end. + // Otherwise, if NdisRestartAttributes is NULL, the filter should not try to // modify/add attributes. // if (NdisRestartAttributes != NULL) @@ -777,7 +777,7 @@ NOTE: Called at <= DISPATCH_LEVEL (unlike a miniport's MiniportOidRequest) // // If your filter driver does not need to modify any OID requests, then // you may simply omit this routine entirely; NDIS will pass OID requests - // down on your behalf. This is more efficient than implementing a + // down on your behalf. This is more efficient than implementing a // routine that does nothing but clone all requests, as in the sample here. // @@ -864,8 +864,8 @@ Routine Description: If your filter driver does not intercept and hold onto any OID requests, then you do not need to implement this routine. You may simply omit it. Furthermore, if the filter only holds onto OID requests so it can pass - down a clone (the most common case) the filter does not need to implement - this routine; NDIS will then automatically request that the lower-level + down a clone (the most common case) the filter does not need to implement + this routine; NDIS will then automatically request that the lower-level filter/miniport cancel your cloned OID. Most filters do not need to implement this routine. @@ -1021,7 +1021,7 @@ Arguments: NOTE: called at <= DISPATCH_LEVEL - FILTER driver may call NdisFIndicateStatus to generate a status indication to + FILTER driver may call NdisFIndicateStatus to generate a status indication to all higher layer modules. --*/ @@ -1037,8 +1037,8 @@ NOTE: called at <= DISPATCH_LEVEL // // The filter may do processing on the status indication here, including // intercepting and dropping it entirely. However, the sample does nothing - // with status indications except pass them up to the higher layer. It is - // more efficient to omit the FilterStatus handler entirely if it does + // with status indications except pass them up to the higher layer. It is + // more efficient to omit the FilterStatus handler entirely if it does // nothing, but it is included in this sample for illustrative purposes. // @@ -1154,7 +1154,7 @@ NOTE: called at PASSIVE_LEVEL NDIS_STATUS Status = NDIS_STATUS_SUCCESS; // - // The filter may do processing on the event here, including intercepting + // The filter may do processing on the event here, including intercepting // and dropping it entirely. However, the sample does nothing with Net PNP // events, except pass them up to the next higher layer. It is more // efficient to omit the FilterNetPnPEvent handler entirely if it does @@ -1179,10 +1179,10 @@ Routine Description: Send complete handler - This routine is invoked whenever the lower layer is finished processing + This routine is invoked whenever the lower layer is finished processing sent NET_BUFFER_LISTs. If the filter does not need to be involved in the send path, you should remove this routine and the FilterSendNetBufferLists - routine. NDIS will pass along send packets on behalf of your filter more + routine. NDIS will pass along send packets on behalf of your filter more efficiently than the filter can. Arguments: @@ -1260,7 +1260,7 @@ Routine Description: This function is an optional function for filter drivers. If provided, NDIS will call this function to transmit a linked list of NetBuffers, described by a NetBufferList, over the network. If this handler is NULL, NDIS will skip calling - this filter when sending a NetBufferList and will call the next lower + this filter when sending a NetBufferList and will call the next lower driver in the stack. A filter that doesn't provide a FilerSendNetBufferList handler can not originate a send on its own. @@ -1324,7 +1324,7 @@ Arguments: } FILTER_RELEASE_LOCK(&pFilter->Lock, DispatchLevel); } - + // // If necessary, queue the NetBufferLists in a local structure for later // processing. However, do not queue them for "too long", or else the @@ -1332,7 +1332,7 @@ Arguments: // NBL for an unbounded amount of time, then allocate memory, perform a // deep copy, and complete the original NBL. // - + NdisFSendNetBufferLists(pFilter->FilterHandle, NetBufferLists, PortNumber, SendFlags); @@ -1365,8 +1365,8 @@ Routine Description: Arguments: FilterInstanceContext - our filter context area - NetBufferLists - a linked list of NetBufferLists that this - filter driver indicated in a previous call to + NetBufferLists - a linked list of NetBufferLists that this + filter driver indicated in a previous call to NdisFIndicateReceiveNetBufferLists ReturnFlags - flags specifying if the caller is at DISPATCH_LEVEL @@ -1383,7 +1383,7 @@ Arguments: // // If your filter injected any receive packets into the datapath to be - // received, you must identify their NBLs here and remove them from the + // received, you must identify their NBLs here and remove them from the // chain. Do not attempt to receive-return your NBLs down to the lower // layer. // @@ -1405,7 +1405,7 @@ Arguments: } } - + // Return the received NBLs. If you removed any NBLs from the chain, make // sure the chain isn't empty (i.e., NetBufferLists!=NULL). @@ -1449,7 +1449,7 @@ Routine Description: filter when processing a receive indication and will call the next higher driver in the stack. A filter that doesn't provide a FilterReceiveNetBufferLists handler cannot provide a - FilterReturnNetBufferLists handler and cannot a initiate an original receive + FilterReturnNetBufferLists handler and cannot a initiate an original receive indication on its own. Arguments: @@ -1460,7 +1460,7 @@ Arguments: ReceiveFlags - N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND. - This controls whether the receive indication is an synchronous or + This controls whether the receive indication is an synchronous or asynchronous function call. --*/ @@ -1509,7 +1509,7 @@ N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND // // if NDIS_TEST_RECEIVE_CANNOT_PEND(ReceiveFlags): // For each NBL that is NOT dropped, temporarily unlink it from - // the linked list, and indicate it up alone with + // the linked list, and indicate it up alone with // NdisFIndicateReceiveNetBufferLists and the // NDIS_RECEIVE_FLAGS_RESOURCES flag set. Then immediately // relink the NBL back into the chain. When all NBLs have been @@ -1520,8 +1520,8 @@ N.B.: It is important to check the ReceiveFlags in NDIS_TEST_RECEIVE_CANNOT_PEND // Return the first chain with NdisFReturnNetBufferLists, and // indicate up the rest with NdisFIndicateReceiveNetBufferLists. // - // Note: on the receive path for Ethernet packets, one NBL will have - // exactly one NB. So (assuming you are receiving on Ethernet, or are + // Note: on the receive path for Ethernet packets, one NBL will have + // exactly one NB. So (assuming you are receiving on Ethernet, or are // attached above Native WiFi) you do not need to worry about dropping // one NB, but trying to indicate up the remaining NBs on the same NBL. // In other words, if the first NB should be dropped, drop the whole NBL. @@ -1589,7 +1589,7 @@ Routine Description: This function cancels any NET_BUFFER_LISTs pended in the filter and then calls the NdisFCancelSendNetBufferLists to propagate the cancel operation. - If your driver does not queue any send NBLs, you may omit this routine. + If your driver does not queue any send NBLs, you may omit this routine. NDIS will propagate the cancelation on your behalf more efficiently. Arguments: diff --git a/network/ndis/filter/filter.sln b/network/ndis/filter/filter.sln index 6b8b743f..3983e71e 100644 --- a/network/ndis/filter/filter.sln +++ b/network/ndis/filter/filter.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ndislwf", "ndislwf.vcxproj" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|Win32.ActiveCfg = Debug|Win32 - {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|Win32.Build.0 = Debug|Win32 - {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Release|Win32.ActiveCfg = Release|Win32 - {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Release|Win32.Build.0 = Release|Win32 + {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|ARM64.Build.0 = Debug|ARM64 + {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Release|ARM64.ActiveCfg = Release|ARM64 + {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Release|ARM64.Build.0 = Release|ARM64 {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|x64.ActiveCfg = Debug|x64 {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Debug|x64.Build.0 = Debug|x64 {CD502925-8888-4A09-8AD0-04B80A73FBBD}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/ndis/filter/filteruser.h b/network/ndis/filter/filteruser.h index ac03e04b..ba09a860 100644 --- a/network/ndis/filter/filteruser.h +++ b/network/ndis/filter/filteruser.h @@ -1,5 +1,5 @@ // -// Copyright (C) Microsoft. All rights reserved. +// Copyright (C) Microsoft Corporation. All rights reserved. // #ifndef __FILTERUSER_H__ #define __FILTERUSER_H__ diff --git a/network/ndis/filter/flt_dbg.c b/network/ndis/filter/flt_dbg.c index 1d52071d..a65c4312 100644 --- a/network/ndis/filter/flt_dbg.c +++ b/network/ndis/filter/flt_dbg.c @@ -4,7 +4,7 @@ Copyright (c) 2001 Microsoft Corporation Module Name: - debug.c + flt_dbg.c Abstract: diff --git a/network/ndis/filter/flt_dbg.h b/network/ndis/filter/flt_dbg.h index f3513588..a7cb0da3 100644 --- a/network/ndis/filter/flt_dbg.h +++ b/network/ndis/filter/flt_dbg.h @@ -4,7 +4,7 @@ Copyright (c) 2001 Microsoft Corporation Module Name: - debug.h + flt_dbg.h Abstract: @@ -17,9 +17,6 @@ Notes: --*/ -// disable warnings - - #ifndef _FILTDEBUG__H #define _FILTDEBUG__H diff --git a/network/ndis/filter/ndislwf.vcxproj b/network/ndis/filter/ndislwf.vcxproj index 456ac131..494c7d18 100644 --- a/network/ndis/filter/ndislwf.vcxproj +++ b/network/ndis/filter/ndislwf.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{CD502925-8888-4A09-8AD0-04B80A73FBBD}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{F40772D8-6882-4C62-8849-D5651CC7751C}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ndislwf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>ndislwf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ndislwf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>ndislwf</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -116,7 +116,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDISLWF=1</PreprocessorDefinitions> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -145,7 +145,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDISLWF=1</PreprocessorDefinitions> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -174,7 +174,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDISLWF=1</PreprocessorDefinitions> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -216,9 +216,10 @@ <FileDigestAlgorithm>SHA256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <ClCompile> <ExceptionHandling> @@ -228,7 +229,7 @@ <FileDigestAlgorithm>SHA256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> @@ -240,7 +241,7 @@ <FileDigestAlgorithm>SHA256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> diff --git a/network/ndis/filter/netlwf.inf b/network/ndis/filter/netlwf.inf Binary files differindex e59b56fb..42a80912 100644 --- a/network/ndis/filter/netlwf.inf +++ b/network/ndis/filter/netlwf.inf diff --git a/network/ndis/mux/driver/60/miniport.c b/network/ndis/mux/driver/60/miniport.c index f30c4b62..627218c7 100644 --- a/network/ndis/mux/driver/60/miniport.c +++ b/network/ndis/mux/driver/60/miniport.c @@ -79,7 +79,7 @@ NDIS_OID VElanSupportedOids[] = OID_PNP_REMOVE_WAKE_UP_PATTERN, #if IEEE_VLAN_SUPPORT OID_GEN_VLAN_ID, -#endif +#endif OID_PNP_ENABLE_WAKE_UP }; @@ -121,8 +121,8 @@ Return Value: NET_IFINDEX HigherLayerIfIndex, LowerLayerIfIndex; NDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributesContent; const PNDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes = &MiniportAttributesContent; - - + + #if IEEE_VLAN_SUPPORT NDIS_STRING strVlanId = NDIS_STRING_CONST("VlanID"); @@ -136,9 +136,9 @@ Return Value: UNREFERENCED_PARAMETER(MiniportDriverContext); - + // - // Start off by retrieving our virtual miniport context (VELAN) and + // Start off by retrieving our virtual miniport context (VELAN) and // storing the Miniport handle in it. // @@ -179,20 +179,20 @@ Return Value: MiniportAttributesContent.RegistrationAttributes.CheckForHangTimeInSeconds = 0; MiniportAttributesContent.RegistrationAttributes.InterfaceType = 0; - - + + NDIS_DECLARE_MINIPORT_ADAPTER_CONTEXT(VELAN); Status = NdisMSetMiniportAttributes(MiniportAdapterHandle, MiniportAttributes); - + if (Status != NDIS_STATUS_SUCCESS) { break; } - + // // Access configuration parameters for this miniport. @@ -220,14 +220,14 @@ Return Value: ConfigurationHandle); // - // If there is a NetworkAddress override, use it + // If there is a NetworkAddress override, use it // - if (((Status == NDIS_STATUS_SUCCESS) + if (((Status == NDIS_STATUS_SUCCESS) && (i == ETH_LENGTH_OF_ADDRESS)) - && ((!ETH_IS_MULTICAST(NetworkAddress)) + && ((!ETH_IS_MULTICAST(NetworkAddress)) && (ETH_IS_LOCALLY_ADMINISTERED (NetworkAddress)))) { - + ETH_COPY_NETWORK_ADDRESS( pVElan->CurrentAddress, NetworkAddress); @@ -241,7 +241,7 @@ Return Value: // ignore error reading the network address // Status = NDIS_STATUS_SUCCESS; - + #if IEEE_VLAN_SUPPORT // // Read VLAN ID @@ -269,11 +269,11 @@ Return Value: else { - + pVElan->VlanId = VLANID_DEFAULT; Status = NDIS_STATUS_SUCCESS; } -#endif +#endif NdisCloseConfiguration(ConfigurationHandle); @@ -286,7 +286,7 @@ Return Value: MiniportAttributesContent.GeneralAttributes.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES; MiniportAttributesContent.GeneralAttributes.Header.Revision = NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1; - MiniportAttributesContent.GeneralAttributes.Header.Size = sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES); + MiniportAttributesContent.GeneralAttributes.Header.Size = sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES); MiniportAttributesContent.GeneralAttributes.MediaType = VELAN_MEDIA_TYPE; MiniportAttributesContent.GeneralAttributes.MtuSize = pVElan->pAdapt->BindParameters.MtuSize; @@ -294,10 +294,10 @@ Return Value: MiniportAttributesContent.GeneralAttributes.MaxRcvLinkSpeed = pVElan->pAdapt->BindParameters.MaxRcvLinkSpeed; MiniportAttributesContent.GeneralAttributes.XmitLinkSpeed = pVElan->pAdapt->BindParameters.XmitLinkSpeed; MiniportAttributesContent.GeneralAttributes.RcvLinkSpeed = pVElan->pAdapt->BindParameters.RcvLinkSpeed; - + MUX_ACQUIRE_ADAPT_READ_LOCK(pVElan->pAdapt, &LockState); - + // // Miniport below has indicated some status indication // @@ -305,21 +305,21 @@ Return Value: MiniportAttributesContent.GeneralAttributes.MediaDuplexState = pVElan->pAdapt->LastIndicatedLinkState.MediaDuplexState; MiniportAttributesContent.GeneralAttributes.XmitLinkSpeed = pVElan->pAdapt->LastIndicatedLinkState.XmitLinkSpeed; MiniportAttributesContent.GeneralAttributes.RcvLinkSpeed = pVElan->pAdapt->LastIndicatedLinkState.RcvLinkSpeed; - + pVElan->LastIndicatedStatus = NDIS_STATUS_LINK_STATE; pVElan->LastIndicatedLinkState = pVElan->pAdapt->LastIndicatedLinkState; - + MiniportAttributesContent.GeneralAttributes.LookaheadSize = pVElan->pAdapt->BindParameters.LookaheadSize; MiniportAttributesContent.GeneralAttributes.MaxMulticastListSize = pVElan->pAdapt->BindParameters.MaxMulticastListSize; MiniportAttributesContent.GeneralAttributes.MacAddressLength = pVElan->pAdapt->BindParameters.MacAddressLength; - + MiniportAttributesContent.GeneralAttributes.PhysicalMediumType = pVElan->pAdapt->BindParameters.PhysicalMediumType ; - MiniportAttributesContent.GeneralAttributes.AccessType = pVElan->pAdapt->BindParameters.AccessType ; - MiniportAttributesContent.GeneralAttributes.DirectionType = pVElan->pAdapt->BindParameters.DirectionType; - MiniportAttributesContent.GeneralAttributes.ConnectionType = pVElan->pAdapt->BindParameters.ConnectionType ; - MiniportAttributesContent.GeneralAttributes.IfType = pVElan->pAdapt->BindParameters.IfType ; + MiniportAttributesContent.GeneralAttributes.AccessType = pVElan->pAdapt->BindParameters.AccessType ; + MiniportAttributesContent.GeneralAttributes.DirectionType = pVElan->pAdapt->BindParameters.DirectionType; + MiniportAttributesContent.GeneralAttributes.ConnectionType = pVElan->pAdapt->BindParameters.ConnectionType ; + MiniportAttributesContent.GeneralAttributes.IfType = pVElan->pAdapt->BindParameters.IfType ; MiniportAttributesContent.GeneralAttributes.IfConnectorPresent = FALSE; // RFC 2665 TRUE if physical adapter if (pVElan->pAdapt->BindParameters.RcvScaleCapabilities) @@ -330,7 +330,7 @@ Return Value: { MiniportAttributesContent.GeneralAttributes.RecvScaleCapabilities = NULL; } - + MiniportAttributesContent.GeneralAttributes.MacOptions = NDIS_MAC_OPTION_NO_LOOPBACK; @@ -339,7 +339,7 @@ Return Value: NDIS_MAC_OPTION_8021Q_VLAN); #endif - + MiniportAttributesContent.GeneralAttributes.SupportedPacketFilters = pVElan->pAdapt->BindParameters.SupportedPacketFilters; MiniportAttributesContent.GeneralAttributes.SupportedStatistics = NDIS_STATISTICS_XMIT_OK_SUPPORTED | @@ -351,7 +351,7 @@ Return Value: NDIS_STATISTICS_TRANSMIT_QUEUE_LENGTH_SUPPORTED | NDIS_STATISTICS_GEN_STATISTICS_SUPPORTED; - + NdisMoveMemory(&MiniportAttributesContent.GeneralAttributes.CurrentMacAddress, &pVElan->CurrentAddress, ETH_LENGTH_OF_ADDRESS); @@ -369,7 +369,7 @@ Return Value: pVElan->MiniportInitPending = FALSE; } while (FALSE); - + // // If we had received an UnbindAdapter notification on the underlying // adapter, we would have blocked that thread waiting for the IM Init @@ -391,13 +391,13 @@ Return Value: // HigherLayerIfIndex = MiniportInitParameters->IfIndex; LowerLayerIfIndex = pVElan->pAdapt->BindParameters.BoundIfIndex; - + Status = NdisIfAddIfStackEntry(HigherLayerIfIndex, LowerLayerIfIndex); if (Status == NDIS_STATUS_SUCCESS) { - pVElan->IfIndex = HigherLayerIfIndex; + pVElan->IfIndex = HigherLayerIfIndex; } // @@ -407,7 +407,7 @@ Return Value: } else - { + { pVElan->MiniportAdapterHandle = NULL; } @@ -415,9 +415,9 @@ Return Value: { pVElan->MiniportInitPending = FALSE; } - + // TODO: check to see if we can set the init event in a failure case? - + NdisSetEvent(&pVElan->MiniportInitEvent); DBGPRINT(MUX_LOUD, ("<== MPInitialize: VELAN %p, Status %x\n", pVElan, Status)); @@ -445,7 +445,7 @@ Arguments: Return Value: - NDIS_STATUS_SUCCESS + NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED Return code from the MPForwardOidRequest below. @@ -472,14 +472,14 @@ Return Value: DBGPRINT(MUX_LOUD, ("==> MPQueryInformation: VElan %p, Request %p\n",pVElan, NdisRequest)); - + Oid = NdisRequest->DATA.QUERY_INFORMATION.Oid; InformationBuffer = NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer; InformationBufferLength = NdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength; BytesWritten = (ULONG*) &(NdisRequest->DATA.QUERY_INFORMATION.BytesWritten); BytesNeeded = (ULONG*) &(NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded); - - + + // Initialize the result *BytesWritten = 0; *BytesNeeded = 0; @@ -512,16 +512,16 @@ Return Value: break; case OID_GEN_CURRENT_LOOKAHEAD: - case OID_GEN_MAXIMUM_LOOKAHEAD: + case OID_GEN_MAXIMUM_LOOKAHEAD: ulInfo = pVElan->LookAhead; pInfo = (PVOID) &ulInfo; - break; - + break; + case OID_GEN_MAXIMUM_FRAME_SIZE: ulInfo = ETH_MAX_PACKET_SIZE - ETH_HEADER_SIZE; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE; - + #endif pInfo = (PVOID) &ulInfo; break; @@ -532,17 +532,17 @@ Return Value: ulInfo = (ULONG) ETH_MAX_PACKET_SIZE; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE; -#endif +#endif pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_MAC_OPTIONS: - ulInfo = NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | + ulInfo = NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | NDIS_MAC_OPTION_TRANSFERS_NOT_PEND | NDIS_MAC_OPTION_NO_LOOPBACK; #if IEEE_VLAN_SUPPORT ulInfo |= (NDIS_MAC_OPTION_8021P_PRIORITY | - NDIS_MAC_OPTION_8021Q_VLAN); + NDIS_MAC_OPTION_8021Q_VLAN); #endif pInfo = (PVOID) &ulInfo; break; @@ -555,15 +555,15 @@ Return Value: ulInfo = ETH_MAX_PACKET_SIZE * pVElan->MaxBusySends; #if IEEE_VLAN_SUPPORT ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusySends; -#endif +#endif pInfo = (PVOID) &ulInfo; break; case OID_GEN_RECEIVE_BUFFER_SPACE: ulInfo = ETH_MAX_PACKET_SIZE * pVElan->MaxBusyRecvs; #if IEEE_VLAN_SUPPORT - ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusyRecvs; -#endif + ulInfo -= VLAN_TAG_HEADER_SIZE * pVElan->MaxBusyRecvs; +#endif pInfo = (PVOID) &ulInfo; break; @@ -576,7 +576,7 @@ Return Value: pInfo = VendorDesc; ulInfoLen = sizeof(VendorDesc); break; - + case OID_GEN_VENDOR_DRIVER_VERSION: ulInfo = VELAN_VENDOR_ID; pInfo = (PVOID) &ulInfo; @@ -644,7 +644,7 @@ Return Value: NeededLength = sizeof(ulInfo64); break; - + case OID_GEN_RCV_OK: ulInfo64 = pVElan->GoodReceives; pInfo = &ulInfo64; @@ -659,9 +659,9 @@ Return Value: } NeededLength = sizeof(ulInfo64); - + break; - + case OID_GEN_XMIT_ERROR: ulInfo = pVElan->TxAbortExcessCollisions + pVElan->TxDmaUnderrun + @@ -670,7 +670,7 @@ Return Value: pVElan->TransmitFailuresOther; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_ERROR: ulInfo = pVElan->RcvCrcErrors + pVElan->RcvAlignmentErrors + @@ -679,26 +679,26 @@ Return Value: #if IEEE_VLAN_SUPPORT ulInfo += (pVElan->RcvVlanIdErrors + - pVElan->RcvFormatErrors); + pVElan->RcvFormatErrors); #endif pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_NO_BUFFER: ulInfo = pVElan->RcvResourceErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_RCV_CRC_ERROR: ulInfo = pVElan->RcvCrcErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_TRANSMIT_QUEUE_LENGTH: ulInfo = pVElan->RegNumTcb; pInfo = (PVOID) &ulInfo; break; - + case OID_GEN_STATISTICS: ulInfoLen = sizeof (NDIS_STATISTICS_INFO); NdisZeroMemory(&StatisticsInfo, sizeof(NDIS_STATISTICS_INFO)); @@ -709,7 +709,7 @@ Return Value: StatisticsInfo.SupportedStatistics = NDIS_STATISTICS_FLAGS_VALID_RCV_DISCARDS | NDIS_STATISTICS_FLAGS_VALID_RCV_ERROR | NDIS_STATISTICS_FLAGS_VALID_XMIT_ERROR; - + StatisticsInfo.ifInDiscards = (ULONG64)pVElan->RcvCrcErrors + (ULONG64)pVElan->RcvAlignmentErrors + @@ -735,53 +735,53 @@ Return Value: ulInfo = pVElan->RcvAlignmentErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_ONE_COLLISION: ulInfo = pVElan->OneRetry; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_MORE_COLLISIONS: ulInfo = pVElan->MoreThanOneRetry; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_DEFERRED: ulInfo = pVElan->TxOKButDeferred; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_MAX_COLLISIONS: ulInfo = pVElan->TxAbortExcessCollisions; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_RCV_OVERRUN: ulInfo = pVElan->RcvDmaOverrunErrors; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_UNDERRUN: ulInfo = pVElan->TxDmaUnderrun; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_HEARTBEAT_FAILURE: ulInfo = pVElan->TxLostCRS; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_TIMES_CRS_LOST: ulInfo = pVElan->TxLostCRS; pInfo = (PVOID) &ulInfo; break; - + case OID_802_3_XMIT_LATE_COLLISIONS: ulInfo = pVElan->TxLateCollisions; pInfo = (PVOID) &ulInfo; break; - -#if IEEE_VLAN_SUPPORT + +#if IEEE_VLAN_SUPPORT case OID_GEN_VLAN_ID: ulInfo = pVElan->VlanId; pInfo = (PVOID) &ulInfo; @@ -808,27 +808,27 @@ Return Value: if(ulInfoLen) { NdisMoveMemory(InformationBuffer, pInfo, ulInfoLen); - + if (NeededLength > ulInfoLen) { *BytesNeeded = NeededLength; } } - + } else { // too short *BytesNeeded = (NeededLength > ulInfoLen ? NeededLength : ulInfoLen); - + Status = NDIS_STATUS_BUFFER_TOO_SHORT; } } } else { - + // // Send this request to the binding below. @@ -843,10 +843,10 @@ Return Value: pVElan, Oid, Status)); } - + DBGPRINT(MUX_LOUD, ("<== MPQueryInformation: VElan %p, Request %p returning %08lx\n",pVElan, NdisRequest, Status)); - + return(Status); } @@ -887,13 +887,13 @@ Return Value: ULONG InformationBufferLength; PULONG BytesRead; PULONG BytesNeeded; - + // Should we forward the request to the miniport below? BOOLEAN bForwardRequest = FALSE; NDIS_STATUS_INDICATION StatusIndication; DBGPRINT(MUX_LOUD, ("==> MPSetInformation: VElan %p, Request %p\n", pVElan, NdisRequest)); - + NdisZeroMemory(&StatusIndication, sizeof(NDIS_STATUS_INDICATION)); Oid = NdisRequest->DATA.SET_INFORMATION.Oid; InformationBuffer = NdisRequest->DATA.SET_INFORMATION.InformationBuffer; @@ -925,48 +925,48 @@ Return Value: Status = NDIS_STATUS_INVALID_LENGTH; break; } - + NewDeviceState = (*(PNDIS_DEVICE_POWER_STATE)InformationBuffer); - + // // Check if the VELAN adapter goes from lower power state to D0 - // - if ((MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) + // + if ((MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) && (!MUX_IS_LOW_POWER_STATE(NewDeviceState))) { // // Indicate the media status is necessary - // + // if (pVElan->LastIndicatedStatus != pVElan->LatestUnIndicateStatus) { - + StatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; StatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; StatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + StatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; StatusIndication.StatusCode = pVElan->LatestUnIndicateStatus; if (pVElan->LatestUnIndicateStatus == NDIS_STATUS_LINK_STATE) { StatusIndication.StatusBuffer = &pVElan->LatestUnIndicateLinkState; StatusIndication.StatusBufferSize = sizeof(NDIS_LINK_STATE); - + } else { StatusIndication.StatusBuffer = NULL; StatusIndication.StatusBufferSize = 0; } - + NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &StatusIndication); - + pVElan->LastIndicatedStatus = pVElan->LatestUnIndicateStatus; if (pVElan->LatestUnIndicateStatus == NDIS_STATUS_LINK_STATE) { pVElan->LastIndicatedLinkState = pVElan->LatestUnIndicateLinkState; } - + } else { @@ -976,33 +976,33 @@ Return Value: &pVElan->LastIndicatedLinkState, sizeof(NDIS_LINK_STATE))) { - + StatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; StatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; StatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + StatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; StatusIndication.StatusCode = pVElan->LatestUnIndicateStatus; StatusIndication.StatusBuffer = &pVElan->LatestUnIndicateLinkState; StatusIndication.StatusBufferSize = sizeof(NDIS_LINK_STATE); - + NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &StatusIndication); pVElan->LastIndicatedStatus = pVElan->LatestUnIndicateStatus; pVElan->LastIndicatedLinkState = pVElan->LatestUnIndicateLinkState; } } - } + } } // // Check if the VELAN adapter goes from D0 to lower power state - // - if ((!MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) + // + if ((!MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) && (MUX_IS_LOW_POWER_STATE(NewDeviceState))) { // - // Initialize LastUnIndicateStatus - // + // Initialize LastUnIndicateStatus + // pVElan->LatestUnIndicateStatus = pVElan->LastIndicatedStatus; if (pVElan->LastIndicatedStatus == NDIS_STATUS_LINK_STATE) @@ -1010,7 +1010,7 @@ Return Value: pVElan->LatestUnIndicateLinkState = pVElan->LastIndicatedLinkState; } } - + NdisMoveMemory(&pVElan->MPDevicePowerState, InformationBuffer, *BytesNeeded); @@ -1062,17 +1062,17 @@ Return Value: pVElan->RestoreLookaheadSize = TRUE; *(UNALIGNED PULONG)InformationBuffer += VLAN_TAG_HEADER_SIZE; } -#endif +#endif bForwardRequest = TRUE; break; - + #if IEEE_VLAN_SUPPORT case OID_GEN_VLAN_ID: if (InformationBufferLength == sizeof(ULONG)) { NdisMoveMemory((&pVElan->VlanId), InformationBuffer, sizeof(ULONG)); - } + } else { *BytesNeeded = sizeof(ULONG); @@ -1081,13 +1081,13 @@ Return Value: break; #endif - + default: Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + if (bForwardRequest == FALSE) { if (Status == NDIS_STATUS_SUCCESS) @@ -1104,7 +1104,7 @@ Return Value: } DBGPRINT(MUX_LOUD, ("<== MPSetInformation: VElan %p, Request %p returning %08lx\n",pVElan, NdisRequest, Status)); - + return(Status); } @@ -1127,7 +1127,7 @@ Return Value: NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED - + --*/ { @@ -1140,7 +1140,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; UNREFERENCED_PARAMETER(pVElan); - + DBGPRINT(MUX_LOUD, ("==> MPMethodRequest: VElan %p, Request %p\n", pVElan, NdisRequest)); @@ -1250,7 +1250,7 @@ Routine Description: Arguments: MiniportAdapterContext Pointer to the pVElan - HaltAction The reason adapter is being halted + HaltAction The reason adapter is being halted Return Value: @@ -1262,7 +1262,7 @@ Return Value: NET_IFINDEX LowerLayerIfIndex; UNREFERENCED_PARAMETER(HaltAction); - + DBGPRINT(MUX_LOUD, ("==> MPHalt: VELAN %p\n", pVElan)); @@ -1316,12 +1316,12 @@ Return Value: if (pVElan->IfIndex != 0) { LowerLayerIfIndex = pVElan->pAdapt->BindParameters.BoundIfIndex; - + NdisIfDeleteIfStackEntry(pVElan->IfIndex, LowerLayerIfIndex); pVElan->IfIndex = 0; } - + // // Unlink the VELAN from its parent ADAPT structure. This will @@ -1329,7 +1329,7 @@ Return Value: // pVElan->MiniportAdapterHandle = NULL; PtUnlinkVElanFromAdapter(pVElan); - + DBGPRINT(MUX_LOUD, ("<== MPHalt: pVElan %p\n", pVElan)); } @@ -1350,7 +1350,7 @@ Routine Description: Arguments: pVElan Pointer to a VElan Adapter - Request Pointer to an NDIS request to be forwarded to the below adapter. + Request Pointer to an NDIS request to be forwarded to the below adapter. Return Value: @@ -1363,7 +1363,7 @@ Return Value: PMUX_NDIS_REQUEST pMuxNdisRequest = &pVElan->Request; PADAPT pAdapt = pVElan->pAdapt; - + DBGPRINT(MUX_LOUD, ("==> MPForwardOidRequest: VELAN %p, Request %p\n", pVElan, Request)); @@ -1373,7 +1373,7 @@ Return Value: // // If the miniport below is going away, fail the request - // + // NdisAcquireSpinLock(&pVElan->Lock); if (pVElan->DeInitializing == TRUE) { @@ -1382,7 +1382,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } - NdisReleaseSpinLock(&pVElan->Lock); + NdisReleaseSpinLock(&pVElan->Lock); // // If the virtual miniport edge is at a low power @@ -1394,14 +1394,14 @@ Return Value: Status = NDIS_STATUS_ADAPTER_NOT_READY; break; } - + NdisAcquireSpinLock(&pVElan->Lock); pMuxNdisRequest->Cancelled = FALSE; pMuxNdisRequest->OrigRequest = Request; pMuxNdisRequest->pCallback = PtCompleteForwardedRequest; pMuxNdisRequest->Request.RequestType = Request->RequestType; pMuxNdisRequest->Refcount = 1; - NdisReleaseSpinLock(&pVElan->Lock); + NdisReleaseSpinLock(&pVElan->Lock); pMuxNdisRequest->Request.Header.Type = NDIS_OBJECT_TYPE_OID_REQUEST; pMuxNdisRequest->Request.Header.Revision = NDIS_OID_REQUEST_REVISION_1; @@ -1412,17 +1412,17 @@ Return Value: case NdisRequestQueryInformation: case NdisRequestQueryStatistics: pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.Oid = Request->DATA.QUERY_INFORMATION.Oid; - pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = + pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer = Request->DATA.QUERY_INFORMATION.InformationBuffer; - pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = + pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = Request->DATA.QUERY_INFORMATION.InformationBufferLength; break; case NdisRequestSetInformation: pMuxNdisRequest->Request.DATA.SET_INFORMATION.Oid = Request->DATA.SET_INFORMATION.Oid; - pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBuffer = + pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBuffer = Request->DATA.SET_INFORMATION.InformationBuffer; - pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBufferLength = + pMuxNdisRequest->Request.DATA.SET_INFORMATION.InformationBufferLength = Request->DATA.SET_INFORMATION.InformationBufferLength; break; @@ -1444,7 +1444,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } - + // If the lower binding has been notified of a low // power state, queue this request; it will be picked // up again when the lower binding returns to D0. @@ -1454,7 +1454,7 @@ Return Value: DBGPRINT(MUX_INFO, ("ForwardRequest: VELAN %p, Adapt %p power" " state is %d, queueing OID %x\n", pVElan, pVElan->pAdapt, - pVElan->pAdapt->PtDevicePowerState, + pVElan->pAdapt->PtDevicePowerState, Request->DATA.QUERY_INFORMATION.Oid)); pVElan->QueuedRequest = TRUE; @@ -1471,19 +1471,19 @@ Return Value: break; } NdisReleaseSpinLock(&pVElan->Lock); - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest(pVElan->BindingHandle, &pMuxNdisRequest->Request); } @@ -1508,7 +1508,7 @@ Return Value: *(UNALIGNED PULONG)(Request->DATA.SET_INFORMATION.InformationBuffer) -= VLAN_TAG_HEADER_SIZE; } #endif - + return (Status); } @@ -1520,8 +1520,8 @@ MPSetPacketFilter( /*++ Routine Description: - This routine will set up the VELAN so that it accepts packets - that match the specified packet filter. The only filter bits + This routine will set up the VELAN so that it accepts packets + that match the specified packet filter. The only filter bits that can truly be toggled are for broadcast and promiscuous. The MUX driver always sets the lower binding to promiscuous @@ -1529,7 +1529,7 @@ Routine Description: receives too soon. That is, we set the packet filter on the lower binding to a non-zero value iff at least one of the VELANs has a non-zero filter value. - + NOTE: setting the lower binding to promiscuous mode can impact CPU utilization. The only reason we set the lower binding to promiscuous mode in this sample is that we need to be able @@ -1538,18 +1538,18 @@ Routine Description: are set to be equal to that of the adapter below, it is sufficient to set the lower packet filter to the bitwise OR'ed value of packet filter settings on all VELANs. - + Arguments: pVElan - pointer to VELAN - PacketFilter - the new packet filter - + PacketFilter - the new packet filter + Return Value: NDIS_STATUS_SUCCESS NDIS_STATUS_NOT_SUPPORTED - + --*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1561,7 +1561,7 @@ Return Value: LOCK_STATE LockState; DBGPRINT(MUX_LOUD, ("==> MPSetPacketFilter VELAN %p, Filter %x\n", pVElan, PacketFilter)); - + do { // @@ -1572,7 +1572,7 @@ Return Value: Status = NDIS_STATUS_NOT_SUPPORTED; break; } - + AdapterFilter = 0; pAdapt = pVElan->pAdapt; @@ -1622,7 +1622,7 @@ Return Value: bSendUpdate = TRUE; pAdapt->PacketFilter = MUX_ADAPTER_PACKET_FILTER; } - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); if (bSendUpdate) @@ -1640,7 +1640,7 @@ Return Value: while (FALSE); DBGPRINT(MUX_LOUD, ("<== MPSetPacketFilter VELAN %p, Status %x\n", pVElan, Status)); - + return(Status); } @@ -1718,19 +1718,19 @@ Return Value: NdisZeroMemory(pVElan->McastAddrs, VELAN_MAX_MCAST_LIST * sizeof(MUX_MAC_ADDRESS)); - + NdisMoveMemory(&pVElan->McastAddrs[0], InformationBuffer, InformationBufferLength); - + pVElan->McastAddrCount = InformationBufferLength / sizeof(MUX_MAC_ADDRESS); - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); } while (FALSE); DBGPRINT(MUX_LOUD, ("<== MPSetMulticastList VELAN %p, Status %8x\n", pVElan, Status)); - + return (Status); } @@ -1746,7 +1746,7 @@ Routine Description: Careful! Uses static storage for string. Used to simplify DbgPrints of MAC addresses. - + Arguments: IN Pointer to MAC address array @@ -1755,23 +1755,23 @@ Return Value: A string format of the given mac address ---*/ +--*/ { static UCHAR String[20]; static PCHAR HexChars = "0123456789abcdef"; PUCHAR EthAddr = (PUCHAR) In; UINT i; PUCHAR s; - + for (i = 0, s = String; i < 6; i++, EthAddr++) { -#pragma prefast(suppress: __WARNING_POTENTIAL_BUFFER_OVERFLOW, "s is bounded by check above"); +#pragma prefast(suppress: __WARNING_POTENTIAL_BUFFER_OVERFLOW, "s is bounded by check above"); *s++ = HexChars[(*EthAddr) >> 4]; *s++ = HexChars[(*EthAddr) & 0xf]; } *s = '\0'; - - return String; + + return String; } @@ -1788,7 +1788,7 @@ Routine Description: a MAC address for the VELAN. Other implementations are possible, including using the MAC address of the underlying adapter as the MAC address of the VELAN. - + Arguments: pVElan - Pointer to velan structure @@ -1802,7 +1802,7 @@ Return Value: ETH_COPY_NETWORK_ADDRESS( pVElan->CurrentAddress, pVElan->PermanentAddress); - + DBGPRINT(MUX_LOUD, ("%d CurrentAddress %s\n", pVElan->VElanNumber, MacAddrToString(&pVElan->CurrentAddress))); DBGPRINT(MUX_LOUD, ("%d PermanentAddress %s\n", @@ -1838,15 +1838,15 @@ Return Value: { // TBD - add code/comments about processing this. // - + DBGPRINT(MUX_LOUD, ("==> MPDevicePnPEvent: AdapterContext %08lp, DevicePnPEvent %x\n",MiniportAdapterContext, NetDevicePnPEvent->DevicePnPEvent)); UNREFERENCED_PARAMETER(MiniportAdapterContext); UNREFERENCED_PARAMETER(NetDevicePnPEvent); - + DBGPRINT(MUX_LOUD, ("<== MPDevicePnPEvent: AdapterContext %08lp, DevicePnPEvent %x\n",MiniportAdapterContext, NetDevicePnPEvent->DevicePnPEvent)); - + return; } @@ -1882,7 +1882,7 @@ Return Value: UNREFERENCED_PARAMETER(ShutdownAction); DBGPRINT(MUX_LOUD,("<== MPAdapterShutdown: VElan %p, ShutdwonAction %x\n", pVElan, ShutdownAction)); - + return; } @@ -1897,7 +1897,7 @@ Routine Description: This handler is used to unload the miniport Arguments: - DriverObject Pointer to the system's driver object structure + DriverObject Pointer to the system's driver object structure for this driver. Return Value: @@ -1906,11 +1906,11 @@ Return Value: --*/ { - + #if !DBG UNREFERENCED_PARAMETER(DriverObject); #endif - + DBGPRINT(MUX_LOUD, ("==> MPUnload: DriverObj %p\n", DriverObject)); if (ProtHandle != NULL) { @@ -1919,8 +1919,8 @@ Return Value: NdisMDeregisterMiniportDriver(DriverHandle); NdisFreeSpinLock(&GlobalLock); - - DBGPRINT(MUX_LOUD, ("<== MPUnload: DriverObj %p\n", DriverObject)); + + DBGPRINT(MUX_LOUD, ("<== MPUnload: DriverObj %p\n", DriverObject)); } NDIS_STATUS @@ -1947,7 +1947,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; DBGPRINT(MUX_LOUD, ("==> MPPause: VElan %p\n", pVElan)); - + UNREFERENCED_PARAMETER(MiniportPauseParameters); DBGPRINT(MUX_LOUD,("==>MPPause Adapter %08lp\n",MiniportAdapterContext)); @@ -1960,7 +1960,7 @@ Return Value: NdisReleaseSpinLock(&pVElan->PauseLock); - + DBGPRINT(MUX_LOUD,("<== MPPause,VElan %p, Status %8x\n", pVElan, Status)); @@ -1993,41 +1993,41 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PNDIS_RESTART_ATTRIBUTES NdisRestartAttributes; PNDIS_RESTART_GENERAL_ATTRIBUTES NdisGeneralAttributes; - + UNREFERENCED_PARAMETER(MiniportRestartParameters); DBGPRINT(MUX_LOUD,("==> MPRestart Adapter %p\n",MiniportAdapterContext)); - + // - // Here the driver can change its restart attributes + // Here the driver can change its restart attributes // NdisRestartAttributes = MiniportRestartParameters->RestartAttributes; // // If NdisRestartAttributes is not NULL, then miniport can modify generic attributes and add - // new media specific info attributes at the end. Otherwise, NDIS restarts the miniport because + // new media specific info attributes at the end. Otherwise, NDIS restarts the miniport because // of other reason, miniport should not try to modify/add attributes // if (NdisRestartAttributes != NULL) { ASSERT(NdisRestartAttributes->Oid == OID_GEN_MINIPORT_RESTART_ATTRIBUTES); - + NdisGeneralAttributes = (PNDIS_RESTART_GENERAL_ATTRIBUTES)NdisRestartAttributes->Data; UNREFERENCED_PARAMETER(NdisGeneralAttributes); - + // // Check to see if we need to change any attributes, for example, the driver can change the current // MAC address here. Or the driver can add media specific info attributes. // } - + NdisAcquireSpinLock(&pVElan->PauseLock); pVElan->Paused = FALSE; NdisReleaseSpinLock(&pVElan->PauseLock); - + DBGPRINT(MUX_LOUD,("<== MPRestart: Adapter %p, Status %8x\n", MiniportAdapterContext, Status)); @@ -2066,7 +2066,7 @@ Return Value: PIM_NBL_ENTRY SendContext; ULONG SendCompleteFlags = 0; BOOLEAN DispatchLevel = FALSE; - + DBGPRINT(MUX_VERY_LOUD,("==> MPSendNetBufferLists: MiniportAdapterContext %p, NetBufferLists %p\n",MiniportAdapterContext,NetBufferLists)); DispatchLevel = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags); @@ -2078,19 +2078,19 @@ Return Value: NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList) = NULL; MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + if (pAdapt->BindingState != MuxAdapterBindingRunning) { Status = NDIS_STATUS_REQUEST_ABORTED; MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + break; } - + pAdapt->OutstandingSends ++; - + MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + do { Status = NdisAllocateNetBufferListContext(CurrentNetBufferList, @@ -2102,7 +2102,7 @@ Return Value: { break; } - + SendContext = (PIM_NBL_ENTRY)NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); NdisZeroMemory(SendContext, sizeof(IM_NBL_ENTRY)); SendContext->PreviousSourceHandle = CurrentNetBufferList->SourceHandle; @@ -2136,20 +2136,20 @@ Return Value: CurrentNetBufferList, PortNumber, SendFlags); - + } while(FALSE); if (Status != NDIS_STATUS_SUCCESS) { MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); pAdapt->OutstandingSends --; - + if ((pAdapt->OutstandingSends == 0) && (pAdapt->PauseEvent != NULL)) { NdisSetEvent(pAdapt->PauseEvent); pAdapt->PauseEvent = NULL; } - + MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); // // Handle failure case @@ -2192,7 +2192,7 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("<== MPSendNetBufferLists, MiniportAdapterContext %p, NetBufferLists %p\n",MiniportAdapterContext,NetBufferLists)); } -VOID +VOID MPReturnNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2218,10 +2218,10 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; PNET_BUFFER_LIST CurrentNetBufferList = NULL; ULONG NumberOfNetBufferLists = 0; -#ifdef IEEE_VLAN_SUPPORT +#ifdef IEEE_VLAN_SUPPORT NDIS_STATUS Status; #endif - + DBGPRINT(MUX_VERY_LOUD,("==> MPReturnNetBufferLists: MiniportAdapterContext %p, NetBufferList %p\n",MiniportAdapterContext,NetBufferLists)); CurrentNetBufferList = NetBufferLists; @@ -2242,12 +2242,12 @@ Return Value: // Free the context that was allocated in PtReceiveNBL // NdisFreeNetBufferListContext(CurrentNetBufferList, - sizeof(RECV_NBL_ENTRY)); -#endif + sizeof(RECV_NBL_ENTRY)); +#endif CurrentNetBufferList = NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList); } - + NdisReturnNetBufferLists(pVElan->BindingHandle, NetBufferLists, ReturnFlags); @@ -2256,9 +2256,9 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("<== MPReturnNetBufferLists: MiniportAdapterContext %p, NetBufferList %p\n",MiniportAdapterContext,NetBufferLists)); } - -VOID + +VOID MPCancelSendNetBufferLists( IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId @@ -2289,13 +2289,13 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; DBGPRINT(MUX_LOUD,("==> MPCancelSendNetBufferLists: VElan %p, CancelId %p\n", pVElan, CancelId)); - + NdisCancelSendNetBufferLists(pVElan->pAdapt->BindingHandle,CancelId); - + DBGPRINT(MUX_LOUD,("<== MPCancelSendNetBufferLists: VElan %p, CancelId %p\n", pVElan, CancelId)); } -VOID +VOID MPCancelOidRequest( IN NDIS_HANDLE MiniportAdapterContext, IN PVOID RequestId @@ -2304,9 +2304,9 @@ MPCancelOidRequest( Routine Description: - The miniport entry point to hanadle cancellation of a request. This function + The miniport entry point to hanadle cancellation of a request. This function checks to see if the CancelRequest should be terminated at this level - or passed down to the next driver. + or passed down to the next driver. Arguments: @@ -2321,9 +2321,9 @@ Return Value: PVELAN pVElan = (PVELAN)MiniportAdapterContext; PMUX_NDIS_REQUEST pMuxNdisRequest = &pVElan->Request; BOOLEAN fCancelRequest = FALSE; - + DBGPRINT(MUX_LOUD, ("==> MPCancelOidRequest: VELAN %p, RequestId %p\n", pVElan, RequestId)); - + NdisAcquireSpinLock(&pVElan->Lock); if (pMuxNdisRequest->OrigRequest != NULL) { @@ -2335,22 +2335,22 @@ Return Value: } } - - NdisReleaseSpinLock(&pVElan->Lock); + + NdisReleaseSpinLock(&pVElan->Lock); // - // If we find the request, just send down the cancel, otherwise return because there is only + // If we find the request, just send down the cancel, otherwise return because there is only // one request pending from upper layer on the miniport // if (fCancelRequest) { NdisCancelOidRequest(pVElan->pAdapt->BindingHandle, &pMuxNdisRequest->Request); - PtCompleteForwardedRequest(pVElan->pAdapt, - pMuxNdisRequest, + PtCompleteForwardedRequest(pVElan->pAdapt, + pMuxNdisRequest, NDIS_STATUS_REQUEST_ABORTED); } - + DBGPRINT(MUX_LOUD, ("<== MPCancelOidRequest: VELAN %p, RequestId %p\n", pVElan, RequestId)); } @@ -2365,13 +2365,13 @@ MuxAllocateMdl( /*++ Routine Description: - This function is called by NDIS in order to allocate an MDL and memory when - there isn't unused data space in the net buffer when NdisRetreatNetBufferDataStart + This function is called by NDIS in order to allocate an MDL and memory when + there isn't unused data space in the net buffer when NdisRetreatNetBufferDataStart is called Arguments: BufferSize Pointer to allocation size being requested - + Return Value: NOTE: This function always returns NULL. This is so that MUX can allocate memory and MDL @@ -2384,7 +2384,7 @@ NOTE: This function always returns NULL. This is so that MUX can allocate memory return NULL; } -NDIS_STATUS +NDIS_STATUS MPHandleSendTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList @@ -2420,15 +2420,15 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait PVOID pVa; PMDL Mdl, FirstMdl, SecondMdl, PrevMdl; ULONG BytesToSkip; - ULONG BufferLength; + ULONG BufferLength; PVOID Storage; PNET_BUFFER MdlAllocatedNetBuffers = NULL; DBGPRINT(MUX_LOUD, ("==> MPHandleSendTaggingNB: VELAN %p, NetBufferList %p\n", pVElan, NetBufferList)); - + NdisPacket8021qInfo.Value = NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo); SendContext = (PIM_NBL_ENTRY)NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); - + do { Status = NDIS_STATUS_SUCCESS; @@ -2474,7 +2474,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { // // Find the start address of the frame - // + // Storage = NULL; pEthFrame = NdisGetDataBuffer(CurrentNetBuffer, ETH_HEADER_SIZE, @@ -2490,7 +2490,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Mdl = NET_BUFFER_CURRENT_MDL(CurrentNetBuffer); PrevMdl = NULL; - + // // Retreat the net buffer list // @@ -2511,7 +2511,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { // // Advance the NetBuffer so that we can allocate MDLs instead - // + // NdisAdvanceNetBufferDataStart(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, FALSE, @@ -2520,11 +2520,11 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Status = NDIS_STATUS_RESOURCES; } } - + if (Status == NDIS_STATUS_RESOURCES) { do - { + { // // There is no more unused data space in the NetBuffer, need to allocate // a new MDL and memory @@ -2537,7 +2537,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // The following loop is to find the start address of the data after // the ethernet header. This may be either in the first MDL // or in the second. - // + // while (TRUE) { pVa = NULL; @@ -2550,7 +2550,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // // Have we gone far enough into the packet? - // + // if (BytesToSkip == 0) { break; @@ -2559,7 +2559,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // // Does the current buffer contain bytes past the Ethernet // header? If so, stop. - // + // if (BufferLength > BytesToSkip) { pVa = (PVOID)((PUCHAR)pVa + BytesToSkip); @@ -2572,7 +2572,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // to the next buffer. // BytesToSkip -= BufferLength; - Mdl = NDIS_MDL_LINKAGE(Mdl); + Mdl = NDIS_MDL_LINKAGE(Mdl); } if (pVa == NULL) @@ -2596,7 +2596,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait } NdisZeroMemory((PVOID)pNetBufferContext, sizeof(IM_SEND_NB_ENTRY)); - + pEthFrameNew = ((PUCHAR) pNetBufferContext) + sizeof(IM_SEND_NB_ENTRY); // @@ -2606,7 +2606,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait SecondMdl = NdisAllocateMdl(pVElan->MiniportAdapterHandle, pVa, // byte following the Eth+tag headers BufferLength); - + FirstMdl = NdisAllocateMdl(pVElan->MiniportAdapterHandle, pEthFrameNew, ETH_HEADER_SIZE + VLAN_TAG_HEADER_SIZE); @@ -2631,16 +2631,16 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait Status = NDIS_STATUS_RESOURCES; break; } - + // - // All allocations are successful. + // All allocations are successful. // Copy the Ethernet header to the newly allocated memory // Leave space for the VLAN tag // NdisMoveMemory(pEthFrameNew, pEthFrame, 2 * ETH_LENGTH_OF_ADDRESS); - - NdisMoveMemory(pEthFrameNew + (2 * ETH_LENGTH_OF_ADDRESS) + VLAN_TAG_HEADER_SIZE, - pEthFrame + (2 * ETH_LENGTH_OF_ADDRESS), + + NdisMoveMemory(pEthFrameNew + (2 * ETH_LENGTH_OF_ADDRESS) + VLAN_TAG_HEADER_SIZE, + pEthFrame + (2 * ETH_LENGTH_OF_ADDRESS), 2); // @@ -2659,9 +2659,9 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait PrevMdl = NDIS_MDL_LINKAGE(PrevMdl); } - pNetBufferContext->PrevMdl = PrevMdl; + pNetBufferContext->PrevMdl = PrevMdl; } - + pNetBufferContext->CurrentMdlOffset = NET_BUFFER_CURRENT_MDL_OFFSET(CurrentNetBuffer); // @@ -2685,10 +2685,10 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // Adjust the NetBuffer to use the new Mdls // NDIS_MDL_LINKAGE(FirstMdl) = SecondMdl; - + NDIS_MDL_LINKAGE(SecondMdl) = NDIS_MDL_LINKAGE(Mdl); - - NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) - + + NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentNetBuffer) - NET_BUFFER_CURRENT_MDL_OFFSET(CurrentNetBuffer); NET_BUFFER_DATA_LENGTH(CurrentNetBuffer) += VLAN_TAG_HEADER_SIZE; @@ -2717,10 +2717,10 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait else if (Status == NDIS_STATUS_SUCCESS) { // - // There was enough unused space in the NetBuffer to - // accomodate the VLAN tag. + // There was enough unused space in the NetBuffer to + // accomodate the VLAN tag. // Get new start address of frame - // + // Storage = NULL; pEthFrameNew = NdisGetDataBuffer(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, @@ -2734,7 +2734,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait VLAN_TAG_HEADER_SIZE, FALSE, NULL); - + Status = NDIS_STATUS_INVALID_PACKET; } else @@ -2744,14 +2744,14 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait // NdisMoveMemory(pEthFrameNew, pEthFrame, 2 * ETH_LENGTH_OF_ADDRESS); } - + } if (Status != NDIS_STATUS_SUCCESS) { break; } - + pTpid = (PUSHORT)((PUCHAR)pEthFrameNew + 2 * ETH_LENGTH_OF_ADDRESS); *pTpid = TPID; pTagHeader = (PVLAN_TAG_HEADER)(pTpid + 1); @@ -2781,7 +2781,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { SET_VLAN_ID_TO_TAG(pTagHeader, pVElan->VlanId); } - + CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); } @@ -2789,7 +2789,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait { SendContext->Flags |= MUX_RETREAT_DATA; SendContext->MdlAllocatedNetBuffers = MdlAllocatedNetBuffers; - NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; } else { @@ -2806,7 +2806,7 @@ NOTE: This functio doesn't handle vlan tagging in an efficient way, please wait return Status; } -VOID +VOID MPRestoreSendNBL( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -2825,20 +2825,20 @@ Arguments: Return Value: --*/ - + { PNET_BUFFER CurrentNetBuffer; PNET_BUFFER CurrentMdlAllocatedNetBuffer, SavedMdlAllocatedNetBuffer; PIM_SEND_NB_ENTRY NetBufferContext; PVOID pVa = NULL; ULONG BufferLength; - PUCHAR pFrame = NULL, pDst = NULL; + PUCHAR pFrame = NULL, pDst = NULL; PMDL FirstMdl, SecondMdl; PVOID Storage; CurrentNetBuffer = NET_BUFFER_LIST_FIRST_NB(NetBufferList); CurrentMdlAllocatedNetBuffer = MdlAllocatedNetBuffers; - + while (CurrentNetBuffer != LastNetBuffer) { SavedMdlAllocatedNetBuffer = CurrentMdlAllocatedNetBuffer; @@ -2848,9 +2848,9 @@ Return Value: // if (CurrentMdlAllocatedNetBuffer) { - NdisQueryMdl(NET_BUFFER_CURRENT_MDL(CurrentMdlAllocatedNetBuffer), - &pVa, - &BufferLength, + NdisQueryMdl(NET_BUFFER_CURRENT_MDL(CurrentMdlAllocatedNetBuffer), + &pVa, + &BufferLength, NormalPagePriority | MdlMappingNoExecute); if( pVa == NULL ){ //you may do something @@ -2872,10 +2872,10 @@ Return Value: //check why NetBufferContext is NULL } else{ - NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) + + NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) = NET_BUFFER_DATA_OFFSET(CurrentMdlAllocatedNetBuffer) + NetBufferContext->CurrentMdlOffset; - - NET_BUFFER_DATA_LENGTH(CurrentMdlAllocatedNetBuffer) -= VLAN_TAG_HEADER_SIZE; + + NET_BUFFER_DATA_LENGTH(CurrentMdlAllocatedNetBuffer) -= VLAN_TAG_HEADER_SIZE; NET_BUFFER_CURRENT_MDL_OFFSET(CurrentMdlAllocatedNetBuffer) = NetBufferContext->CurrentMdlOffset; @@ -2889,22 +2889,22 @@ Return Value: { NET_BUFFER_FIRST_MDL(CurrentMdlAllocatedNetBuffer) = NetBufferContext->CurrentMdl; } - - CurrentMdlAllocatedNetBuffer = NetBufferContext->NextNetBuffer; + + CurrentMdlAllocatedNetBuffer = NetBufferContext->NextNetBuffer; // // Free the MDLs and the memory allocated // - NdisFreeMdl(SecondMdl); + NdisFreeMdl(SecondMdl); NdisFreeMdl(FirstMdl); - NdisFreeToNPagedLookasideList(&pVElan->TagLookaside, (PVOID) NetBufferContext); + NdisFreeToNPagedLookasideList(&pVElan->TagLookaside, (PVOID) NetBufferContext); } } // - // Advance the NET_BUFFERs until the NET_BUFFER for which + // Advance the NET_BUFFERs until the NET_BUFFER for which // the MDLs were allocated // while ((CurrentNetBuffer != SavedMdlAllocatedNetBuffer) && @@ -2930,13 +2930,13 @@ Return Value: RtlMoveMemory(pDst, pFrame, (2 * ETH_LENGTH_OF_ADDRESS)); } - + NdisAdvanceNetBufferDataStart(CurrentNetBuffer, VLAN_TAG_HEADER_SIZE, FALSE, - NULL); - - CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); + NULL); + + CurrentNetBuffer = NET_BUFFER_NEXT_NB(CurrentNetBuffer); } if (SavedMdlAllocatedNetBuffer) diff --git a/network/ndis/mux/driver/60/mux.c b/network/ndis/mux/driver/60/mux.c index 1ff8698b..4654d373 100644 --- a/network/ndis/mux/driver/60/mux.c +++ b/network/ndis/mux/driver/60/mux.c @@ -1,8 +1,8 @@ /*++ Copyright (c) 1992-2000 Microsoft Corporation - + Module Name: - + mux.c Abstract: @@ -31,7 +31,7 @@ Revision History: #if DBG // // Debug level for mux driver -// +// INT muxDebugLevel = MUX_WARN; #endif //DBG @@ -103,9 +103,9 @@ Arguments: DriverObject - pointer to the system's driver object structure for this driver - + RegistryPath - system's registry path for this driver - + Return Value: STATUS_SUCCESS if all initialization is successful, STATUS_XXX @@ -119,13 +119,13 @@ Return Value: NDIS_HANDLE MiniportDriverContext; NDIS_HANDLE ProtocolDriverContext; NDIS_STRING Name; - + NdisInitializeListHead(&AdapterList); NdisInitializeListHead(&VElanList); MiniportDriverContext=NULL; ProtocolDriverContext=NULL; - + MUX_INIT_MUTEX(&GlobalMutex); MUX_INIT_MUTEX(&ControlDeviceMutex); NdisAllocateSpinLock(&GlobalLock); @@ -147,7 +147,7 @@ Return Value: MChars.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; MChars.Header.Size = sizeof(NDIS_MINIPORT_DRIVER_CHARACTERISTICS); MChars.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_1; - + MChars.MajorNdisVersion = MUX_MAJOR_NDIS_VERSION; MChars.MinorNdisVersion = MUX_MINOR_NDIS_VERSION; @@ -198,15 +198,15 @@ Return Value: PChars.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; PChars.Header.Size = sizeof(NDIS_PROTOCOL_DRIVER_CHARACTERISTICS); PChars.Header.Revision = NDIS_PROTOCOL_DRIVER_CHARACTERISTICS_REVISION_1; - + PChars.MajorNdisVersion = MUX_PROT_MAJOR_NDIS_VERSION; PChars.MinorNdisVersion = MUX_PROT_MINOR_NDIS_VERSION; - + PChars.MajorDriverVersion = MUX_MAJOR_DRIVER_VERSION; PChars.MinorDriverVersion = MUX_MINOR_DRIVER_VERSION; PChars.SetOptionsHandler = PtSetOptions; - + // // Make sure the protocol-name matches the service-name // (from the INF) under which this protocol is installed. @@ -254,11 +254,11 @@ MpSetOptions( Routine Description: This routine registers the optional handlers for the MUX MINIPORT driver with NDIS. - + Arguments: NdisDriverHandle Mux miniport driver handle - DriverContext Specifies a handle to a driver-allocated context area where the driver + DriverContext Specifies a handle to a driver-allocated context area where the driver maintains state and configuration information Return Value: @@ -283,11 +283,11 @@ PtSetOptions( Routine Description: This routine registers the optional handlers for the MUX PROTOCOL driver with NDIS. - + Arguments: NdisDriverHandle Mux protocol driver handle - DriverContext Specifies a handle to a driver-allocated context area where the driver + DriverContext Specifies a handle to a driver-allocated context area where the driver maintains state and configuration information Return Value: @@ -346,16 +346,16 @@ Return Value: MUX_ACQUIRE_MUTEX(&ControlDeviceMutex); ++MiniportCount; - + if (1 == MiniportCount) { NdisZeroMemory(DispatchTable, (IRP_MJ_MAXIMUM_FUNCTION+1) * sizeof(PDRIVER_DISPATCH)); - + DispatchTable[IRP_MJ_CREATE] = PtDispatch; DispatchTable[IRP_MJ_CLEANUP] = PtDispatch; DispatchTable[IRP_MJ_CLOSE] = PtDispatch; DispatchTable[IRP_MJ_DEVICE_CONTROL] = PtDispatch; - + NdisInitUnicodeString(&DeviceName, NTDEVICE_STRING); NdisInitUnicodeString(&DeviceLinkUnicodeString, GLOBAL_LINKNAME_STRING); @@ -377,7 +377,7 @@ Return Value: &DeviceObjectAttributes, &ControlDeviceObject, &NdisDeviceHandle); - + } MUX_RELEASE_MUTEX(&ControlDeviceMutex); @@ -416,36 +416,36 @@ Return Value: PVOID buffer; UNREFERENCED_PARAMETER(DeviceObject); - + irpStack = IoGetCurrentIrpStackLocation(Irp); DBGPRINT(MUX_LOUD, ("==>PtDispatch %d\n", irpStack->MajorFunction)); - + switch (irpStack->MajorFunction) { case IRP_MJ_CREATE: break; - + case IRP_MJ_CLEANUP: break; - + case IRP_MJ_CLOSE: - break; - - case IRP_MJ_DEVICE_CONTROL: + break; + + case IRP_MJ_DEVICE_CONTROL: { - - buffer = Irp->AssociatedIrp.SystemBuffer; + + buffer = Irp->AssociatedIrp.SystemBuffer; inlen = irpStack->Parameters.DeviceIoControl.InputBufferLength; UNREFERENCED_PARAMETER(buffer); UNREFERENCED_PARAMETER(inlen); - - switch (irpStack->Parameters.DeviceIoControl.IoControlCode) + + switch (irpStack->Parameters.DeviceIoControl.IoControlCode) { // // Add code here to handle ioctl commands. // } - break; + break; } default: break; @@ -458,7 +458,7 @@ Return Value: return status; -} +} NDIS_STATUS @@ -492,7 +492,7 @@ Return Value: ASSERT(MiniportCount > 0); --MiniportCount; - + if (0 == MiniportCount) { // @@ -511,6 +511,6 @@ Return Value: DBGPRINT(MUX_INFO, ("<== PtDeregisterDevice: %x\n", Status)); return Status; - + } diff --git a/network/ndis/mux/driver/60/mux.h b/network/ndis/mux/driver/60/mux.h index dcdef937..a36ee52d 100644 --- a/network/ndis/mux/driver/60/mux.h +++ b/network/ndis/mux/driver/60/mux.h @@ -124,7 +124,7 @@ VOID #define MUX_ADAPTER_PACKET_FILTER \ NDIS_PACKET_TYPE_PROMISCUOUS - + #define MIN_PACKET_POOL_SIZE 255 #define MAX_PACKET_POOL_SIZE 4096 @@ -466,7 +466,7 @@ typedef struct _ADAPT NDIS_MEDIUM Medium ; // - // BindParameters passed to protocol giving it information on + // BindParameters passed to protocol giving it information on // the miniport below // NDIS_BIND_PARAMETERS BindParameters; @@ -474,7 +474,7 @@ typedef struct _ADAPT NDIS_RECEIVE_SCALE_CAPABILITIES RcvScaleCapabilities; NDIS_LINK_STATE LastIndicatedLinkState; MUX_ADAPTER_BINDING_STATE BindingState; - + ULONG OutstandingSends; PNDIS_EVENT PauseEvent; NDIS_SPIN_LOCK Lock; @@ -552,7 +552,7 @@ typedef struct _VELAN // serializes requests to a miniport, we only need one of these // per VELAN. // - MUX_NDIS_REQUEST Request; + MUX_NDIS_REQUEST Request; // Have we queued a request because the lower binding is // at a low power state? BOOLEAN QueuedRequest; @@ -609,7 +609,7 @@ typedef struct _VELAN // Multicast list MUX_MAC_ADDRESS McastAddrs[VELAN_MAX_MCAST_LIST]; ULONG McastAddrCount; - + NDIS_STATUS LastIndicatedStatus; NDIS_STATUS LatestUnIndicateStatus; @@ -626,7 +626,7 @@ typedef struct _VELAN ULONG RcvFormatErrors; ULONG RcvVlanIdErrors; BOOLEAN RestoreLookaheadSize; - NPAGED_LOOKASIDE_LIST TagLookaside; + NPAGED_LOOKASIDE_LIST TagLookaside; #endif NET_IFINDEX IfIndex; @@ -661,22 +661,22 @@ typedef struct _VELAN #if IEEE_VLAN_SUPPORT -#define TPID 0x0081 +#define TPID 0x0081 // // Define tag_header structure // typedef struct _VLAN_TAG_HEADER { - UCHAR TagInfo[2]; + UCHAR TagInfo[2]; } VLAN_TAG_HEADER, *PVLAN_TAG_HEADER; // // Macro definitions for VLAN support -// -#define VLAN_TAG_HEADER_SIZE 4 +// +#define VLAN_TAG_HEADER_SIZE 4 -#define VLANID_DEFAULT 0 +#define VLANID_DEFAULT 0 #define VLAN_ID_MAX 0xfff #define VLAN_ID_MIN 0x0 @@ -686,7 +686,7 @@ typedef struct _VLAN_TAG_HEADER // // Get information for tag headre -// +// #define GET_CANONICAL_FORMAT_ID_FROM_TAG(_pTagHeader) \ ((_pTagHeader)->TagInfo[0] & CANONICAL_FORMAT_ID_MASK) @@ -698,23 +698,23 @@ typedef struct _VLAN_TAG_HEADER // // Clear the tag header struct -// +// #define INITIALIZE_TAG_HEADER_TO_ZERO(_pTagHeader) \ { \ (_pTagHeader)->TagInfo[0] = 0; \ (_pTagHeader)->TagInfo[1] = 0; \ } - + // // Set VLAN information to tag header // Before we called all the set macro, first we need to initialize pTagHeader to be 0 // #define SET_CANONICAL_FORMAT_ID_TO_TAG(_pTagHeader, _CanonicalFormatId) \ (_pTagHeader)->TagInfo[0] |= ((UCHAR)(_CanonicalFormatId) << 4) - + #define SET_USER_PRIORITY_TO_TAG(_pTagHeader, _UserPriority) \ (_pTagHeader)->TagInfo[0] |= ((UCHAR)(_UserPriority) << 5) - + #define SET_VLAN_ID_TO_TAG(_pTagHeader, _VlanId) \ { \ (_pTagHeader)->TagInfo[0] |= (((UCHAR)((_VlanId) >> 8)) & 0x0f); \ @@ -724,7 +724,7 @@ typedef struct _VLAN_TAG_HEADER // // Copy tagging information in the indicated frame to per packet info -// +// #define COPY_TAG_INFO_FROM_HEADER_TO_PACKET_INFO(_Ieee8021qInfo, _pTagHeader) \ { \ (_Ieee8021qInfo).TagHeader.UserPriority = ((_pTagHeader->TagInfo[0] & USER_PRIORITY_MASK) >> 5); \ @@ -744,7 +744,7 @@ typedef struct _VLAN_TAG_HEADER // // Every NBL that is indicated up to a protocol needs to advance the buffer -// in case the VLAN tag is present. It should be restored before returning the +// in case the VLAN tag is present. It should be restored before returning the // packet to the miniport. This structure is used for that purpose // typedef struct _RECV_NBL_ENTRY @@ -770,11 +770,11 @@ typedef struct _IM_SEND_NB_ENTRY #endif //IEEE_VLAN_SUPPORT -typedef struct _IM_NBL_ENTRY +typedef struct _IM_NBL_ENTRY { NDIS_HANDLE PreviousSourceHandle; PVELAN pVElan; -#if IEEE_VLAN_SUPPORT +#if IEEE_VLAN_SUPPORT ULONG Flags; PNET_BUFFER MdlAllocatedNetBuffers; #endif @@ -847,7 +847,7 @@ typedef struct _IM_NBL_ENTRY #define ASSERT_AT_PASSIVE() \ ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL) - + #define ASSERT_AT_DISPATCH() \ ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL) @@ -912,13 +912,13 @@ MuxAllocateMdl( IN OUT PULONG BufferSize ); -NDIS_STATUS +NDIS_STATUS MPHandleSendTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList ); -VOID +VOID MPRestoreSendNBL( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -926,21 +926,21 @@ MPRestoreSendNBL( IN PNET_BUFFER MdlAllocatedNetBuffers ); -NDIS_STATUS +NDIS_STATUS PtHandleReceiveTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, - IN PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo + IN PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo ); -NDIS_STATUS +NDIS_STATUS PtStripVlanTagNB( IN PNET_BUFFER_LIST NetBufferList, OUT PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo, - OUT PRECV_NBL_ENTRY RecvContext + OUT PRECV_NBL_ENTRY RecvContext ); -NDIS_STATUS +NDIS_STATUS PtRestoreReceiveNBL( IN PNET_BUFFER_LIST NetBufferList ); diff --git a/network/ndis/mux/driver/60/mux_mp.inf b/network/ndis/mux/driver/60/mux_mp.inf Binary files differindex f216ac16..5c0944bb 100644 --- a/network/ndis/mux/driver/60/mux_mp.inf +++ b/network/ndis/mux/driver/60/mux_mp.inf diff --git a/network/ndis/mux/driver/60/muxp.inf b/network/ndis/mux/driver/60/muxp.inf Binary files differindex f9c4c04e..ea09e77d 100644 --- a/network/ndis/mux/driver/60/muxp.inf +++ b/network/ndis/mux/driver/60/muxp.inf diff --git a/network/ndis/mux/driver/60/novlan/mux.vcxproj b/network/ndis/mux/driver/60/novlan/mux.vcxproj index 758f450f..339983a6 100644 --- a/network/ndis/mux/driver/60/novlan/mux.vcxproj +++ b/network/ndis/mux/driver/60/novlan/mux.vcxproj @@ -1,14 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -17,12 +9,20 @@ <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Debug|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{B2DE2C37-B3F2-491E-94AE-402A7B4D3308}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{66B17978-A259-41F2-B762-8A38382B603D}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -42,7 +42,7 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -50,7 +50,7 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -68,10 +68,10 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> @@ -81,10 +81,10 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -133,50 +133,50 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <AdditionalOptions>%(AdditionalOptions) /GS</AdditionalOptions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <AdditionalOptions>%(AdditionalOptions) /GS</AdditionalOptions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -218,7 +218,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> @@ -237,7 +237,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> @@ -296,6 +296,14 @@ <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> + <FilesToPackage Include="$(SolutionDir)notifyob\ARM64\Release\mux.dll" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <PackageRelativeDirectory> + </PackageRelativeDirectory> + </FilesToPackage> + <FilesToPackage Include="$(SolutionDir)notifyob\ARM64\Debug\mux.dll" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <PackageRelativeDirectory> + </PackageRelativeDirectory> + </FilesToPackage> <Inf Exclude="@(Inf)" Include="*.inf" /> <Inf Include="..\muxp.inf" /> <Inf Include="..\mux_mp.inf" /> diff --git a/network/ndis/mux/driver/60/protocol.c b/network/ndis/mux/driver/60/protocol.c index 908e4de2..8a697c04 100644 --- a/network/ndis/mux/driver/60/protocol.c +++ b/network/ndis/mux/driver/60/protocol.c @@ -1,5 +1,5 @@ /*++ -Copyright(c) 1992-2000 Microsoft Corporation +Copyright (c) 1992-2000 Microsoft Corporation Module Name: @@ -67,11 +67,11 @@ Return Value: UNREFERENCED_PARAMETER(ProtocolDriverContext); UNREFERENCED_PARAMETER(BindContext); - + pConfigString = (PNDIS_STRING)BindParameters->ProtocolSection; - + DBGPRINT(MUX_LOUD, ("==> Protocol BindAdapter: %ws\n", pConfigString->Buffer)); - + do { if (BindParameters->Header.Type != NDIS_OBJECT_TYPE_BIND_PARAMETERS || @@ -80,12 +80,12 @@ Return Value: Status = NDIS_STATUS_INVALID_PARAMETER; break; } - + // // Allocate memory for Adapter struct plus the config // string with two extra WCHARs for NULL termination. // - Length = sizeof(ADAPT) + + Length = sizeof(ADAPT) + pConfigString->MaximumLength + sizeof(WCHAR); pAdapt = NdisAllocateMemoryWithTagPriority(ProtHandle, Length , MUX_TAG, LowPoolPriority); @@ -94,14 +94,14 @@ Return Value: Status = NDIS_STATUS_RESOURCES; break; } - + // // Initialize the adapter structure // - NdisZeroMemory(pAdapt, sizeof(ADAPT)); + NdisZeroMemory(pAdapt, sizeof(ADAPT)); + + (VOID)PtReferenceAdapter(pAdapt, (PUCHAR)"openadapter"); - (VOID)PtReferenceAdapter(pAdapt, (PUCHAR)"openadapter"); - // // Copy in the Config string - we will use this to open the @@ -109,13 +109,13 @@ Return Value: // pAdapt->ConfigString.MaximumLength = pConfigString->MaximumLength; pAdapt->ConfigString.Length = pConfigString->Length; - pAdapt->ConfigString.Buffer = (PWCHAR)((PUCHAR)pAdapt + + pAdapt->ConfigString.Buffer = (PWCHAR)((PUCHAR)pAdapt + sizeof(ADAPT)); NdisMoveMemory(pAdapt->ConfigString.Buffer, pConfigString->Buffer, pConfigString->Length); - pAdapt->ConfigString.Buffer[pConfigString->Length/sizeof(WCHAR)] = + pAdapt->ConfigString.Buffer[pConfigString->Length/sizeof(WCHAR)] = ((WCHAR)0); NdisInitializeEvent(&pAdapt->Event); @@ -173,9 +173,9 @@ Return Value: break; } pAdapt->Flags |= MUX_BINDING_ACTIVE; - + pAdapt->BindingState = MuxAdapterBindingPaused; - + pAdapt->Medium = MediumArray[MediumIndex]; // @@ -188,20 +188,20 @@ Return Value: MUX_RELEASE_MUTEX(&GlobalMutex); // - // Copy all the relevant information about the Adapter into + // Copy all the relevant information about the Adapter into // the local structure // pAdapt->BindParameters = *BindParameters; - + if (BindParameters->RcvScaleCapabilities) { pAdapt->RcvScaleCapabilities = (*BindParameters->RcvScaleCapabilities); pAdapt->BindParameters.RcvScaleCapabilities = &pAdapt->RcvScaleCapabilities; } - - pAdapt->PowerManagementCapabilities = (*BindParameters->PowerManagementCapabilities); - + pAdapt->PowerManagementCapabilities = (*BindParameters->PowerManagementCapabilities); + + PtPostProcessPnPCapabilities(&pAdapt->PowerManagementCapabilities, sizeof(pAdapt->PowerManagementCapabilities)); @@ -211,7 +211,7 @@ Return Value: pAdapt->BindParameters.ProtocolSection= NULL; pAdapt->BindParameters.AdapterName = NULL; pAdapt->BindParameters.PhysicalDeviceObject = NULL; - + // // Start all VELANS configured on this adapter. // @@ -222,12 +222,12 @@ Return Value: break; } - + } while(FALSE); if (Status != NDIS_STATUS_SUCCESS) { - + if (pAdapt != NULL) { // @@ -237,7 +237,7 @@ Return Value: { // // Close the binding the driver opened above - // + // PtCloseAdapter(pAdapt); MUX_ACQUIRE_MUTEX(&GlobalMutex); @@ -250,7 +250,7 @@ Return Value: pAdapt = NULL; } } - + DBGPRINT(MUX_INFO, ("<== PtBindAdapter: pAdapt %p, Status %x\n", pAdapt, Status)); @@ -268,7 +268,7 @@ PtOpenAdapterComplete( Routine Description: - Completion routine for NdisOpenAdapter issued from within the + Completion routine for NdisOpenAdapter issued from within the PtBindAdapter. Simply unblock the caller. Arguments: @@ -318,7 +318,7 @@ Return Value: // Insert code here to query Adapter info if needed // UNREFERENCED_PARAMETER(pAdapt); - + } @@ -370,7 +370,7 @@ Return Value: // pMuxNdisRequest->pCallback = PtCompleteBlockingRequest; NdisInitializeEvent(&pMuxNdisRequest->Event); - + pMuxNdisRequest->Request.Header.Type = NDIS_OBJECT_TYPE_OID_REQUEST; pMuxNdisRequest->Request.Header.Revision = NDIS_OID_REQUEST_REVISION_1; pMuxNdisRequest->Request.Header.Size = sizeof(NDIS_OID_REQUEST); @@ -381,29 +381,29 @@ Return Value: InformationBuffer; pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength = InformationBufferLength; - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { Status = NDIS_STATUS_CLOSING; - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); } else { NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest(pAdapt->BindingHandle, - &pMuxNdisRequest->Request); + &pMuxNdisRequest->Request); } if (Status != NDIS_STATUS_PENDING) { NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests --; - + if ((pAdapt->OutstandingRequests == 0) && (pAdapt->CloseEvent != NULL)) { NdisSetEvent(pAdapt->CloseEvent); @@ -411,11 +411,11 @@ Return Value: } NdisReleaseSpinLock(&pAdapt->Lock); } - else + else { NdisWaitEvent(&pMuxNdisRequest->Event, 0); Status = pMuxNdisRequest->Status; - } + } } while (FALSE); @@ -496,7 +496,7 @@ Return Value: InformationBuffer; pNdisRequest->DATA.QUERY_INFORMATION.InformationBufferLength = InformationBufferLength; - + break; case NdisRequestSetInformation: @@ -505,31 +505,31 @@ Return Value: InformationBuffer; pNdisRequest->DATA.SET_INFORMATION.InformationBufferLength = InformationBufferLength; - + break; - + default: ASSERT(FALSE); break; } - + NdisAcquireSpinLock(&pAdapt->Lock); pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest( pAdapt->BindingHandle, pNdisRequest); } - + if (Status != NDIS_STATUS_PENDING) { PtRequestComplete( @@ -553,13 +553,13 @@ PtCloseAdapter( Routine Description: - Call either when the protocol is unbinding or the miniport is halting to set + Call either when the protocol is unbinding or the miniport is halting to set the packet filters back to zero and multicast filter back to zero Arguments: pAdapter Pointer to a virtual adapter - + Return Value: None @@ -573,7 +573,7 @@ Return Value: NDIS_EVENT CloseEvent; DBGPRINT(MUX_LOUD, ("==> PtCloseAdapter: Adapt %p\n", pAdapt)); - + ASSERT (KeGetCurrentIrql() == PASSIVE_LEVEL); // @@ -581,15 +581,15 @@ Return Value: // from the adapter below is required for NDIS 6.0 protocols // PtRequestAdapterSync(pAdapt, - NdisRequestSetInformation, + NdisRequestSetInformation, OID_GEN_CURRENT_PACKET_FILTER, - &PacketFilter, + &PacketFilter, sizeof(PacketFilter)); PtRequestAdapterSync(pAdapt, - NdisRequestSetInformation, + NdisRequestSetInformation, OID_802_3_MULTICAST_LIST, - MCastBuf, + MCastBuf, MCastBufSize); // // Stop sending requests and wait for outstanding requests to complete @@ -602,16 +602,16 @@ Return Value: if (pAdapt->OutstandingRequests != 0) { NdisInitializeEvent(&CloseEvent); - pAdapt->CloseEvent = &CloseEvent; + pAdapt->CloseEvent = &CloseEvent; NdisReleaseSpinLock(&pAdapt->Lock); - NdisWaitEvent(&CloseEvent, 0); + NdisWaitEvent(&CloseEvent, 0); NdisAcquireSpinLock(&pAdapt->Lock); } NdisReleaseSpinLock(&pAdapt->Lock); // // Now Close the binding with the adapter below // - + NdisResetEvent(&pAdapt->Event); Status = NdisCloseAdapterEx(pAdapt->BindingHandle); @@ -625,7 +625,7 @@ Return Value: } pAdapt->BindingHandle = NULL; - + DBGPRINT(MUX_LOUD, ("<== PtCloseAdapter: Adapt %p\n", pAdapt)); } @@ -660,7 +660,7 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; UNREFERENCED_PARAMETER(UnbindContext); - + DBGPRINT(MUX_LOUD, ("==> PtUnbindAdapter: Adapt %p\n", pAdapt)); // @@ -700,9 +700,9 @@ Return Value: // run StopVElan at passive IRQL. // MUX_RELEASE_ADAPT_READ_LOCK(pAdapt, &LockState); - + PtStopVElan(pVElan); - + PtDereferenceVElan(pVElan, (PUCHAR)"UnbindTemp"); MUX_ACQUIRE_ADAPT_READ_LOCK(pAdapt, &LockState); @@ -755,7 +755,7 @@ Return Value: // // Remove the adapter from the global AdapterList // - + MUX_ACQUIRE_MUTEX(&GlobalMutex); RemoveEntryList(&pAdapt->Link); @@ -763,16 +763,16 @@ Return Value: MUX_RELEASE_MUTEX(&GlobalMutex); NdisFreeSpinLock(&pAdapt->Lock); - + // // Free all the resources associated with this Adapter except the - // ADAPT struct itself, because that will be freed by - // PtDereferenceAdapter call when the reference drops to zero. + // ADAPT struct itself, because that will be freed by + // PtDereferenceAdapter call when the reference drops to zero. // Note: Every VELAN associated with this Adapter takes a ref count // on it. So the adapter memory wouldn't be freed until all the VELANs - // are shutdown. + // are shutdown. // - + PtDereferenceAdapter(pAdapt, (PUCHAR)"Unbind"); DBGPRINT(MUX_LOUD, ("<== PtUnbindAdapter: Adapt %p, Status=%08lx\n", pAdapt, Status)); @@ -795,7 +795,7 @@ Routine Description: Arguments: ProtocolBindingContext Pointer to the adapter structure - + Return Value: None. @@ -804,12 +804,12 @@ Return Value: { PADAPT pAdapt =(PADAPT)ProtocolBindingContext; - DBGPRINT(MUX_LOUD, ("==> PtCloseAdapterComplete: Adapt %p\n", + DBGPRINT(MUX_LOUD, ("==> PtCloseAdapterComplete: Adapt %p\n", pAdapt)); NdisSetEvent(&pAdapt->Event); - DBGPRINT(MUX_LOUD, ("<== PtCloseAdapterComplete: Adapt %p\n", + DBGPRINT(MUX_LOUD, ("<== PtCloseAdapterComplete: Adapt %p\n", pAdapt)); } @@ -843,27 +843,27 @@ Return Value: PMUX_NDIS_REQUEST pMuxNdisRequest; - DBGPRINT(MUX_LOUD, ("==> PtRequestComplete: Adapt %p, Request %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("==> PtRequestComplete: Adapt %p, Request %p, Status %8x\n", pAdapt, NdisRequest, Status)); //get the Super-structure for NDIS_REQUEST before getting the callback functions //so make sure NdisRequest is a filled into a MUX_NDIS_REQUEST before using this function pMuxNdisRequest = CONTAINING_RECORD(NdisRequest, MUX_NDIS_REQUEST, Request); - + ASSERT(pMuxNdisRequest->pCallback != NULL); - + // // Completion is handled by the callback routine: // - (*pMuxNdisRequest->pCallback)(pAdapt, + (*pMuxNdisRequest->pCallback)(pAdapt, pMuxNdisRequest, Status); NdisAcquireSpinLock(&pAdapt->Lock); - + pAdapt->OutstandingRequests --; - + if ((pAdapt->OutstandingRequests == 0) && (pAdapt->CloseEvent != NULL)) { NdisSetEvent(pAdapt->CloseEvent); @@ -872,7 +872,7 @@ Return Value: NdisReleaseSpinLock(&pAdapt->Lock); - DBGPRINT(MUX_LOUD, ("<== PtRequestComplete: Adapt %p, Request %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtRequestComplete: Adapt %p, Request %p, Status %8x\n", pAdapt, NdisRequest, Status)); } @@ -914,9 +914,9 @@ Return Value: BOOLEAN fCompleteRequest = FALSE; UNREFERENCED_PARAMETER(pAdapt); - - DBGPRINT(MUX_LOUD, ("==> PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", + + DBGPRINT(MUX_LOUD, ("==> PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); // // Get the originating VELAN. The VELAN will not be dereferenced @@ -926,10 +926,10 @@ Return Value: ASSERT(pVElan != NULL); ASSERT(pMuxNdisRequest == &pVElan->Request); - + if (Status != NDIS_STATUS_SUCCESS) { - DBGPRINT(MUX_WARN, ("PtCompleteForwardedRequest: pVElan %p, OID %x, Status %x\n", + DBGPRINT(MUX_WARN, ("PtCompleteForwardedRequest: pVElan %p, OID %x, Status %x\n", pVElan, pMuxNdisRequest->Request.DATA.QUERY_INFORMATION.Oid, Status)); @@ -944,9 +944,9 @@ Return Value: OrigRequest = pMuxNdisRequest->OrigRequest; pMuxNdisRequest->OrigRequest = NULL; } - - NdisReleaseSpinLock(&pVElan->Lock); + + NdisReleaseSpinLock(&pVElan->Lock); if (fCompleteRequest == FALSE) { @@ -961,9 +961,9 @@ Return Value: case NdisRequestQueryInformation: case NdisRequestQueryStatistics: - OrigRequest->DATA.QUERY_INFORMATION.BytesWritten = + OrigRequest->DATA.QUERY_INFORMATION.BytesWritten = pNdisRequest->DATA.QUERY_INFORMATION.BytesWritten; - OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded = + OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded = pNdisRequest->DATA.QUERY_INFORMATION.BytesNeeded; // @@ -995,8 +995,8 @@ Return Value: OrigRequest->DATA.QUERY_INFORMATION.BytesNeeded= pNdisRequest->DATA.SET_INFORMATION.BytesNeeded; -#if IEEE_VELAN_SUPPORT - if ((pNdisRequest->DATA.SET_INFORMATION.Oid == OID_GEN_CURRENT_LOOKAHEAD) +#if IEEE_VELAN_SUPPORT + if ((pNdisRequest->DATA.SET_INFORMATION.Oid == OID_GEN_CURRENT_LOOKAHEAD) && (pVElan->RestoreLookaheadSize == TRUE)) { pVElan->RestoreLookaheadSize = FALSE; @@ -1013,8 +1013,8 @@ Return Value: switch (Oid) { case OID_GEN_CURRENT_LOOKAHEAD: - - + + NdisMoveMemory(&pVElan->LookAhead, pNdisRequest->DATA.SET_INFORMATION.InformationBuffer, sizeof(ULONG)); @@ -1036,7 +1036,7 @@ Return Value: MUX_DECR_PENDING_SENDS(pVElan); - DBGPRINT(MUX_LOUD, ("<== PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtCompleteForwardedRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); } @@ -1070,7 +1070,7 @@ Return Value: PNDIS_PM_WAKE_UP_CAPABILITIES pPMstruct; DBGPRINT(MUX_LOUD, ("==> PtPostProcessPnPCapabilities\n")); - + if (InformationBufferLength >= sizeof(NDIS_PNP_CAPABILITIES)) { pPNPCapabilities = (PNDIS_PNP_CAPABILITIES)InformationBuffer; @@ -1114,9 +1114,9 @@ Return Value: { UNREFERENCED_PARAMETER(pAdapt); - DBGPRINT(MUX_LOUD, ("==> PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("==> PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); - + // // The request was originated from this driver. Wake up the // thread blocked for its completion. @@ -1124,7 +1124,7 @@ Return Value: pMuxNdisRequest->Status = Status; NdisSetEvent(&pMuxNdisRequest->Event); - DBGPRINT(MUX_LOUD, ("<== PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", + DBGPRINT(MUX_LOUD, ("<== PtCompleteBlockingRequest: Adapt %p, MuxRequest %p, Status %8x\n", pAdapt, pMuxNdisRequest, Status)); } @@ -1208,7 +1208,7 @@ Return Value: { break; } - + MUX_ACQUIRE_ADAPT_READ_LOCK(pAdapt, &LockState); if (GeneralStatus == NDIS_STATUS_LINK_STATE) @@ -1219,7 +1219,7 @@ Return Value: p != &pAdapt->VElanList; p = p->Flink) { - + pVElan = CONTAINING_RECORD(p, VELAN, Link); MUX_INCR_PENDING_RECEIVES(pVElan); @@ -1229,7 +1229,7 @@ Return Value: // if ((pVElan->MiniportInitPending) || (pVElan->MiniportHalting) || - (pVElan->MiniportAdapterHandle == NULL) || + (pVElan->MiniportAdapterHandle == NULL) || MUX_IS_LOW_POWER_STATE(pVElan->MPDevicePowerState)) { MUX_DECR_PENDING_RECEIVES(pVElan); @@ -1237,7 +1237,7 @@ Return Value: { // // Keep track of the lastest status to indicated when VELAN power is on - // + // ASSERT(GeneralStatus == NDIS_STATUS_LINK_STATE); pVElan->LatestUnIndicateStatus = GeneralStatus; @@ -1247,12 +1247,12 @@ Return Value: pVElan->LatestUnIndicateLinkState = *(PNDIS_LINK_STATE)StatusIndication->StatusBuffer; } } - + continue; } // - // Save the last indicated status when + // Save the last indicated status when pVElan->LastIndicatedStatus = GeneralStatus; if (GeneralStatus == NDIS_STATUS_LINK_STATE) { @@ -1260,27 +1260,27 @@ Return Value: } // // Allocate a new status indication and set the destination handle to null to ensure that the status - // is indicated to protocols bound to mux velans. Copy only the fields that makes sense to pass up. For - // instance, do not copy PortNumber, RequestId, Flags, Guid, NdisReserved. Port Number is really not - // necessary to copy and pass up for the scenario because the port number is an entity that makes sense + // is indicated to protocols bound to mux velans. Copy only the fields that makes sense to pass up. For + // instance, do not copy PortNumber, RequestId, Flags, Guid, NdisReserved. Port Number is really not + // necessary to copy and pass up for the scenario because the port number is an entity that makes sense // between the protocol and the underlying miniport pair. - // - + // + NdisZeroMemory(&NewStatusIndication, sizeof(NDIS_STATUS_INDICATION)); - + NewStatusIndication.Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION; NewStatusIndication.Header.Revision = NDIS_STATUS_INDICATION_REVISION_1; NewStatusIndication.Header.Size = sizeof(NDIS_STATUS_INDICATION); - + NewStatusIndication.StatusCode = StatusIndication->StatusCode; NewStatusIndication.SourceHandle = pVElan->MiniportAdapterHandle; NewStatusIndication.DestinationHandle = NULL; - + NewStatusIndication.StatusBuffer = StatusIndication->StatusBuffer; NewStatusIndication.StatusBufferSize = StatusIndication->StatusBufferSize; NdisMIndicateStatusEx(pVElan->MiniportAdapterHandle, &NewStatusIndication); - + // // Mark this so that we forward a status complete // indication as well. @@ -1293,7 +1293,7 @@ Return Value: MUX_RELEASE_ADAPT_READ_LOCK(pAdapt, &LockState); } while (FALSE); - + DBGPRINT(MUX_LOUD, ("<== PtStatus: Adapt %p, Status %x\n", pAdapt, GeneralStatus)); } @@ -1333,7 +1333,7 @@ Return Value: ETH_COMPARE_NETWORK_ADDRESSES_EQ(pVElan->McastAddrs[i], pDstMac, &AddrCompareResult); - + if (AddrCompareResult == 0) { break; @@ -1451,9 +1451,9 @@ Return Value: bPacketMatch = FALSE; } } - + DBGPRINT(MUX_VERY_LOUD, ("<== PtMatchPacketToVElan: VElan %p, PacketMatch %x\n", pVElan, bPacketMatch)); - + return (bPacketMatch); } @@ -1489,7 +1489,7 @@ Return Value: // // Store the new power state. // - + pAdapt->PtDevicePowerState = *(PNDIS_DEVICE_POWER_STATE)pNetPnPEventNotification->NetPnPEvent.Buffer; DBGPRINT(MUX_LOUD, ("==> PnPNetEventSetPower: Adapt %p, SetPower to %d\n", @@ -1531,7 +1531,7 @@ Return Value: // break; } - + DBGPRINT(MUX_INFO, ("SetPower: Adapt %p, waiting for pending IO to complete\n", pAdapt)); @@ -1563,23 +1563,23 @@ Return Value: pVElan->QueuedRequest = FALSE; NdisReleaseSpinLock(&pVElan->Lock); - + NdisAcquireSpinLock(&pAdapt->Lock); - + pAdapt->OutstandingRequests ++; - + if ((pAdapt->Flags & MUX_BINDING_CLOSING)== MUX_BINDING_CLOSING) { - NdisReleaseSpinLock(&pAdapt->Lock); - Status = NDIS_STATUS_CLOSING; + NdisReleaseSpinLock(&pAdapt->Lock); + Status = NDIS_STATUS_CLOSING; } else { - NdisReleaseSpinLock(&pAdapt->Lock); + NdisReleaseSpinLock(&pAdapt->Lock); Status = NdisOidRequest( pAdapt->BindingHandle, &pVElan->Request.Request); - } + } if (Status != NDIS_STATUS_PENDING) { PtRequestComplete(pAdapt, @@ -1598,7 +1598,7 @@ Return Value: DBGPRINT(MUX_LOUD, ("<== PnPNetEventSetPower: Adapt %p, SetPower to %d\n", pAdapt, pAdapt->PtDevicePowerState)); - + return (NDIS_STATUS_SUCCESS); } @@ -1633,7 +1633,7 @@ Return Value: PLIST_ENTRY p; NDIS_EVENT PauseEvent; - DBGPRINT(MUX_LOUD, ("==> PtPnPHandler: Adapt %p, NetPnPEvent %d\n", pAdapt, + DBGPRINT(MUX_LOUD, ("==> PtPnPHandler: Adapt %p, NetPnPEvent %d\n", pAdapt, pNetPnPEventNotification->NetPnPEvent.NetEvent)); switch (pNetPnPEventNotification->NetPnPEvent.NetEvent) @@ -1661,7 +1661,7 @@ Return Value: } MUX_RELEASE_MUTEX(&GlobalMutex); - + Status = NDIS_STATUS_SUCCESS; break; case NetEventIMReEnableDevice: @@ -1675,8 +1675,8 @@ Return Value: PtBootStrapVElans(pAdapt, pNetPnPEventNotification->NetPnPEvent.Buffer); } - - + + MUX_RELEASE_MUTEX(&GlobalMutex); Status = NDIS_STATUS_SUCCESS; @@ -1688,23 +1688,23 @@ Return Value: pAdapt->BindingState = MuxAdapterBindingPausing; ASSERT(pAdapt->PauseEvent == NULL); - + if (pAdapt->OutstandingSends != 0) { NdisInitializeEvent(&PauseEvent); - + pAdapt->PauseEvent = &PauseEvent; - + NdisReleaseSpinLock(&pAdapt->Lock); NdisWaitEvent(&PauseEvent, 0); - + NdisAcquireSpinLock(&pAdapt->Lock); } - + pAdapt->BindingState = MuxAdapterBindingPaused; NdisReleaseSpinLock(&pAdapt->Lock); - + Status = NDIS_STATUS_SUCCESS; break; @@ -1712,15 +1712,15 @@ Return Value: pAdapt->BindingState = MuxAdapterBindingRunning; Status = NDIS_STATUS_SUCCESS; break; - - + + default: Status = NDIS_STATUS_SUCCESS; break; } - DBGPRINT(MUX_LOUD, ("<== PtPnPHandler: Adapt %p, NetPnPEvent %d, Status %8x\n", pAdapt, + DBGPRINT(MUX_LOUD, ("<== PtPnPHandler: Adapt %p, NetPnPEvent %d, Status %8x\n", pAdapt, pNetPnPEventNotification->NetPnPEvent.NetEvent, Status)); return Status; } @@ -1742,12 +1742,12 @@ Routine Description: routines are protected by NDIS against pre-emption by UnbindAdapter. If this routine will be called from any other context, it should be protected against a simultaneous call to our UnbindAdapter handler. - + Arguments: pAdapt - Pointer to Adapter structure - pVElanKey - Points to a Unicode string naming the VELAN to create. - + pVElanKey - Points to a Unicode string naming the VELAN to create. + Return Value: NDIS_STATUS_SUCCESS if we either found a duplicate VELAN or @@ -1759,11 +1759,11 @@ Return Value: { NDIS_STATUS Status; PVELAN pVElan; - + Status = NDIS_STATUS_SUCCESS; pVElan = NULL; - DBGPRINT(MUX_LOUD, ("=> PtCreateAndStartVElan: Adapter %p, ElanKey %ws\n", + DBGPRINT(MUX_LOUD, ("=> PtCreateAndStartVElan: Adapter %p, ElanKey %ws\n", pAdapt, pVElanKey->Buffer)); do @@ -1788,9 +1788,9 @@ Return Value: break; } } - + pVElan = NULL; - + if (pVElanKey != NULL) { pVElan = PtAllocateAndInitializeVElan(pAdapt, pVElanKey); @@ -1824,9 +1824,9 @@ Return Value: pVElan = NULL; break; } - + PtDereferenceVElan(pVElan,(UCHAR*) "CreatVelan"); - + } while (FALSE); @@ -1871,7 +1871,7 @@ Return Value: do { Length = sizeof(VELAN) + pVElanKey->Length + sizeof(WCHAR); - + // // Allocate a VELAN data structure. // @@ -1890,27 +1890,27 @@ Return Value: NdisZeroMemory(pVElan, Length); NdisInitializeListHead(&pVElan->Link); NdisInitializeListHead(&pVElan->GlobalLink); - + // // Initialize the built-in request structure to signify // that it is used to forward NDIS requests. // pVElan->Request.pVElan = pVElan; NdisInitializeEvent(&pVElan->Request.Event); - + // // Store in the key name. // pVElan->CfgDeviceName.Length = 0; - pVElan->CfgDeviceName.Buffer = (PWCHAR)((PUCHAR)pVElan + - sizeof(VELAN)); - pVElan->CfgDeviceName.MaximumLength = + pVElan->CfgDeviceName.Buffer = (PWCHAR)((PUCHAR)pVElan + + sizeof(VELAN)); + pVElan->CfgDeviceName.MaximumLength = pVElanKey->Length + sizeof(WCHAR); (VOID)NdisUpcaseUnicodeString(&pVElan->CfgDeviceName, pVElanKey); pVElan->CfgDeviceName.Buffer[pVElanKey->Length/sizeof(WCHAR)] = ((WCHAR)0); - // + // // Initialize LastIndicatedStatus to media connect // pVElan->LastIndicatedStatus = NDIS_STATUS_LINK_STATE; @@ -1962,7 +1962,7 @@ Return Value: #ifdef IEEE_VLAN_SUPPORT // // Allocate lookaside list for tag headers. - // + // NdisInitializeNPagedLookasideList ( &pVElan->TagLookaside, NULL, @@ -1974,9 +1974,9 @@ Return Value: #endif // - // Finally link this VELAN to the Adapter's VELAN list. + // Finally link this VELAN to the Adapter's VELAN list. // - PtReferenceVElan(pVElan, (PUCHAR)"adapter"); + PtReferenceVElan(pVElan, (PUCHAR)"adapter"); MUX_ACQUIRE_ADAPT_WRITE_LOCK(pAdapt, &LockState); @@ -1989,7 +1989,7 @@ Return Value: MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); NdisAcquireSpinLock(&GlobalLock); - InsertTailList(&VElanList, &pVElan->GlobalLink); + InsertTailList(&VElanList, &pVElan->GlobalLink); NdisReleaseSpinLock(&GlobalLock);; } while (FALSE); @@ -2034,7 +2034,7 @@ Return Value: NdisFreeSpinLock(&pVElan->PauseLock); #ifdef IEEE_VLAN_SUPPORT - NdisDeleteNPagedLookasideList(&pVElan->TagLookaside); + NdisDeleteNPagedLookasideList(&pVElan->TagLookaside); #endif NdisFreeMemory(pVElan, 0, 0); @@ -2056,11 +2056,11 @@ Routine Description: ASSUMPTION: this is only called in the context of unbinding from the underlying miniport. If it may be called from elsewhere, this should protect itself from re-entrancy. - + Arguments: pVElan - Pointer to VELAN to be stopped. - + Return Value: None @@ -2151,16 +2151,16 @@ Return Value: } else { - if (bMiniportInitCancelled || + if (bMiniportInitCancelled || ((MiniportAdapterHandle == NULL) && !pVElan->MiniportHalting)) { - + // // No NDIS events can come to this VELAN since it // was never initialized as a miniport. We need to unlink // it explicitly here. // - PtUnlinkVElanFromAdapter(pVElan); + PtUnlinkVElanFromAdapter(pVElan); } } @@ -2177,18 +2177,18 @@ PtUnlinkVElanFromAdapter( Routine Description: Utility routine to unlink a VELAN from its parent ADAPT structure. - + Arguments: pVElan - Pointer to VELAN to be unlinked. - + Return Value: None --*/ { - PADAPT pAdapt = pVElan->pAdapt; + PADAPT pAdapt = pVElan->pAdapt; LOCK_STATE LockState; DBGPRINT(MUX_LOUD, ("==> PtUnlinkVElanFromAdapter: VELAN %p, Adapt %p\n", pVElan, pAdapt)); @@ -2198,7 +2198,7 @@ Return Value: // // Remove this VELAN from the global list // - + NdisAcquireSpinLock(&GlobalLock); RemoveEntryList(&pVElan->GlobalLink); NdisReleaseSpinLock(&GlobalLock); @@ -2210,7 +2210,7 @@ Return Value: RemoveEntryList(&pVElan->Link); pAdapt->VElanCount--; - + MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); pVElan->pAdapt = NULL; PtDereferenceVElan(pVElan, (PUCHAR)"adapter"); @@ -2239,7 +2239,7 @@ Arguments: Return Value: Pointer to matching VELAN or NULL if not found. - + --*/ { PLIST_ENTRY p; @@ -2250,7 +2250,7 @@ Return Value: ASSERT_AT_PASSIVE(); - DBGPRINT(MUX_LOUD, ("==> PtFindElan: Adapter %p, ElanKey %ws\n", pAdapt, + DBGPRINT(MUX_LOUD, ("==> PtFindElan: Adapter %p, ElanKey %ws\n", pAdapt, pVElanKey->Buffer)); pVElan = NULL; @@ -2262,8 +2262,8 @@ Return Value: // // Make an up-cased copy of the given string. // - VElanKeyName.Buffer = NdisAllocateMemoryWithTagPriority(pAdapt->BindingHandle, - pVElanKey->MaximumLength, + VElanKeyName.Buffer = NdisAllocateMemoryWithTagPriority(pAdapt->BindingHandle, + pVElanKey->MaximumLength, MUX_TAG, LowPoolPriority); if (VElanKeyName.Buffer == NULL) @@ -2288,13 +2288,13 @@ Return Value: pVElan = CONTAINING_RECORD(p, VELAN, Link); if ((VElanKeyName.Length == pVElan->CfgDeviceName.Length) && - (memcmp(VElanKeyName.Buffer, pVElan->CfgDeviceName.Buffer, + (memcmp(VElanKeyName.Buffer, pVElan->CfgDeviceName.Buffer, VElanKeyName.Length) == 0)) { Found = TRUE; break; } - + p = p->Flink; } @@ -2314,7 +2314,7 @@ Return Value: NdisFreeMemory(VElanKeyName.Buffer, VElanKeyName.Length, 0); } - DBGPRINT(MUX_LOUD, ("<== PtFindElan: Adapter %p, ElanKey %ws, VElan %p\n", pAdapt, + DBGPRINT(MUX_LOUD, ("<== PtFindElan: Adapter %p, ElanKey %ws, VElan %p\n", pAdapt, pVElanKey->Buffer, pVElan)); return pVElan; } @@ -2324,7 +2324,7 @@ NDIS_STATUS PtBootStrapVElans( IN PADAPT pAdapt, IN PNDIS_STRING InstanceName OPTIONAL - + ) /*++ @@ -2348,7 +2348,7 @@ Return Value: NDIS_STRING DeviceStr = NDIS_STRING_CONST("UpperBindings"); PWSTR buffer; LOCK_STATE LockState; - NDIS_CONFIGURATION_OBJECT ConfigObject; + NDIS_CONFIGURATION_OBJECT ConfigObject; DBGPRINT(MUX_LOUD, ("==> PtBootStrapElans: adapter %p\n", pAdapt)); // @@ -2356,7 +2356,7 @@ Return Value: // Status = NDIS_STATUS_SUCCESS; AdapterConfigHandle = NULL; - + do { DBGPRINT(MUX_LOUD, ("PtBootStrapElans: Starting ELANs on adapter %p\n", pAdapt)); @@ -2380,12 +2380,12 @@ Return Value: DBGPRINT(MUX_ERROR, ("PtBootStrapElans: OpenProtocolConfiguration failed\n")); Status = NDIS_STATUS_OPEN_FAILED; break; - } + } // // Read the "UpperBindings" reserved key that contains a list // of device names representing our miniport instances corresponding - // to this lower binding. The UpperBindings is a + // to this lower binding. The UpperBindings is a // MULTI_SZ containing a list of device names. We will loop through // this list and initialize the virtual miniports. // @@ -2408,7 +2408,7 @@ Return Value: while(*buffer != L'\0') { NDIS_STRING DeviceName; - + NdisInitUnicodeString(&DeviceName, buffer); if (InstanceName != NULL) @@ -2422,7 +2422,7 @@ Return Value: else { - Status = PtCreateAndStartVElan(pAdapt, &DeviceName); + Status = PtCreateAndStartVElan(pAdapt, &DeviceName); } if (NDIS_STATUS_SUCCESS != Status) { @@ -2431,19 +2431,19 @@ Return Value: } buffer = (PWSTR)((PUCHAR)buffer + DeviceName.Length + sizeof(WCHAR)); }; - + } while (FALSE); // // Close config handles - // + // if (NULL != AdapterConfigHandle) { NdisCloseConfiguration(AdapterConfigHandle); } // // If the driver cannot create any velan for the adapter - // + // if (Status != NDIS_STATUS_SUCCESS) { MUX_ACQUIRE_ADAPT_WRITE_LOCK(pAdapt, &LockState); @@ -2455,10 +2455,10 @@ Return Value: Status = NDIS_STATUS_SUCCESS; } MUX_RELEASE_ADAPT_WRITE_LOCK(pAdapt, &LockState); - } - + } + DBGPRINT(MUX_LOUD, ("<== PtBootStrapElans: adapter %p, Status %8x\n", pAdapt, Status)); - + return Status; } @@ -2484,7 +2484,7 @@ Return Value: --*/ { - + NdisInterlockedIncrement((PLONG)&pVElan->RefCount); #if !DBG @@ -2506,7 +2506,7 @@ PtDereferenceVElan( Routine Description: - Subtract a reference from an VElan structure. + Subtract a reference from an VElan structure. If the reference count becomes zero, deallocate it. Arguments: @@ -2534,13 +2534,13 @@ Return Value: { // // Free memory if there is no outstanding reference. - // Note: Length field is not required if the memory + // Note: Length field is not required if the memory // is allocated with NdisAllocateMemoryWithTagPriority. // PtDeallocateVElan(pVElan); } - - DBGPRINT(MUX_LOUD, ("DereferenceElan: VElan %p (%s) new count %d\n", + + DBGPRINT(MUX_LOUD, ("DereferenceElan: VElan %p (%s) new count %d\n", pVElan, String, rc)); return (rc); } @@ -2567,13 +2567,13 @@ Return Value: --*/ { - + #if !DBG UNREFERENCED_PARAMETER(String); #endif NdisInterlockedIncrement((PLONG)&pAdapt->RefCount); - + DBGPRINT(MUX_LOUD, ("ReferenceAdapter: Adapter %p (%s) new count %d\n", pAdapt, String, pAdapt->RefCount)); @@ -2589,7 +2589,7 @@ PtDereferenceAdapter( Routine Description: - Subtract a reference from an Adapter structure. + Subtract a reference from an Adapter structure. If the reference count becomes zero, deallocate it. Arguments: @@ -2618,20 +2618,20 @@ Return Value: { // // Free memory if there is no outstanding reference. - // Note: Length field is not required if the memory + // Note: Length field is not required if the memory // is allocated with NdisAllocateMemoryWithTagPriority. // NdisFreeMemory(pAdapt, 0, 0); } - DBGPRINT(MUX_LOUD, ("DereferenceAdapter: Adapter %p (%s) new count %d\n", + DBGPRINT(MUX_LOUD, ("DereferenceAdapter: Adapter %p (%s) new count %d\n", pAdapt, String, rc)); return (rc); } -VOID +VOID PtReceiveNBL( IN NDIS_HANDLE ProtocolBindingContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2642,7 +2642,7 @@ PtReceiveNBL( /*++ Routine Description: - ReceiveNetBufferList handler. + ReceiveNetBufferList handler. Arguments: ProtocolBindingContext Pointer to our PADAPT structure @@ -2673,12 +2673,12 @@ NOTE: This receive code path is not efficient, we will optimize it later. UCHAR Data[6]={0,0,0,0,0,0}; //BOOLEAN DispatchLevel; BOOLEAN bReturnNbl; - + #ifdef IEEE_VLAN_SUPPORT NDIS_STATUS NdisStatus; NDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo; BOOLEAN bAllocatedContext; - PRECV_NBL_ENTRY RecvContext; + PRECV_NBL_ENTRY RecvContext; #endif UNREFERENCED_PARAMETER(NumberOfNetBufferLists); @@ -2702,20 +2702,20 @@ NOTE: This receive code path is not efficient, we will optimize it later. // Return immediately if (pAdapt->PacketFilter == 0) - { + { if (NDIS_TEST_RECEIVE_CAN_PEND(ReceiveFlags) == TRUE) { NdisReturnNetBufferLists(pAdapt->BindingHandle, NetBufferLists, ReturnFlags); - } + } return; } while (NetBufferLists != NULL) { CurrentNetBufferList = NetBufferLists; - + NetBufferLists = NET_BUFFER_LIST_NEXT_NBL(NetBufferLists); NET_BUFFER_LIST_NEXT_NBL(CurrentNetBufferList) = NULL; @@ -2729,7 +2729,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. do { // Collect some information about the packet - pDstMac = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(CurrentNetBufferList), + pDstMac = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(CurrentNetBufferList), 6, (PVOID)Data, 1, @@ -2747,7 +2747,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. bIsBroadcast = ETH_IS_BROADCAST(pDstMac); #ifdef IEEE_VLAN_SUPPORT - // + // // Create Receive context to save information about tag // NdisStatus = NdisAllocateNetBufferListContext(CurrentNetBufferList, @@ -2761,8 +2761,8 @@ NOTE: This receive code path is not efficient, we will optimize it later. bAllocatedContext = TRUE; - RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); - NdisZeroMemory(RecvContext, sizeof(RECV_NBL_ENTRY)); + RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(CurrentNetBufferList); + NdisZeroMemory(RecvContext, sizeof(RECV_NBL_ENTRY)); // // Strip off the VLAN Tag if present @@ -2772,7 +2772,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. // // If the VLAN tag is not present in the buffer, ignore this NBL // - DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p size < VLAN_TAG_HEADER_SIZE\n",CurrentNetBufferList)); + DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p size < VLAN_TAG_HEADER_SIZE\n",CurrentNetBufferList)); break; } @@ -2780,21 +2780,21 @@ NOTE: This receive code path is not efficient, we will optimize it later. { // // If the VLAN info is already in the NBL, take this information it - // - DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p already has Ieee8021QNetBufferListInfo\n",CurrentNetBufferList)); - - RtlCopyMemory((PVOID UNALIGNED) &NdisPacket8021qInfo, &NET_BUFFER_LIST_INFO(CurrentNetBufferList, Ieee8021QNetBufferListInfo),sizeof(NdisPacket8021qInfo)); + // + DBGPRINT(MUX_LOUD,("PtReceiveNBL: NBL %p already has Ieee8021QNetBufferListInfo\n",CurrentNetBufferList)); + + RtlCopyMemory((PVOID UNALIGNED) &NdisPacket8021qInfo, &NET_BUFFER_LIST_INFO(CurrentNetBufferList, Ieee8021QNetBufferListInfo),sizeof(NdisPacket8021qInfo)); } else { - NdisStatus = PtStripVlanTagNB(CurrentNetBufferList, &NdisPacket8021qInfo, RecvContext); + NdisStatus = PtStripVlanTagNB(CurrentNetBufferList, &NdisPacket8021qInfo, RecvContext); if (NdisStatus != NDIS_STATUS_SUCCESS) { break; } } -#endif +#endif // Lock down the VLAN list on the adapter so that no insertions // deletions to this list happen while we loop through it. The packet @@ -2833,7 +2833,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. MUX_DECR_PENDING_RECEIVES(pVElan); continue; } - + NdisAcquireSpinLock(&pVElan->PauseLock); if (!pVElan->Paused) @@ -2894,7 +2894,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. } else { - NdisReleaseSpinLock(&pVElan->PauseLock); + NdisReleaseSpinLock(&pVElan->PauseLock); MUX_DECR_PENDING_RECEIVES(pVElan); } @@ -2906,7 +2906,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. if (bReturnNbl == TRUE) { -#ifdef IEEE_VLAN_SUPPORT +#ifdef IEEE_VLAN_SUPPORT // // Free the context only if we are returning the NBL here. // Otherwise MPReturnNetBufferLists will free it. @@ -2914,9 +2914,9 @@ NOTE: This receive code path is not efficient, we will optimize it later. if (bAllocatedContext) { NdisFreeNetBufferListContext(CurrentNetBufferList, - sizeof(RECV_NBL_ENTRY)); + sizeof(RECV_NBL_ENTRY)); } -#endif +#endif // // The NetBufferList is not pending with any upper protocol. @@ -2933,7 +2933,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. { NET_BUFFER_LIST_NEXT_NBL(LastReturnNetBufferList) = CurrentNetBufferList; } - + LastReturnNetBufferList = CurrentNetBufferList; NET_BUFFER_LIST_NEXT_NBL(LastReturnNetBufferList) = NULL; } @@ -2958,7 +2958,7 @@ NOTE: This receive code path is not efficient, we will optimize it later. } -VOID +VOID PtSendNBLComplete( IN NDIS_HANDLE ProtocolBindingContext, IN PNET_BUFFER_LIST NetBufferLists, @@ -2996,7 +2996,7 @@ Return Value: ProtocolBindingContext,NetBufferLists)); DispatchLevel = NDIS_TEST_SEND_COMPLETE_AT_DISPATCH_LEVEL(SendCompleteFlags); - + while(NetBufferLists) { CurrentNetBufferList = NetBufferLists; @@ -3019,12 +3019,12 @@ Return Value: sizeof(IM_NBL_ENTRY)); #ifdef IEEE_VLAN_SUPPORT - + if ((Flags & MUX_RETREAT_DATA) != 0) { - MPRestoreSendNBL(pVElan, - CurrentNetBufferList, - NULL, + MPRestoreSendNBL(pVElan, + CurrentNetBufferList, + NULL, MdlAllocatedNetBuffers); } @@ -3043,7 +3043,7 @@ Return Value: CurrentNetBufferList, SendCompleteFlags); - + MUX_DECR_PENDING_SENDS(pVElan); MUX_ACQUIRE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); @@ -3056,14 +3056,14 @@ Return Value: } MUX_RELEASE_SPIN_LOCK(&pAdapt->Lock, DispatchLevel); - + } DBGPRINT(MUX_VERY_LOUD,("<== PtSendNBLComplete: ProtocolBindingContext %p, NetBufferLists %p\n",ProtocolBindingContext,NetBufferLists)); } #ifdef IEEE_VLAN_SUPPORT -NDIS_STATUS +NDIS_STATUS PtHandleReceiveTaggingNB( IN PVELAN pVElan, IN PNET_BUFFER_LIST NetBufferList, @@ -3081,7 +3081,7 @@ Routine Description: Arguments: pVElan Pointer to the VELAN structure NetBufferList Pointer to the indicated packet from the lower miniport - NdisPacket8021qInfo 802.1Q tag information + NdisPacket8021qInfo 802.1Q tag information Return Value: NDIS_STATUS_SUCCESS @@ -3101,9 +3101,9 @@ Return Value: DBGPRINT(MUX_VERY_LOUD,("==> PtHandleReceiveTaggingNB: VElan %p, NetBufferList %p, NdisPacket8021qInfo %p\n",pVElan,NetBufferList, NdisPacket8021qInfo)); do { - RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); - RecvContext->Flags = 0; - + RecvContext = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); + RecvContext->Flags = 0; + // // If the vlan ID of the virtual miniport is 0, the miniport should // act like it doesn't support VELAN tag processing @@ -3144,7 +3144,7 @@ Return Value: MUX_INCR_STATISTICS(&pVElan->RcvVlanIdErrors); break; - } + } Storage=NULL; pFrame = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(NetBufferList), 2 * ETH_LENGTH_OF_ADDRESS + VLAN_TAG_HEADER_SIZE, @@ -3158,9 +3158,9 @@ Return Value: Status = NDIS_STATUS_INVALID_PACKET; break; } - + pTpid = (USHORT UNALIGNED *)((PUCHAR)pFrame + 2 * ETH_LENGTH_OF_ADDRESS); - + // //Strip header only if it's present in the packet // @@ -3175,8 +3175,8 @@ Return Value: RtlMoveMemory(pDst, pFrame, 2 * ETH_LENGTH_OF_ADDRESS); - NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = NdisPacket8021qInfo->Value; - + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = NdisPacket8021qInfo->Value; + NdisAdvanceNetBufferDataStart(NET_BUFFER_LIST_FIRST_NB(NetBufferList), VLAN_TAG_HEADER_SIZE, FALSE, @@ -3189,7 +3189,7 @@ Return Value: return Status; } -NDIS_STATUS +NDIS_STATUS PtStripVlanTagNB( IN PNET_BUFFER_LIST NetBufferList, OUT PNDIS_NET_BUFFER_LIST_8021Q_INFO NdisPacket8021qInfo, @@ -3218,7 +3218,7 @@ Return Value: PVOID pFrame = NULL; NDIS_STATUS Status = NDIS_STATUS_SUCCESS; PVOID Storage; - + DBGPRINT(MUX_VERY_LOUD,("==> PtStripVlanTagNB: NetBufferList %p, NdisPacket8021qInfo %p\n",NetBufferList, NdisPacket8021qInfo)); do @@ -3254,14 +3254,14 @@ Return Value: COPY_TAG_INFO_FROM_HEADER_TO_PACKET_INFO(*NdisPacket8021qInfo, pTagHeader); RtlCopyMemory((PVOID UNALIGNED) &RecvContext->TagHeader, pTagHeader, 2); - + } while(FALSE); DBGPRINT(MUX_VERY_LOUD,("<== PtStripVlanTagNB: NetBufferList %p, NdisPacket8021qInfo %p, Status %8x\n",NetBufferList, NdisPacket8021qInfo, Status)); return Status; } -NDIS_STATUS +NDIS_STATUS PtRestoreReceiveNBL( IN PNET_BUFFER_LIST NetBufferList ) @@ -3288,7 +3288,7 @@ Return Value: do { - ReceiveNblEntry = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); + ReceiveNblEntry = (PRECV_NBL_ENTRY) NET_BUFFER_LIST_CONTEXT_DATA_START(NetBufferList); // // Check ifthe NBL was modified @@ -3297,7 +3297,7 @@ Return Value: { break; } - + // // Retreat the net buffer list // @@ -3310,10 +3310,10 @@ Return Value: { break; } - + // // Find the start address of the frame - // + // Storage=NULL; pFrame = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(NetBufferList), 2 * ETH_LENGTH_OF_ADDRESS + VLAN_TAG_HEADER_SIZE, @@ -3325,7 +3325,7 @@ Return Value: { ASSERT(0); Status = NDIS_STATUS_INVALID_PACKET; - break; + break; } // @@ -3333,13 +3333,13 @@ Return Value: // original state // Tpid = TPID; - + NdisMoveMemory(pFrame, pFrame + VLAN_TAG_HEADER_SIZE, (2 * ETH_LENGTH_OF_ADDRESS)); - + NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS), &Tpid, 2); - + NdisMoveMemory(pFrame + (2 * ETH_LENGTH_OF_ADDRESS) + sizeof(Tpid), &ReceiveNblEntry->TagHeader, 2); - + NET_BUFFER_LIST_INFO(NetBufferList, Ieee8021QNetBufferListInfo) = 0; } while (FALSE); diff --git a/network/ndis/mux/driver/60/public.h b/network/ndis/mux/driver/60/public.h index 972939c7..ddf13b24 100644 --- a/network/ndis/mux/driver/60/public.h +++ b/network/ndis/mux/driver/60/public.h @@ -12,7 +12,7 @@ Abstract: Author: - + Environment: user and kernel diff --git a/network/ndis/mux/driver/60/vlan/muxvlan.vcxproj b/network/ndis/mux/driver/60/vlan/muxvlan.vcxproj index eb2ff474..0bb361ce 100644 --- a/network/ndis/mux/driver/60/vlan/muxvlan.vcxproj +++ b/network/ndis/mux/driver/60/vlan/muxvlan.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{015D7470-0FC8-4597-A67E-BD9C754F0681}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{261E8436-6685-4860-962C-AF3076B35DB9}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -113,13 +113,13 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <AdditionalOptions>%(AdditionalOptions) /GS</AdditionalOptions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -127,19 +127,19 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <AdditionalOptions>%(AdditionalOptions) /GS</AdditionalOptions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> @@ -165,13 +165,13 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <AdditionalOptions>%(AdditionalOptions) /GS</AdditionalOptions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -179,15 +179,15 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT</PreprocessorDefinitions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);IEEE_VLAN_SUPPORT=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> @@ -211,9 +211,10 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..</AdditionalIncludeDirectories> @@ -230,7 +231,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> @@ -249,7 +250,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> </Link> @@ -308,6 +309,14 @@ <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> + <FilesToPackage Include="$(SolutionDir)notifyob\arm64\Release\mux.dll" Condition="'$(Configuration)|$(Platform)'=='Release|arm64'"> + <PackageRelativeDirectory> + </PackageRelativeDirectory> + </FilesToPackage> + <FilesToPackage Include="$(SolutionDir)notifyob\arm64\Debug\mux.dll" Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'"> + <PackageRelativeDirectory> + </PackageRelativeDirectory> + </FilesToPackage> <Inf Exclude="@(Inf)" Include="*.inf" /> <Inf Include="..\muxp.inf" /> <Inf Include="..\mux_mp.inf" /> diff --git a/network/ndis/mux/mux.sln b/network/ndis/mux/mux.sln index bf78d7a4..67f60d69 100644 --- a/network/ndis/mux/mux.sln +++ b/network/ndis/mux/mux.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33213.308 @@ -27,34 +27,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mux", "notifyob\mux.vcxproj EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|Win32.ActiveCfg = Debug|Win32 - {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|Win32.Build.0 = Debug|Win32 + {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|ARM64.Build.0 = Debug|ARM64 + {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|ARM64.Build.0 = Debug|ARM64 + {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|ARM64.Build.0 = Debug|ARM64 + {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|ARM64.ActiveCfg = Release|ARM64 + {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|ARM64.Build.0 = Release|ARM64 + {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|ARM64.ActiveCfg = Release|ARM64 + {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|ARM64.Build.0 = Release|ARM64 + {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|ARM64.ActiveCfg = Release|ARM64 + {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|ARM64.Build.0 = Release|ARM64 {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|x64.ActiveCfg = Debug|x64 {015D7470-0FC8-4597-A67E-BD9C754F0681}.Debug|x64.Build.0 = Debug|x64 - {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|Win32.ActiveCfg = Release|Win32 - {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|Win32.Build.0 = Release|Win32 {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|x64.ActiveCfg = Release|x64 {015D7470-0FC8-4597-A67E-BD9C754F0681}.Release|x64.Build.0 = Release|x64 - {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|Win32.ActiveCfg = Debug|Win32 - {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|Win32.Build.0 = Debug|Win32 {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|x64.ActiveCfg = Debug|x64 {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Debug|x64.Build.0 = Debug|x64 - {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|Win32.ActiveCfg = Release|Win32 - {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|Win32.Build.0 = Release|Win32 {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|x64.ActiveCfg = Release|x64 {B2DE2C37-B3F2-491E-94AE-402A7B4D3308}.Release|x64.Build.0 = Release|x64 - {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|Win32.ActiveCfg = Debug|Win32 - {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|Win32.Build.0 = Debug|Win32 {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|x64.ActiveCfg = Debug|x64 {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Debug|x64.Build.0 = Debug|x64 - {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|Win32.ActiveCfg = Release|Win32 - {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|Win32.Build.0 = Release|Win32 {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|x64.ActiveCfg = Release|x64 {92E3B437-C258-47FB-8856-D3FEA56A3BCC}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/network/ndis/mux/notifyob/adapter.cpp b/network/ndis/mux/notifyob/adapter.cpp index a208aa57..99bfe6e8 100644 --- a/network/ndis/mux/notifyob/adapter.cpp +++ b/network/ndis/mux/notifyob/adapter.cpp @@ -114,7 +114,7 @@ CMuxPhysicalAdapter::~CMuxPhysicalAdapter (VOID) // // Function: CMuxPhysicalAdapter::LoadConfiguration // -// Purpose: Read the registry to get the device IDs of the +// Purpose: Read the registry to get the device IDs of the // virtual miniports installed on the adapter and // crate an instance to represent each virtual miniport. // @@ -142,7 +142,7 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) TraceMsg( L"-->CMuxPhysicalAdapter::LoadConfiguration.\n" ); // - // Build the registry key using the adapter guid under which + // Build the registry key using the adapter guid under which // device IDs of the virtual miniports are stored. // @@ -159,7 +159,7 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) L"%s\\%s", c_szAdapterList, szAdapterGuid ); - + szAdapterGuidKey[MAX_PATH]='\0'; lResult = RegCreateKeyExW( HKEY_LOCAL_MACHINE, szAdapterGuidKey, @@ -211,14 +211,14 @@ HRESULT CMuxPhysicalAdapter::LoadConfiguration (VOID) if ( lResult == ERROR_SUCCESS ) { lpMiniport = lpMiniportList; - + #ifndef PASSTHRU_NOTIFY // // In case of mux, c_szUpperBindings is a REG_MULTI_SZ string. // - + lpMiniport[dwBytes-1] = '\0'; while ( wcslen(lpMiniport) ) { @@ -510,14 +510,14 @@ HRESULT CMuxPhysicalAdapter::Remove (VOID) // // Arguments: // IN eApplyAction: Action that was last performed. -// +// // // Returns: S_OK. // // Notes: // More than one action could have been performed by the user // but this function is called only once at the end. So, the argument -// only denotes the very last action performed. For example, if the +// only denotes the very last action performed. For example, if the // user deletes one miniport and adds two miniports then, the argument // will denote an add action. // @@ -705,14 +705,14 @@ HRESULT CMuxPhysicalAdapter::ApplyRegistryChanges (ConfigAction eApplyAction) // Arguments: // IN pfCallback : SendPnpConfig Callback interface. // IN eApplyAction: Action that was last performed. -// +// // // Returns: S_OK. // // Notes: // More than one action could have been performed by the user // but this function is called only once at the end. So, the argument -// only denotes the very last action performed. For example, if the +// only denotes the very last action performed. For example, if the // user deletes one miniport and adds two miniports then, the argument // will denote an add action. // @@ -727,7 +727,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( DWORD i; HRESULT hr; -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS LPWSTR lpDevice; WCHAR szMiniportGuid[MAX_PATH+1]; DWORD dwBytes; @@ -739,7 +739,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( UNREFERENCED_PARAMETER(eApplyAction); TraceMsg( L"-->CMuxPhysicalAdapter::ApplyPnpChanges.\n" ); -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS // // Find the instance of the adapter to get its bindname. @@ -767,7 +767,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( hr ); } -#endif +#endif dwMiniportCount = m_MiniportsToAdd.ListCount(); @@ -848,7 +848,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( } free( lpDevice ); } -#endif +#endif } dwMiniportCount = m_MiniportsToRemove.ListCount(); @@ -935,11 +935,11 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( free( lpDevice ); } } -#endif +#endif } -#ifdef CUSTOM_EVENTS +#ifdef CUSTOM_EVENTS CoTaskMemFree( lpszBindName ); #endif @@ -956,7 +956,7 @@ HRESULT CMuxPhysicalAdapter::ApplyPnpChanges( // Purpose: Cancel any changes made. // // Arguments: None -// +// // // Returns: S_OK. // @@ -980,7 +980,7 @@ HRESULT CMuxPhysicalAdapter::CancelChanges (VOID) // Purpose: Find out if there is no miniport installed on the adapter. // // Arguments: None -// +// // // Returns: TRUE if all the miniports associated with this adapter have been // uninstalled and there is none pending to be added, otherwise FALSE. diff --git a/network/ndis/mux/notifyob/common.cpp b/network/ndis/mux/notifyob/common.cpp index 5ca2ca7f..671d08f5 100644 --- a/network/ndis/mux/notifyob/common.cpp +++ b/network/ndis/mux/notifyob/common.cpp @@ -103,8 +103,8 @@ void DumpBindingPath (INetCfgBindingPath *pncbp) IEnumNetCfgBindingInterface *pencbi; INetCfgBindingInterface *pncbi; DWORD dwIndex; - ULONG ulCount; -#endif + ULONG ulCount; +#endif hr = pncbp->GetPathToken( &lpsz ); @@ -190,9 +190,9 @@ void DumpBindingPath (INetCfgBindingPath *pncbp) else { TraceMsg( L" EnumBindingInterfaces failed, (HRESULT = %x)\n", - hr ); + hr ); } -#endif +#endif return; } @@ -203,7 +203,7 @@ void DumpComponent (INetCfgComponent *pncc) ULONG ulStatus; HRESULT hr; hr = pncc->GetDisplayName( &lpsz ); - + if ( hr == S_OK ) { TraceMsg( L" \t\tComponent: %s\n", @@ -393,7 +393,7 @@ HRESULT HrFindInstance (INetCfg *pnc, *ppnccMiniport = pncc; } } - } + } ReleaseObj( pencc ); } @@ -552,14 +552,14 @@ DeleteFromMultiSzValue ( lpCurrentValueTemp[dwLen-1]='\0'; while( wcslen(lpCurrentValueTemp) > 0) { - //if a register in the existing register sequence do not match szMiniportGuid, copy to new register sequence + //if a register in the existing register sequence do not match szMiniportGuid, copy to new register sequence if ( _wcsicmp(lpCurrentValueTemp, szMiniportGuid) != 0 ) { StringCchCopyW ( lpNewValueTemp, wcslen(lpCurrentValueTemp), //size of the register lpCurrentValueTemp ); - + *(lpNewValueTemp+=wcslen(lpCurrentValueTemp)+1)='\0'; - + lpNewValueTemp += wcslen(lpNewValueTemp) + 1; dwNewLen += (DWORD)wcslen(lpNewValueTemp) + 1; } @@ -605,7 +605,7 @@ AddDevicePrefix ( LPWSTR lpNewStr; size_t cchNewStr = wcslen(lpStr) + wcslen(c_szDevicePrefix) + 1; - lpNewStr = (LPWSTR)malloc( cchNewStr * sizeof(WCHAR) ); + lpNewStr = (LPWSTR)malloc( cchNewStr * sizeof(WCHAR) ); if ( lpNewStr ) { StringCchCopyW (lpNewStr, diff --git a/network/ndis/mux/notifyob/common.h b/network/ndis/mux/notifyob/common.h index 517641f7..4e6896ca 100644 --- a/network/ndis/mux/notifyob/common.h +++ b/network/ndis/mux/notifyob/common.h @@ -27,14 +27,14 @@ enum ConfigAction { - eActUnknown, - eActInstall, - eActAdd, + eActUnknown, + eActInstall, + eActAdd, eActRemove, eActUpdate, eActPropertyUIAdd, eActPropertyUIRemove -}; +}; // // PnP ID, also referred to as Hardware ID, of the protocol interface. diff --git a/network/ndis/mux/notifyob/dllmain.cpp b/network/ndis/mux/notifyob/dllmain.cpp index 636f2c8a..e91c1d74 100644 --- a/network/ndis/mux/notifyob/dllmain.cpp +++ b/network/ndis/mux/notifyob/dllmain.cpp @@ -80,7 +80,7 @@ STDAPI DllCanUnloadNow(void) TraceMsg( L"-->DllCanUnloadNow(HRESULT = %x).\n", hr ); - return hr; + return hr; } ///////////////////////////////////////////////////////////////////////////// diff --git a/network/ndis/mux/notifyob/list.h b/network/ndis/mux/notifyob/list.h index b52b75e7..0ba64b45 100644 --- a/network/ndis/mux/notifyob/list.h +++ b/network/ndis/mux/notifyob/list.h @@ -5,7 +5,7 @@ // // File: LIST . H // -// Contents: +// Contents: // // Notes: List manipulation functions. // @@ -20,7 +20,7 @@ #include <windows.h> -template<class X, class Y> class List { +template<class X, class Y> class List { struct Node { X item; Y key; @@ -107,7 +107,7 @@ template<class X, class Y> HRESULT List<X, Y>::Remove (X *item) return S_OK; } - + template<class X, class Y> HRESULT List<X, Y>::RemoveThis (X item) { Node *temp; diff --git a/network/ndis/mux/notifyob/mux.vcxproj b/network/ndis/mux/notifyob/mux.vcxproj index dc1e2897..743ea90a 100644 --- a/network/ndis/mux/notifyob/mux.vcxproj +++ b/network/ndis/mux/notifyob/mux.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{92E3B437-C258-47FB-8856-D3FEA56A3BCC}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{67118C02-9183-4F2D-8E60-3D4F02B62EA9}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>mux</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>mux</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -100,11 +100,10 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -117,11 +116,10 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -134,11 +132,10 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -151,8 +148,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;DISABLE_PROTOCOLS_TO_PHYSICAL</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -163,7 +159,7 @@ <AdditionalOptions>%(AdditionalOptions) -i $(IntDir) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Midl> <AdditionalOptions>%(AdditionalOptions) -no_format_opt</AdditionalOptions> </Midl> @@ -171,7 +167,7 @@ <AdditionalOptions>%(AdditionalOptions) -i $(IntDir) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> <AdditionalOptions>%(AdditionalOptions) -no_format_opt</AdditionalOptions> </Midl> @@ -179,7 +175,7 @@ <AdditionalOptions>%(AdditionalOptions) -i $(IntDir) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Midl> <AdditionalOptions>%(AdditionalOptions) -no_format_opt</AdditionalOptions> </Midl> @@ -193,19 +189,19 @@ <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> @@ -214,13 +210,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -229,19 +225,19 @@ <ModuleDefinitionFile>mux.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> <ModuleDefinitionFile>mux.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> <ModuleDefinitionFile>mux.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> <ModuleDefinitionFile>mux.def</ModuleDefinitionFile> diff --git a/network/ndis/mux/notifyob/notify.RC b/network/ndis/mux/notifyob/notify.RC index 4888e305..78a8eb95 100644 --- a/network/ndis/mux/notifyob/notify.RC +++ b/network/ndis/mux/notifyob/notify.RC @@ -19,7 +19,7 @@ FONT 8, "MS Shell Dlg" BEGIN CONTROL "Remove a Miniport",IDC_REMOVE,"Button", BS_AUTORADIOBUTTON | WS_TABSTOP,39,73,75,10 - CONTROL "Add a Miniport",IDC_ADD,"Button",BS_AUTORADIOBUTTON | + CONTROL "Add a Miniport",IDC_ADD,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,36,61,10 LTEXT "Removal of miniport happens in FIFO order",IDC_STATIC, 39,93,135,8 diff --git a/network/ndis/mux/notifyob/notify.cpp b/network/ndis/mux/notifyob/notify.cpp index 3d0a55ff..542e12e1 100644 --- a/network/ndis/mux/notifyob/notify.cpp +++ b/network/ndis/mux/notifyob/notify.cpp @@ -6,7 +6,7 @@ // File: N O T I F Y . C P P // // Contents: Sample notify object code -// +// // Notes: // // Author: Alok Sinha @@ -103,10 +103,10 @@ CMuxNotify::~CMuxNotify (VOID) // //---------------------------------------------------------------------------- -// INetCfgComponentControl -// +// INetCfgComponentControl +// // The following functions provide the INetCfgComponentControl interface. -// +// //---------------------------------------------------------------------------- // @@ -125,7 +125,7 @@ CMuxNotify::~CMuxNotify (VOID) // STDMETHODIMP CMuxNotify::Initialize (INetCfgComponent* pncc, - INetCfg* pnc, + INetCfg* pnc, BOOL fInstalling) { HRESULT hr = S_OK; @@ -150,7 +150,7 @@ STDMETHODIMP CMuxNotify::Initialize (INetCfgComponent* pncc, // - // If this not an installation, then we need to + // If this not an installation, then we need to // initialize all of our data and classes // @@ -222,7 +222,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) m_AdaptersToAdd.Find( i, &pAdapter ); - + pAdapter->ApplyRegistryChanges( eActAdd ); } @@ -240,7 +240,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) m_AdaptersToRemove.Find( i, &pAdapter ); - + pAdapter->ApplyRegistryChanges( eActRemove ); } @@ -276,7 +276,7 @@ STDMETHODIMP CMuxNotify::ApplyRegistryChanges(VOID) // // Returns: S_OK. // -// Notes: +// Notes: STDMETHODIMP CMuxNotify::ApplyPnpChanges ( INetCfgPnpReconfigCallback* pfCallback) @@ -353,10 +353,10 @@ STDMETHODIMP CMuxNotify::ApplyPnpChanges ( //---------------------------------------------------------------------------- -// INetCfgComponentSetup -// +// INetCfgComponentSetup +// // The following functions provide the INetCfgComponentSetup interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -445,7 +445,7 @@ STDMETHODIMP CMuxNotify::ReadAnswerFile (PCWSTR pszAnswerFile, UNREFERENCED_PARAMETER(pszAnswerFile); UNREFERENCED_PARAMETER(pszAnswerSection); - + TraceMsg( L"-->CMuxNotify INetCfgSetup::ReadAnswerFile.\n" ); // We will pretend here that szParamReadFromAnswerFile was actually @@ -498,20 +498,20 @@ STDMETHODIMP CMuxNotify::Removing (VOID) //---------------------------------------------------------------------------- -// INetCfgComponentNotifyBinding -// +// INetCfgComponentNotifyBinding +// // The following functions provide the INetCfgComponentNotifyBinding interface. -// +// //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // // Function: CMuxNotify::QueryBindingPath // -// Purpose: This is specific to the component being installed. This will +// Purpose: This is specific to the component being installed. This will // ask us if we want to bind to the Item being passed into // this routine. We can disable the binding by returning -// NETCFG_S_DISABLE_QUERY +// NETCFG_S_DISABLE_QUERY // // // Arguments: @@ -522,7 +522,7 @@ STDMETHODIMP CMuxNotify::Removing (VOID) // // Notes: // -STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, +STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, IN INetCfgBindingPath *pncbp) { UNREFERENCED_PARAMETER(pncbp); @@ -543,7 +543,7 @@ STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, // // Function: CMuxNotify::NotifyBindingPath // -// Purpose: We are now being told to bind to the component passed to us. +// Purpose: We are now being told to bind to the component passed to us. // // // Arguments: @@ -557,7 +557,7 @@ STDMETHODIMP CMuxNotify::QueryBindingPath (IN DWORD dwChangeFlag, -STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, +STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, IN INetCfgBindingPath *pncbp) { INetCfgComponent *pnccLower; @@ -608,7 +608,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, // // We are interested only in binding to a // physical ethernet adapters. - // + // if ( dwCharcteristics & NCF_PHYSICAL ) { @@ -631,7 +631,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, m_eApplyAction = eActRemove; } } - } // Physical Adapters. + } // Physical Adapters. else if (dwCharcteristics & NCF_VIRTUAL) { } @@ -651,7 +651,7 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, } // Got the upper and lower components. - } + } TraceMsg( L"<--CMuxNotify INetCfgNotifyBinding::NotifyBindingPath(HRESULT = %x).\n", S_OK ); @@ -664,9 +664,9 @@ STDMETHODIMP CMuxNotify::NotifyBindingPath (IN DWORD dwChangeFlag, //---------------------------------------------------------------------------- // INetCfgComponentNotifyGlobal -// +// // The following functions provide the INetCfgComponentNotifyGlobal interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -749,9 +749,9 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, if ( hr == S_OK ) { // - // We are interested only in bindings to physical + // We are interested only in bindings to physical // ethernet adapters. - // + // if ( dwCharcteristics & NCF_PHYSICAL ) { @@ -774,7 +774,7 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, } #endif - } // Physical Adapters. + } // Physical Adapters. else { if (dwCharcteristics & NCF_VIRTUAL) { @@ -784,7 +784,7 @@ STDMETHODIMP CMuxNotify::SysQueryBindingPath (DWORD dwChangeFlag, if ( !_wcsicmp(pszwInfIdLower, c_szMuxMiniport) && !_wcsicmp(pszwInfIdUpper, c_szMuxProtocol) ) { - + TraceMsg( L" Disabling the binding between %s " L"and %s.\n", pszwInfIdUpper, @@ -886,10 +886,10 @@ STDMETHODIMP CMuxNotify::SysNotifyComponent (DWORD dwChangeFlag, //---------------------------------------------------------------------------- -// INetCfgComponentPropertyUi -// +// INetCfgComponentPropertyUi +// // The following functions provide the INetCfgComponentPropertyUi interface. -// +// //---------------------------------------------------------------------------- // ---------------------------------------------------------------------- @@ -1034,7 +1034,7 @@ STDMETHODIMP CMuxNotify::CancelProperties (VOID) // // Returns: S_OK on success, otherwise an error code // -// Notes: +// Notes: // STDMETHODIMP CMuxNotify::ApplyProperties (VOID) { @@ -1118,7 +1118,7 @@ STDMETHODIMP CMuxNotify::QueryPropertyUi (IUnknown * pUnk) reinterpret_cast<PVOID *>(&pLanConnUiInfo)); ReleaseObj( pLanConnUiInfo ); - } + } #endif TraceMsg(L"<--CMuxNotify INetCfgPropertyUi::QueryPropertyUi(HRESULT = %x).\n", @@ -1133,7 +1133,7 @@ STDMETHODIMP CMuxNotify::QueryPropertyUi (IUnknown * pUnk) // // Purpose: Save the LAN connection context. // -// Arguments: +// Arguments: // IN pUnk: Pointer to IUnknown. // // Returns: S_OK on success, otherwise an error code @@ -1169,7 +1169,7 @@ STDMETHODIMP CMuxNotify::SetContext (IUnknown * pUnk) // // Function: CMuxNotify::HrLoadAdapterConfiguration // -// Purpose: This loads the Miniport and adapters that have already been +// Purpose: This loads the Miniport and adapters that have already been // installed into our own data structures // // Arguments: None. @@ -1209,7 +1209,7 @@ HRESULT CMuxNotify::HrLoadAdapterConfiguration (VOID) // // If dwDisp indicates that a new key is created then, we know there // is no adapter currently listed underneath and we simply - // return, otherwise, we enumerate the subkeys, each one representing an + // return, otherwise, we enumerate the subkeys, each one representing an // adapter. // @@ -1299,7 +1299,7 @@ HRESULT CMuxNotify::HrLoadAdapterConfiguration (VOID) // Purpose: Get the upper and lower component of the first interface // of a binding path. // -// Arguments: +// Arguments: // IN pncbp : Binding path. // OUT ppnccUpper: Upper component. // OUT ppnccLower: Lower component. @@ -1327,7 +1327,7 @@ HRESULT CMuxNotify::HrGetUpperAndLower (INetCfgBindingPath* pncbp, hr = pncbp->EnumBindingInterfaces(&pencbi); if (S_OK == hr) { - + // // get the first binding interface // @@ -1368,7 +1368,7 @@ HRESULT CMuxNotify::HrGetUpperAndLower (INetCfgBindingPath* pncbp, // Purpose: Create an instance representing the physical adapter and install // a virtual miniport. // -// Arguments: +// Arguments: // IN pnccAdapter: Pointer to the physical adapter. // // Returns: S_OK, or an error. @@ -1411,7 +1411,7 @@ HRESULT CMuxNotify::HrAddAdapter (INetCfgComponent *pnccAdapter) else { hr = HRESULT_FROM_WIN32( ERROR_NOT_ENOUGH_MEMORY ); } - } + } TraceMsg( L"<--CMuxNotify::HrAddAdapter(HRESULT = %x).\n", hr ); @@ -1426,7 +1426,7 @@ HRESULT CMuxNotify::HrAddAdapter (INetCfgComponent *pnccAdapter) // Purpose: Deletes the instance representing the physical adapter // and uninstalls all the virtual miniports. // -// Arguments: +// Arguments: // IN pnccAdapter: Pointer to the physical adapter. // // Returns: S_OK, or an error. @@ -1453,7 +1453,7 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) if ( hr == S_OK ) { - m_AdaptersToRemove.Insert( pAdapter, + m_AdaptersToRemove.Insert( pAdapter, guidAdapter ); hr = pAdapter->Remove(); @@ -1463,7 +1463,7 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) // Restore the bindings of other protocols to the physical // adapter. // - + EnableBindings( pnccAdapter, TRUE ); #endif @@ -1482,14 +1482,14 @@ HRESULT CMuxNotify::HrRemoveAdapter (INetCfgComponent *pnccAdapter) // // Purpose: Installs a virtual miniport. // -// Arguments: +// Arguments: // IN pAdapter : Pointer to the physical adapter class instance. // IN pguidAdapter: Pointer to the GUID of the adapter. // // Returns: S_OK, or an error. // // -// Notes: +// Notes: // HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, @@ -1502,15 +1502,15 @@ HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, TraceMsg( L"-->CMuxNotify::HrAddMiniport.\n" ); // - // Limit the number of virtual miniports + // Limit the number of virtual miniports // if ((pAdapter->MiniportCount() + pAdapter->MiniportAddCount()) >= MAX_VIRTUAL_MP_PER_ADAPTER) { - hr = HRESULT_FROM_WIN32( ERROR_NO_SYSTEM_RESOURCES ); + hr = HRESULT_FROM_WIN32( ERROR_NO_SYSTEM_RESOURCES ); TraceMsg( L" Virtual miniport limit reached\n" ); } - if ( hr == S_OK ) + if ( hr == S_OK ) { #pragma prefast(suppress:8197, "The instance is freed in the destructor") pMiniport = new CMuxVirtualMiniport( m_pnc, @@ -1578,14 +1578,14 @@ HRESULT CMuxNotify::HrAddMiniport (CMuxPhysicalAdapter *pAdapter, // // Purpose: Uninstalls a virtual miniport. // -// Arguments: +// Arguments: // IN pAdapter : Pointer to the physical adapter class instance. // IN pguidAdapter: Pointer to the GUID of the adapter. // // Returns: S_OK, or an error. // // -// Notes: +// Notes: // HRESULT CMuxNotify::HrRemoveMiniport (CMuxPhysicalAdapter *pAdapter, @@ -1673,7 +1673,7 @@ LRESULT CMuxNotify::OnOk (IN HWND hWndPage) if ( ::SendMessage(GetDlgItem(hWndPage, IDC_ADD), BM_GETCHECK, 0, 0) == BST_CHECKED ) { - + m_eApplyAction = eActPropertyUIAdd; } else { @@ -1785,7 +1785,7 @@ INT_PTR CALLBACK NotifyDialogProc (HWND hWnd, LPNMHDR pnmh = (LPNMHDR)lParam; switch (pnmh->code) { - + case PSN_KILLACTIVE: // @@ -1851,7 +1851,7 @@ UINT CALLBACK NotifyPropSheetPageProc(HWND hWnd, // // Function: CMuxNotify::EnableBindings // -// Purpose: Enable/Disable the bindings of other protocols to +// Purpose: Enable/Disable the bindings of other protocols to // the physical adapter. // // Arguments: @@ -1869,7 +1869,7 @@ VOID CMuxNotify::EnableBindings (INetCfgComponent *pnccAdapter, IEnumNetCfgBindingPath *pencbp; INetCfgBindingPath *pncbp; HRESULT hr; - + TraceMsg( L"-->CMuxNotify::EnableBindings.\n" ); diff --git a/network/ndis/mux/notifyob/notify.h b/network/ndis/mux/notifyob/notify.h index 08f16e00..4d5cc936 100644 --- a/network/ndis/mux/notifyob/notify.h +++ b/network/ndis/mux/notifyob/notify.h @@ -43,7 +43,7 @@ class CMuxNotify : // Must inherit from CComObjectRoot(Ex) for reference count // management and default threading model. // - + public CComObjectRoot, // @@ -185,7 +185,7 @@ class CMuxNotify : STDMETHOD (SysNotifyBindingPath) ( IN DWORD dwChangeFlag, IN INetCfgBindingPath* pncbp); - + STDMETHOD (SysNotifyComponent) ( IN DWORD dwChangeFlag, IN INetCfgComponent* pncc); diff --git a/network/ndis/mux/notifyob/notifyn.idl b/network/ndis/mux/notifyob/notifyn.idl index 319ddbfd..bcdd6b67 100644 --- a/network/ndis/mux/notifyob/notifyn.idl +++ b/network/ndis/mux/notifyob/notifyn.idl @@ -5,7 +5,7 @@ // // File: NOTIFYN.IDL // -// Contents: +// Contents: // // Notes: // diff --git a/network/ndis/mux/notifyob/public.h b/network/ndis/mux/notifyob/public.h index 3d6147fc..25be17d5 100644 --- a/network/ndis/mux/notifyob/public.h +++ b/network/ndis/mux/notifyob/public.h @@ -12,7 +12,7 @@ Abstract: Author: - + Environment: user and kernel diff --git a/network/ndis/mux/notifyob/virtual.cpp b/network/ndis/mux/notifyob/virtual.cpp index fd3cce0e..da5c1690 100644 --- a/network/ndis/mux/notifyob/virtual.cpp +++ b/network/ndis/mux/notifyob/virtual.cpp @@ -173,10 +173,10 @@ HRESULT CMuxVirtualMiniport::Install (VOID) INetCfgComponent *pnccMiniport; HRESULT hr; LPWSTR *pmszwRefs=NULL; - OBO_TOKEN *pOboToken=NULL; + OBO_TOKEN *pOboToken=NULL; DWORD dwSetupFlags=0; LPCWSTR pszwAnswerFile=NULL; - LPCWSTR pszwAnswerSections=NULL; + LPCWSTR pszwAnswerSections=NULL; TraceMsg( L"-->CMuxVirtualMiniport::Install.\n" ); @@ -189,7 +189,7 @@ HRESULT CMuxVirtualMiniport::Install (VOID) hr = pncClass->QueryInterface( IID_INetCfgClassSetup, (void **)&pncClassSetup ); if ( hr == S_OK ) { - + hr = pncClassSetup->Install( c_szMuxMiniport, pOboToken, dwSetupFlags, @@ -205,7 +205,7 @@ HRESULT CMuxVirtualMiniport::Install (VOID) TraceMsg( L" Failed to get the instance guid, uninstalling " L" the miniport.\n" ); - + pncClassSetup->DeInstall( pnccMiniport, pOboToken, pmszwRefs ); @@ -278,7 +278,7 @@ HRESULT CMuxVirtualMiniport::DeInstall (VOID) if ( hr == S_OK ) { TraceMsg( L" Found the miniport instance to uninstall.\n" ); - + hr = pncClassSetup->DeInstall( pnccMiniport, pOboToken, pmszwRefs ); @@ -351,7 +351,7 @@ HRESULT CMuxVirtualMiniport::ApplyRegistryChanges(ConfigAction eApplyAction) L"%s\\%s", c_szAdapterList, szAdapterGuid ); - + szAdapterGuidKey[MAX_PATH]='\0'; lResult = RegCreateKeyExW( HKEY_LOCAL_MACHINE, szAdapterGuidKey, @@ -509,7 +509,7 @@ HRESULT CMuxVirtualMiniport::ApplyRegistryChanges(ConfigAction eApplyAction) // // Function: CMuxVirtualMiniport::ApplyPnpChanges // -// Purpose: +// Purpose: // // Arguments: // IN eApplyAction: Action performed. diff --git a/network/ndis/mux/notifyob/virtual.h b/network/ndis/mux/notifyob/virtual.h index 5cb8f050..dd31ea74 100644 --- a/network/ndis/mux/notifyob/virtual.h +++ b/network/ndis/mux/notifyob/virtual.h @@ -48,7 +48,7 @@ class CMuxVirtualMiniport GUID *guidAdapter); virtual ~CMuxVirtualMiniport(VOID); - + HRESULT LoadConfiguration(VOID); VOID GetAdapterGUID (GUID *); diff --git a/network/ndis/ndisprot/6x/ndisprot60.sln b/network/ndis/ndisprot/6x/ndisprot60.sln index 4c2e55ed..5ca1e553 100644 --- a/network/ndis/ndisprot/6x/ndisprot60.sln +++ b/network/ndis/ndisprot/6x/ndisprot60.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33213.308 @@ -19,34 +19,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prottest", "test\prottest.v EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|Win32.ActiveCfg = Debug|Win32 - {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|Win32.Build.0 = Debug|Win32 + {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|ARM64.Build.0 = Debug|ARM64 + {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|ARM64.Build.0 = Debug|ARM64 + {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|ARM64.Build.0 = Debug|ARM64 + {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|ARM64.ActiveCfg = Release|ARM64 + {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|ARM64.Build.0 = Release|ARM64 + {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|ARM64.ActiveCfg = Release|ARM64 + {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|ARM64.Build.0 = Release|ARM64 + {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|ARM64.ActiveCfg = Release|ARM64 + {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|ARM64.Build.0 = Release|ARM64 {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|x64.ActiveCfg = Debug|x64 {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Debug|x64.Build.0 = Debug|x64 - {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|Win32.ActiveCfg = Release|Win32 - {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|Win32.Build.0 = Release|Win32 {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|x64.ActiveCfg = Release|x64 {F27914B8-F3D9-4164-BF33-42BBFA19AED4}.Release|x64.Build.0 = Release|x64 - {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|Win32.Build.0 = Debug|Win32 {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|x64.ActiveCfg = Debug|x64 {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Debug|x64.Build.0 = Debug|x64 - {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|Win32.ActiveCfg = Release|Win32 - {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|Win32.Build.0 = Release|Win32 {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|x64.ActiveCfg = Release|x64 {C0748EAB-F425-488A-9F39-77D5DE2DD251}.Release|x64.Build.0 = Release|x64 - {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|Win32.ActiveCfg = Debug|Win32 - {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|Win32.Build.0 = Debug|Win32 {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|x64.ActiveCfg = Debug|x64 {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Debug|x64.Build.0 = Debug|x64 - {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|Win32.ActiveCfg = Release|Win32 - {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|Win32.Build.0 = Release|Win32 {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|x64.ActiveCfg = Release|x64 {34A953AA-28CB-472E-B438-1BE26FDF1D54}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/network/ndis/ndisprot/6x/sys/60/ndisprot60.inf b/network/ndis/ndisprot/6x/sys/60/ndisprot60.inf Binary files differindex bae3936c..7022c0e6 100644 --- a/network/ndis/ndisprot/6x/sys/60/ndisprot60.inf +++ b/network/ndis/ndisprot/6x/sys/60/ndisprot60.inf diff --git a/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc b/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc index 59a37c53..5e9c282c 100644 --- a/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc +++ b/network/ndis/ndisprot/6x/sys/60/ndisprot60.rc @@ -9,8 +9,8 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: - ndisprot.rc - + ndisprot60.rc + Abstract: Internal resource file for driver. diff --git a/network/ndis/ndisprot/6x/sys/60/ndisprot60.vcxproj b/network/ndis/ndisprot/6x/sys/60/ndisprot60.vcxproj index 738100d5..b2e9b0fa 100644 --- a/network/ndis/ndisprot/6x/sys/60/ndisprot60.vcxproj +++ b/network/ndis/ndisprot/6x/sys/60/ndisprot60.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{F27914B8-F3D9-4164-BF33-42BBFA19AED4}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{2D8FA4FC-0D81-4E0A-B63E-A6622384ED94}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ndisprot60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>ndisprot60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ndisprot60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>ndisprot60</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -100,20 +100,20 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -126,17 +126,17 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -159,9 +159,10 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..</AdditionalIncludeDirectories> @@ -178,7 +179,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> </Link> @@ -197,7 +198,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> </Link> diff --git a/network/ndis/ndisprot/6x/sys/630/ndisprot630.inf b/network/ndis/ndisprot/6x/sys/630/ndisprot630.inf Binary files differindex c5d7adb6..6a3e7da1 100644 --- a/network/ndis/ndisprot/6x/sys/630/ndisprot630.inf +++ b/network/ndis/ndisprot/6x/sys/630/ndisprot630.inf diff --git a/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc b/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc index f50de3f9..91bff7f3 100644 --- a/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc +++ b/network/ndis/ndisprot/6x/sys/630/ndisprot630.rc @@ -9,8 +9,8 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: - ndisprot.rc - + ndisprot630.rc + Abstract: Internal resource file for driver. diff --git a/network/ndis/ndisprot/6x/sys/630/ndisprot630.vcxproj b/network/ndis/ndisprot/6x/sys/630/ndisprot630.vcxproj index 67f57490..78ae6b79 100644 --- a/network/ndis/ndisprot/6x/sys/630/ndisprot630.vcxproj +++ b/network/ndis/ndisprot/6x/sys/630/ndisprot630.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{C0748EAB-F425-488A-9F39-77D5DE2DD251}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{7354BBA5-44E7-4346-8B50-AD13E3CACB81}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ndisprot630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>ndisprot630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ndisprot630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>ndisprot630</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -100,7 +100,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -113,7 +113,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -126,7 +126,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -159,7 +159,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..</AdditionalIncludeDirectories> </ResourceCompile> @@ -173,12 +173,13 @@ </Midl> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..</AdditionalIncludeDirectories> </ResourceCompile> @@ -197,7 +198,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..</AdditionalIncludeDirectories> </ResourceCompile> diff --git a/network/ndis/ndisprot/6x/sys/debug.c b/network/ndis/ndisprot/6x/sys/debug.c index 40e90984..db2c389c 100644 --- a/network/ndis/ndisprot/6x/sys/debug.c +++ b/network/ndis/ndisprot/6x/sys/debug.c @@ -43,7 +43,7 @@ ndisprotAuditAllocMem( ) { PVOID pBuffer; - PNPROTD_ALLOCATION pAllocInfo; + PNPROTD_ALLOCATION pAllocInfo = NULL; if (!ndisprotdInitDone) { @@ -88,7 +88,7 @@ ndisprotAuditAllocMem( ndisprotdMemoryTail->Next = pAllocInfo; } ndisprotdMemoryTail = pAllocInfo; - + ndisprotdAllocCount++; NdisReleaseSpinLock(&(ndisprotdMemoryLock)); } @@ -295,9 +295,9 @@ ndisprotFreeDbgLock( VOID ) { - + ASSERT(ndisprotdSpinLockInitDone == 1); - + ndisprotdSpinLockInitDone = 0; NdisFreeSpinLock(&(ndisprotdLockLock)); } diff --git a/network/ndis/ndisprot/6x/sys/debug.h b/network/ndis/ndisprot/6x/sys/debug.h index 64de3453..89c35907 100644 --- a/network/ndis/ndisprot/6x/sys/debug.h +++ b/network/ndis/ndisprot/6x/sys/debug.h @@ -80,7 +80,7 @@ ndisprotReleaseSpinLock( IN ULONG LineNumber ); -extern +extern VOID ndisprotFreeDbgLock( VOID diff --git a/network/ndis/ndisprot/6x/sys/excallbk.c b/network/ndis/ndisprot/6x/sys/excallbk.c index baa2298c..48ec71b7 100644 --- a/network/ndis/ndisprot/6x/sys/excallbk.c +++ b/network/ndis/ndisprot/6x/sys/excallbk.c @@ -12,7 +12,7 @@ Module Name: ExCallbk.c Abstract: The routines in this module helps to solve driver load order - dependency between this sample and NDISWDM sample. These + dependency between this sample and NDISWDM sample. These routines are not required in a typical protocol driver. By default this module is not included in the sample. You include these routines by adding EX_CALLBACK defines to the 'sources' file. Read the @@ -52,7 +52,7 @@ typedef VOID (* NOTIFY_PRESENCE_CALLBACK)(OUT PVOID Source); #endif // ALLOC_PRAGMA -BOOLEAN +BOOLEAN ndisprotRegisterExCallBack() { OBJECT_ATTRIBUTES ObjectAttr; @@ -63,9 +63,9 @@ ndisprotRegisterExCallBack() DEBUGP(DL_LOUD, ("--> ndisprotRegisterExCallBack\n")); PAGED_CODE(); - + do { - + RtlInitUnicodeString(&CallBackObjectName, NDISPROT_CALLBACK_NAME); InitializeObjectAttributes(&ObjectAttr, @@ -73,13 +73,13 @@ ndisprotRegisterExCallBack() OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, NULL, NULL); - + Status = ExCreateCallback(&CallbackObject, &ObjectAttr, TRUE, TRUE); - + if (!NT_SUCCESS(Status)) { @@ -87,7 +87,7 @@ ndisprotRegisterExCallBack() bResult = FALSE; break; } - + CallbackRegisterationHandle = ExRegisterCallback(CallbackObject, ndisprotCallback, (PVOID)NULL); @@ -101,8 +101,8 @@ ndisprotRegisterExCallBack() ExNotifyCallback(CallbackObject, (PVOID)CALLBACK_SOURCE_NDISPROT, (PVOID)NULL); - - + + }while(FALSE); if(!bResult) { @@ -116,16 +116,16 @@ ndisprotRegisterExCallBack() { ObDereferenceObject(CallbackObject); CallbackObject = NULL; - } + } } DEBUGP(DL_LOUD, ("<-- ndisprotRegisterExCallBack\n")); return bResult; - + } -VOID +VOID ndisprotUnregisterExCallBack() { DEBUGP(DL_LOUD, ("--> ndisprotUnregisterExCallBack\n")); @@ -142,10 +142,10 @@ ndisprotUnregisterExCallBack() { ObDereferenceObject(CallbackObject); CallbackObject = NULL; - } - + } + DEBUGP(DL_LOUD, ("<-- ndisprotUnregisterExCallBack\n")); - + } VOID @@ -156,40 +156,40 @@ ndisprotCallback( ) { NOTIFY_PRESENCE_CALLBACK func; - - DEBUGP(DL_LOUD, ("==>ndisprotoCallback: Source %lx, CallbackAddr %p\n", + + DEBUGP(DL_LOUD, ("==>ndisprotoCallback: Source %lx, CallbackAddr %p\n", Source, CallbackAddr)); - + // // if we are the one issuing this notification, just return // - if (Source == CALLBACK_SOURCE_NDISPROT) { + if (Source == CALLBACK_SOURCE_NDISPROT) { return; } - + // // Notification is coming from NDISWDM // let it know that you are here // ASSERT(Source == (PVOID)CALLBACK_SOURCE_NDISWDM); - + if(Source == (PVOID)CALLBACK_SOURCE_NDISWDM) { ASSERT(CallbackAddr); - + if (CallbackAddr == NULL) { DEBUGP(DL_ERROR, ("Callback called with invalid address %p\n", CallbackAddr)); - return; + return; } func = CallbackAddr; - + func(CALLBACK_SOURCE_NDISPROT); } - + DEBUGP(DL_LOUD, ("<==ndisprotoCallback: Source, %lx\n", Source)); - + } #endif diff --git a/network/ndis/ndisprot/6x/sys/macros.h b/network/ndis/ndisprot/6x/sys/macros.h index d750129c..59ddc18d 100644 --- a/network/ndis/ndisprot/6x/sys/macros.h +++ b/network/ndis/ndisprot/6x/sys/macros.h @@ -76,7 +76,7 @@ Revision History: NdisReleaseSpinLock(_pLock); \ } \ } - + #define NPROT_FREE_LOCK(_pLock) NdisFreeSpinLock(_pLock) #define NPROT_FREE_DBG_LOCK() @@ -94,17 +94,17 @@ Revision History: #define NPROT_REMOVE_HEAD_LIST(_pList) RemoveHeadList(_pList) - + #define NPROT_RCV_NBL_TO_LIST_ENTRY(_pNbl) \ (&((PNPROT_RECV_NBL_RSVD)(NET_BUFFER_LIST_PROTOCOL_RESERVED(_pNbl)))->Link) #define NPROT_RCV_NBL_FROM_LIST_ENTRY(_pEnt) \ (((PNPROT_RECV_NBL_RSVD)(CONTAINING_RECORD(_pEnt, NPROT_RECV_NBL_RSVD, Link)))->pNetBufferList) - + // // Send net buffer list context -// +// #define NPROT_IRP_FROM_SEND_NBL(_pNbl) \ (((PNPROT_SEND_NETBUFLIST_RSVD)((_pNbl)->Context->ContextData + (_pNbl)->Context->Offset))->pIrp) @@ -128,7 +128,7 @@ Revision History: // Cancel IDs are generated by using the partial cancel ID we got from // NDIS ORed with a monotonically increasing locally generated ID. // -#define NPROT_CANCEL_ID_LOW_MASK (((ULONG_PTR)-1) >> 8) +#define NPROT_CANCEL_ID_LOW_MASK (((ULONG_PTR)-1) >> 8) #define NPROT_GET_NEXT_CANCEL_ID() \ (PVOID)(Globals.PartialCancelId | \ @@ -188,7 +188,7 @@ Revision History: #define NPROT_TEST_FLAGS(_FlagsVar, _Mask, _BitsToCheck) \ (((_FlagsVar) & (_Mask)) == (_BitsToCheck)) - + #define NDIS_STATUS_TO_NT_STATUS(_NdisStatus, _pNtStatus) \ { \ diff --git a/network/ndis/ndisprot/6x/sys/ndisbind.c b/network/ndis/ndisprot/6x/sys/ndisbind.c index 5257d3a2..7ad3c4d5 100644 --- a/network/ndis/ndisprot/6x/sys/ndisbind.c +++ b/network/ndis/ndisprot/6x/sys/ndisbind.c @@ -70,11 +70,11 @@ Return Value: --*/ { - PNDISPROT_OPEN_CONTEXT pOpenContext; + PNDISPROT_OPEN_CONTEXT pOpenContext = NULL; NDIS_STATUS Status; UNREFERENCED_PARAMETER(ProtocolDriverContext); - + do { // @@ -120,12 +120,12 @@ Return Value: pOpenContext->State = NdisprotInitializing; // - // Here we reference the open context to make sure that even if + // Here we reference the open context to make sure that even if // ndisprotCreateBinding failed, open context is still valid - // + // NPROT_REF_OPEN(pOpenContext); // - // Set up the NDIS binding, ndisprotCreateBinding does the cleanup for the + // Set up the NDIS binding, ndisprotCreateBinding does the cleanup for the // binding if somehow it fails to create the binding, the // Status = ndisprotCreateBinding( @@ -134,21 +134,21 @@ Return Value: BindContext, (PUCHAR)BindParameters->AdapterName->Buffer, BindParameters->AdapterName->Length); - - + + if (Status != NDIS_STATUS_SUCCESS) { // // Dereference the open context because we referenced it before we call // ndisprotCreateBinding - // + // NPROT_DEREF_OPEN(pOpenContext); break; } // // Dereference the open context because we referenced it before we call // ndisprotCreateBinding - // + // NPROT_DEREF_OPEN(pOpenContext); } while (FALSE); @@ -216,7 +216,7 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; UNREFERENCED_PARAMETER(UnbindContext); - + pOpenContext = (PNDISPROT_OPEN_CONTEXT)ProtocolBindingContext; NPROT_STRUCT_ASSERT(pOpenContext, oc); @@ -272,7 +272,7 @@ Return Value: NPROT_SIGNAL_EVENT(&pOpenContext->BindEvent); } - + NDIS_STATUS NdisprotPnPEventHandler( IN NDIS_HANDLE ProtocolBindingContext, @@ -308,7 +308,7 @@ Return Value: switch (pNetPnPEventNotification->NetPnPEvent.NetEvent) { - case NetEventSetPower: + case NetEventSetPower: NPROT_STRUCT_ASSERT(pOpenContext, oc); pOpenContext->PowerState = *(PNET_DEVICE_POWER_STATE)pNetPnPEventNotification->NetPnPEvent.Buffer; @@ -359,14 +359,14 @@ Return Value: // // Wait all sends to be complete. // - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); pOpenContext->State = NdisprotPausing; // // we could also complete the PnP Event asynchrously. // - while (TRUE) + while (TRUE) { if (pOpenContext->PendedSendCount == 0) break; @@ -379,19 +379,19 @@ Return Value: NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); } - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); // // Return all queued receives. // ndisprotFlushReceiveQueue(pOpenContext); pOpenContext->State = NdisprotPaused; - + break; case NetEventRestart: - + ASSERT(pOpenContext->State == NdisprotPaused); // // Get the updated attributes @@ -403,7 +403,7 @@ Return Value: break; } BufferLength = pNetPnPEventNotification->NetPnPEvent.BufferLength; - + ASSERT(BufferLength == sizeof(NDIS_PROTOCOL_RESTART_PARAMETERS)); RestartParameters = (PNDIS_PROTOCOL_RESTART_PARAMETERS)Buffer; @@ -412,7 +412,7 @@ Return Value: pOpenContext->State = NdisprotRunning; break; - + case NetEventQueryRemoveDevice: case NetEventCancelRemoveDevice: case NetEventReconfigure: @@ -431,7 +431,7 @@ Return Value: return (Status); } - + VOID NdisprotProtocolUnloadHandler( VOID @@ -500,7 +500,7 @@ Return Value: NET_FRAME_TYPE FrameTypeArray[2] = {NDIS_ETH_TYPE_802_1X, NDIS_ETH_TYPE_802_1Q}; #if DBG PNDISPROT_OPEN_CONTEXT pTmpOpenContext; -#endif +#endif DEBUGP(DL_LOUD, ("CreateBinding: open %p/%x, device [%s]\n", pOpenContext, pOpenContext->Flags, pBindingInfo)); @@ -512,7 +512,7 @@ Return Value: // // Check if we already have a binding to this device. // -#if DBG +#if DBG pTmpOpenContext = ndisprotLookupDevice(pBindingInfo, BindingInfoLength); ASSERT(pTmpOpenContext == NULL); @@ -527,7 +527,7 @@ Return Value: Status = NDIS_STATUS_FAILURE; break; } -#endif +#endif NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -548,10 +548,10 @@ Return Value: } NPROT_COPY_MEM(pOpenContext->DeviceName.Buffer, pBindingInfo, BindingInfoLength); -#pragma prefast(suppress: 12009, "DeviceName length will not cause overflow") +#pragma prefast(suppress: 12009, "DeviceName length will not cause overflow") *(PWCHAR)((PUCHAR)pOpenContext->DeviceName.Buffer + BindingInfoLength) = L'\0'; NdisInitUnicodeString(&pOpenContext->DeviceName, pOpenContext->DeviceName.Buffer); - + NdisZeroMemory(&PoolParameters, sizeof(NET_BUFFER_LIST_POOL_PARAMETERS)); PoolParameters.Header.Type = NDIS_OBJECT_TYPE_DEFAULT; @@ -561,39 +561,39 @@ Return Value: PoolParameters.ContextSize = sizeof(NPROT_SEND_NETBUFLIST_RSVD); PoolParameters.fAllocateNetBuffer = TRUE; PoolParameters.PoolTag = NPROT_ALLOC_TAG; - + pOpenContext->SendNetBufferListPool = NdisAllocateNetBufferListPool( Globals.NdisProtocolHandle, - &PoolParameters); + &PoolParameters); if (pOpenContext->SendNetBufferListPool == NULL) { DEBUGP(DL_WARN, ("CreateBinding: failed to alloc" " send net buffer list pool\n")); - + Status = NDIS_STATUS_RESOURCES; break; } - PoolParameters.ContextSize = 0; - + PoolParameters.ContextSize = 0; + pOpenContext->RecvNetBufferListPool = NdisAllocateNetBufferListPool( Globals.NdisProtocolHandle, &PoolParameters); - + if (pOpenContext->RecvNetBufferListPool == NULL) { DEBUGP(DL_WARN, ("CreateBinding: failed to alloc" " recv net buffer list pool.\n")); - + Status = NDIS_STATUS_RESOURCES; break; } - + // // Assume that the device is powered up. // pOpenContext->PowerState = NetDeviceStateD0; - + // // Open the adapter. // @@ -614,8 +614,8 @@ Return Value: NDIS_DECLARE_PROTOCOL_OPEN_CONTEXT(NDISPROT_OPEN_CONTEXT); Status = NdisOpenAdapterEx(Globals.NdisProtocolHandle, (NDIS_HANDLE)pOpenContext, - &OpenParameters, - BindContext, + &OpenParameters, + BindContext, &pOpenContext->BindingHandle); if (Status == NDIS_STATUS_PENDING) @@ -651,18 +651,18 @@ Return Value: // Get MAC options. // pOpenContext->MacOptions = BindParameters->MacOptions; - - + + // // Get the max frame size. // pOpenContext->MaxFrameSize = BindParameters->MtuSize; - + // // Get the media connect status. // GenericUlong = BindParameters->MediaConnectState; - + if (GenericUlong == NdisMediaStateConnected) { NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_MEDIA_FLAGS, NPROTO_MEDIA_CONNECTED); @@ -772,7 +772,7 @@ Return Value: { ASSERT(pOpenContext->ClosingEvent == NULL); pOpenContext->ClosingEvent = NULL; - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_CLOSING); if (pOpenContext->PendedSendCount != 0) @@ -780,7 +780,7 @@ Return Value: pOpenContext->ClosingEvent = &ClosingEvent; NPROT_INIT_EVENT(&ClosingEvent); } - + DoCloseBinding = TRUE; } @@ -790,10 +790,10 @@ Return Value: { ULONG PacketFilter = 0; ULONG BytesRead = 0; - + // // Set Packet filter to 0 before closing the binding - // + // Status = ndisprotDoRequest( pOpenContext, NDIS_DEFAULT_PORT_NUMBER, @@ -807,10 +807,10 @@ Return Value: { DEBUGP(DL_WARN, ("ShutDownBinding: set packet filter failed: %x\n", Status)); } - + // // Set multicast list to null before closing the binding - // + // Status = ndisprotDoRequest( pOpenContext, NDIS_DEFAULT_PORT_NUMBER, @@ -856,7 +856,7 @@ Return Value: NPROT_ASSERT(Status == NDIS_STATUS_SUCCESS); pOpenContext->BindingHandle = NULL; - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_IDLE); @@ -867,7 +867,7 @@ Return Value: } } while (FALSE); - + // // Remove it from the global list. @@ -977,7 +977,7 @@ Return Value: pOpenContext, pOpenContext->PendedSendCount)); NPROT_WAIT_EVENT(pOpenContext->ClosingEvent, 0); - + } if (DoCancelReads) @@ -1024,7 +1024,7 @@ Return Value: { NDIS_HANDLE ProtocolHandle; - DEBUGP(DL_INFO, ("ProtocolUnload: ProtocolHandle %lp\n", + DEBUGP(DL_INFO, ("ProtocolUnload: ProtocolHandle %lp\n", Globals.NdisProtocolHandle)); if (Globals.NdisProtocolHandle != NULL) @@ -1037,7 +1037,7 @@ Return Value: } } - + NDIS_STATUS ndisprotDoRequest( IN PNDISPROT_OPEN_CONTEXT pOpenContext, @@ -1115,7 +1115,7 @@ Return Value: pNdisRequest->RequestId = NPROT_GET_NEXT_CANCEL_ID(); Status = NdisOidRequest(pOpenContext->BindingHandle, pNdisRequest); - + if (Status == NDIS_STATUS_PENDING) { @@ -1129,9 +1129,9 @@ Return Value: *pBytesProcessed = (RequestType == NdisRequestQueryInformation)? pNdisRequest->DATA.QUERY_INFORMATION.BytesWritten: pNdisRequest->DATA.SET_INFORMATION.BytesRead; - + // - // The driver below should set the correct value to BytesWritten + // The driver below should set the correct value to BytesWritten // or BytesRead. But now, we just truncate the value to InformationBufferLength // if (*pBytesProcessed > InformationBufferLength) @@ -1188,7 +1188,7 @@ Return Value: Status = NDIS_STATUS_INVALID_DATA; break; } - + NPROT_STRUCT_ASSERT(pOpenContext, oc); NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -1244,8 +1244,8 @@ Return Value: { Status = NDIS_STATUS_ADAPTER_NOT_READY; } - - NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); + + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); // // Let go of the binding. // @@ -1345,8 +1345,8 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; NDIS_STATUS GeneralStatus; PNDIS_LINK_STATE LinkState; - - + + pOpenContext = (PNDISPROT_OPEN_CONTEXT)ProtocolBindingContext; NPROT_STRUCT_ASSERT(pOpenContext, oc); @@ -1360,7 +1360,7 @@ Return Value: } GeneralStatus = StatusIndication->StatusCode; - + DEBUGP(DL_INFO, ("Status: Open %p, Status %x\n", pOpenContext, GeneralStatus)); @@ -1378,7 +1378,7 @@ Return Value: // // We continue and make note of status indications // - + // // NOTE that any actions we take based on these // status indications should take into account @@ -1389,7 +1389,7 @@ Return Value: switch(GeneralStatus) { case NDIS_STATUS_RESET_START: - + NPROT_ASSERT(!NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_RESET_IN_PROGRESS)); @@ -1405,7 +1405,7 @@ Return Value: NPROT_ASSERT(NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_RESET_IN_PROGRESS)); - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_RESET_FLAGS, NPROTO_NOT_RESETTING); @@ -1413,9 +1413,9 @@ Return Value: break; case NDIS_STATUS_LINK_STATE: - + ASSERT(StatusIndication->StatusBufferSize >= sizeof(NDIS_LINK_STATE)); - + LinkState = (PNDIS_LINK_STATE)StatusIndication->StatusBuffer; if (LinkState->MediaConnectState == MediaConnectStateConnected) @@ -1430,15 +1430,15 @@ Return Value: NPROTO_MEDIA_FLAGS, NPROTO_MEDIA_DISCONNECTED); } - - break; - + + break; + default: break; } } while (FALSE); - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); } @@ -1571,7 +1571,7 @@ Return Value: // DEBUGP(DL_INFO, ("QueryBinding: found open %p\n", pOpenContext)); - + pQueryBinding->DeviceNameOffset = 0; pQueryBinding->DeviceNameLength = pOpenContext->DeviceName.Length; pQueryBinding->DeviceDescrOffset = 0; @@ -1615,7 +1615,7 @@ Return Value: NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); break; } - + pQueryBinding->DeviceDescrOffset = DeviceDescrOffset; *pBytesReturned += StringBytesWritten; @@ -1798,7 +1798,7 @@ Return Value: pOpenContext, pOpenContext->Flags, Oid, Status)); return (Status); - + } NDIS_STATUS @@ -1846,7 +1846,7 @@ Return Value: // // We should check the OID is settable by the user mode apps - // + // if (!ndisprotValidOid(Oid)) { DEBUGP(DL_WARN, ("SetOid: Oid %x cannot be set\n", Oid)); @@ -1854,7 +1854,7 @@ Return Value: Status = NDIS_STATUS_INVALID_DATA; break; } - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); if (!NPROT_TEST_FLAGS(pOpenContext->Flags, NPROTO_BIND_FLAGS, NPROTO_BIND_ACTIVE)) @@ -1912,7 +1912,7 @@ Return Value: BOOLEAN ndisprotValidOid( - IN NDIS_OID Oid + IN NDIS_OID Oid ) /*++ @@ -1923,7 +1923,7 @@ Routine Description: Arguments: Oid - The OID which the user tries to set. - + Return Value: TRUE if the OID is allowed to set @@ -1943,7 +1943,7 @@ Return Value: break; } } - + return (i < NumOids); } @@ -1965,13 +1965,13 @@ Arguments: pOpenContext - pointer to open context RestartParameters - pointer to ndis restart parameters - + Return Value: None NOTE: Protocols should query any attribute: - 1. the attribute is not included in the RestartAttributes + 1. the attribute is not included in the RestartAttributes and 2. The protocol cares about whether the attributes is changed by underlying driver. --*/ @@ -1986,30 +1986,30 @@ NOTE: Protocols should query any attribute: WCHAR FilterNameBuffer[NPROT_MAX_FILTER_NAME_LENGTH]; PNDIS_RESTART_ATTRIBUTES NdisRestartAttributes; PNDIS_RESTART_GENERAL_ATTRIBUTES NdisGeneralAttributes; - + DEBUGP(DL_LOUD, ("ndisprotRestart: Open %p", pOpenContext)); // // Check the filter stack changes // if (RestartParameters->FilterModuleNameBuffer != NULL) { - + Buffer = RestartParameters->FilterModuleNameBuffer; - + while (RestartParameters->FilterModuleNameBufferLength > TotalLength) { - + BufferLength = *(PUSHORT)Buffer; - + TotalLength += BufferLength + sizeof(USHORT); Length = BufferLength + sizeof(USHORT); - + if (BufferLength >= (NPROT_MAX_FILTER_NAME_LENGTH * sizeof(WCHAR))) { BufferLength = (NPROT_MAX_FILTER_NAME_LENGTH - 1) * sizeof(WCHAR); } NdisMoveMemory(FilterNameBuffer, Buffer + sizeof(USHORT), BufferLength); - + BufferLength /= sizeof(WCHAR); // @@ -2020,17 +2020,17 @@ NOTE: Protocols should query any attribute: { FilterNameBuffer[BufferLength] = 0; } - + DEBUGP(DL_INFO, ("Filter: %ws\n", FilterNameBuffer)); - + Buffer += Length; } } // // Checked for updated attributes - // + // NdisRestartAttributes = RestartParameters->RestartAttributes; - + // // NdisProt is only interested in the generic attributes. // @@ -2042,20 +2042,20 @@ NOTE: Protocols should query any attribute: } NdisRestartAttributes = NdisRestartAttributes->Next; } - + // // Pick up the new attributes of interest // if (NdisRestartAttributes != NULL) { NdisGeneralAttributes = (PNDIS_RESTART_GENERAL_ATTRIBUTES)NdisRestartAttributes->Data; - + pOpenContext->MacOptions = NdisGeneralAttributes->MacOptions; pOpenContext->MaxFrameSize = NdisGeneralAttributes->MtuSize; - } - + } + DEBUGP(DL_LOUD, ("ndisprotRestart: Open %p", pOpenContext)); - + } - + diff --git a/network/ndis/ndisprot/6x/sys/ndisprot.h b/network/ndis/ndisprot/6x/sys/ndisprot.h index b4efbaf4..e497c89f 100644 --- a/network/ndis/ndisprot/6x/sys/ndisprot.h +++ b/network/ndis/ndisprot/6x/sys/ndisprot.h @@ -121,10 +121,10 @@ typedef struct _NDISPROT_OPEN_CONTEXT PFILE_OBJECT pFileObject; // Set on OPEN_DEVICE NDIS_HANDLE BindingHandle; - NDIS_HANDLE SendNetBufferListPool; + NDIS_HANDLE SendNetBufferListPool; // let every net buffer list contain one net buffer(don't know how many net buffers can be include in one list. NDIS_HANDLE RecvNetBufferListPool; - + ULONG MacOptions; ULONG MaxFrameSize; ULONG DataBackFillSize; @@ -148,12 +148,12 @@ typedef struct _NDISPROT_OPEN_CONTEXT ULONG oc_sig; // Signature for sanity NDISPROT_OPEN_STATE State; - PNPROT_EVENT ClosingEvent; + PNPROT_EVENT ClosingEvent; UCHAR CurrentAddress[NPROT_MAC_ADDR_LEN]; UCHAR MCastAddress[MAX_MULTICAST_ADDRESS][NPROT_MAC_ADDR_LEN]; } NDISPROT_OPEN_CONTEXT, *PNDISPROT_OPEN_CONTEXT; - + #define oc_signature 'OiuN' // diff --git a/network/ndis/ndisprot/6x/sys/ntdisp.c b/network/ndis/ndisprot/6x/sys/ntdisp.c index 21ceeaeb..c212f57d 100644 --- a/network/ndis/ndisprot/6x/sys/ntdisp.c +++ b/network/ndis/ndisprot/6x/sys/ntdisp.c @@ -61,12 +61,12 @@ Arguments: Return Value: NT Status code - + --*/ { NDIS_PROTOCOL_DRIVER_CHARACTERISTICS protocolChar = {0}; NTSTATUS status = STATUS_SUCCESS; - NDIS_STRING protoName = NDIS_STRING_CONST("NDISPROT"); + NDIS_STRING protoName = NDIS_STRING_CONST("NDISPROT"); UNICODE_STRING ntDeviceName; UNICODE_STRING win32DeviceName; BOOLEAN fSymbolicLink = FALSE; @@ -74,7 +74,7 @@ Return Value: NDIS_HANDLE ProtocolDriverContext={0}; UNREFERENCED_PARAMETER(pRegistryPath); - + DEBUGP(DL_LOUD, ("DriverEntry\n")); Globals.pDriverObject = pDriverObject; @@ -96,7 +96,7 @@ Return Value: FILE_DEVICE_SECURE_OPEN, FALSE, &deviceObject); - + if (!NT_SUCCESS (status)) { // @@ -117,7 +117,7 @@ Return Value: } fSymbolicLink = TRUE; - + deviceObject->Flags |= DO_DIRECT_IO; Globals.ControlDeviceObject = deviceObject; @@ -126,7 +126,7 @@ Return Value: // // Initialize the protocol characterstic structure - // + // #if (NDIS_SUPPORT_NDIS630) {C_ASSERT(sizeof(protocolChar) >= NDIS_SIZEOF_PROTOCOL_DRIVER_CHARACTERISTICS_REVISION_2);} protocolChar.Header.Type = NDIS_OBJECT_TYPE_PROTOCOL_DRIVER_CHARACTERISTICS, @@ -159,7 +159,7 @@ Return Value: // // Register as a protocol driver // - + status = NdisRegisterProtocolDriver(ProtocolDriverContext, // driver context &protocolChar, &Globals.NdisProtocolHandle); @@ -190,16 +190,16 @@ Return Value: pDriverObject->MajorFunction[IRP_MJ_CLEANUP] = NdisprotCleanup; pDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = NdisprotIoControl; - + pDriverObject->DriverUnload = NdisprotUnload; status = STATUS_SUCCESS; - + } while (FALSE); - + if (!NT_SUCCESS(status)) { @@ -216,14 +216,14 @@ Return Value: IoDeleteSymbolicLink(&win32DeviceName); fSymbolicLink = FALSE; } - + if (Globals.NdisProtocolHandle) { NdisDeregisterProtocolDriver(Globals.NdisProtocolHandle); Globals.NdisProtocolHandle = NULL; - } + } } - + return status; } @@ -252,7 +252,7 @@ Return Value: UNICODE_STRING win32DeviceName; PAGED_CODE(); UNREFERENCED_PARAMETER(DriverObject); - + DEBUGP(DL_LOUD, ("Unload Enter\n")); // @@ -261,7 +261,7 @@ Return Value: // RtlInitUnicodeString(&win32DeviceName, DOS_DEVICE_NAME); - IoDeleteSymbolicLink(&win32DeviceName); + IoDeleteSymbolicLink(&win32DeviceName); if (Globals.ControlDeviceObject) @@ -310,7 +310,7 @@ Return Value: NTSTATUS NtStatus = STATUS_SUCCESS; PAGED_CODE(); UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pIrpSp->FileObject->FsContext = NULL; @@ -352,7 +352,7 @@ Return Value: PNDISPROT_OPEN_CONTEXT pOpenContext; PAGED_CODE(); UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pOpenContext = pIrpSp->FileObject->FsContext; @@ -378,7 +378,7 @@ Return Value: return NtStatus; } - + NTSTATUS NdisprotCleanup( @@ -410,9 +410,9 @@ Return Value: ULONG PacketFilter; ULONG BytesProcessed; - + UNREFERENCED_PARAMETER(pDeviceObject); - + pIrpSp = IoGetCurrentIrpStackLocation(pIrp); pOpenContext = pIrpSp->FileObject->FsContext; @@ -437,7 +437,7 @@ Return Value: &BytesProcessed, FALSE // Don't wait for device to be powered on ); - + if (NdisStatus != NDIS_STATUS_SUCCESS) { DEBUGP(DL_INFO, ("Cleanup: Open %p, set packet filter (%x) failed: %x\n", @@ -449,7 +449,7 @@ Return Value: // NdisStatus = NDIS_STATUS_SUCCESS; } - + // // Mark this endpoint. // @@ -533,7 +533,7 @@ Return Value: // If we don't get this event in 5 seconds, time out. // NPROT_ASSERT((FunctionCode & 0x3) == METHOD_BUFFERED); - + if (NPROT_WAIT_EVENT(&Globals.BindsComplete, 5000)) { NtStatus = STATUS_SUCCESS; @@ -546,9 +546,9 @@ Return Value: break; case IOCTL_NDISPROT_QUERY_BINDING: - + NPROT_ASSERT((FunctionCode & 0x3) == METHOD_BUFFERED); - + Status = ndisprotQueryBinding( pIrp->AssociatedIrp.SystemBuffer, pIrpSp->Parameters.DeviceIoControl.InputBufferLength, @@ -636,7 +636,7 @@ Return Value: NtStatus = STATUS_DEVICE_NOT_CONNECTED; } break; - + default: NtStatus = STATUS_NOT_SUPPORTED; @@ -715,9 +715,9 @@ Return Value: NPROT_ASSERT(pOpenContext->pFileObject != NULL); DEBUGP(DL_WARN, ("ndisprotOpenDevice: Open %p/%x already associated" - " with another FileObject %p\n", + " with another FileObject %p\n", pOpenContext, pOpenContext->Flags, pOpenContext->pFileObject)); - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); NPROT_DEREF_OPEN(pOpenContext); // ndisprotOpenDevice failure @@ -729,17 +729,17 @@ Return Value: // pFileObject->FsContext with NULL, if they are equal, the function puts pOpenContext // into FsContext, and return NULL. Otherwise, it return pFileObject->FsContext without // changing anything. - // - + // + if ((pCurrentOpenContext = InterlockedCompareExchangePointer (& (pFileObject->FsContext), pOpenContext, NULL)) != NULL) { // // pFileObject->FsContext already is used by other open // DEBUGP(DL_WARN, ("ndisprotOpenDevice: FileObject %p already associated" - " with another Open %p/%x\n", + " with another Open %p/%x\n", pFileObject, pCurrentOpenContext, pCurrentOpenContext->Flags)); //BUG - + NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); NPROT_DEREF_OPEN(pOpenContext); // ndisprotOpenDevice failure @@ -766,7 +766,7 @@ Return Value: &BytesProcessed, TRUE // Do wait for power on ); - + if (NdisStatus != NDIS_STATUS_SUCCESS) { DEBUGP(DL_WARN, ("openDevice: Open %p: set packet filter (%x) failed: %x\n", @@ -781,10 +781,10 @@ Return Value: // for this file object later // pCurrentOpenContext = InterlockedCompareExchangePointer (& (pFileObject->FsContext), NULL, pOpenContext); - - + + NPROT_ASSERT(pCurrentOpenContext == pOpenContext); - + NPROT_SET_FLAGS(pOpenContext->Flags, NPROTO_OPEN_FLAGS, NPROTO_OPEN_IDLE); pOpenContext->pFileObject = NULL; @@ -797,7 +797,7 @@ Return Value: } *ppOpenContext = pOpenContext; - + NtStatus = STATUS_SUCCESS; } while (FALSE); @@ -859,7 +859,7 @@ Return Value: { DEBUGP(DL_INFO, ("DerefOpen: Open %p, Flags %x, ref count is zero!\n", pOpenContext, pOpenContext->Flags)); - + NPROT_ASSERT(pOpenContext->BindingHandle == NULL); NPROT_ASSERT(pOpenContext->RefCount == 0); NPROT_ASSERT(pOpenContext->pFileObject == NULL); diff --git a/network/ndis/ndisprot/6x/sys/protuser.h b/network/ndis/ndisprot/6x/sys/protuser.h index 823d1ef5..31432ed1 100644 --- a/network/ndis/ndisprot/6x/sys/protuser.h +++ b/network/ndis/ndisprot/6x/sys/protuser.h @@ -4,7 +4,7 @@ Copyright (c) 2000 Microsoft Corporation Module Name: - nuiouser.h + protuser.h Abstract: @@ -87,6 +87,6 @@ typedef struct _NDISPROT_QUERY_BINDING ULONG DeviceDescrLength; // in bytes } NDISPROT_QUERY_BINDING, *PNDISPROT_QUERY_BINDING; - + #endif // __NPROTUSER__H diff --git a/network/ndis/ndisprot/6x/sys/recv.c b/network/ndis/ndisprot/6x/sys/recv.c index a7291992..491af751 100644 --- a/network/ndis/ndisprot/6x/sys/recv.c +++ b/network/ndis/ndisprot/6x/sys/recv.c @@ -312,7 +312,7 @@ Return Value: // Copy as much data as possible from the receive packet to // the IRP MDL. // - + pDst = NULL; NdisQueryMdl(pIrp->MdlAddress, &pDst, &BytesRemaining, NormalPagePriority | MdlMappingNoExecute); NPROT_ASSERT(pDst != NULL); // since it was already mapped diff --git a/network/ndis/ndisprot/6x/sys/send.c b/network/ndis/ndisprot/6x/sys/send.c index 73cc282b..17b31051 100644 --- a/network/ndis/ndisprot/6x/sys/send.c +++ b/network/ndis/ndisprot/6x/sys/send.c @@ -35,7 +35,7 @@ NdisprotWrite( Routine Description: - Dispatch routine to handle IRP_MJ_WRITE. + Dispatch routine to handle IRP_MJ_WRITE. Arguments: @@ -73,7 +73,7 @@ Return Value: NtStatus = STATUS_INVALID_HANDLE; break; } - + NPROT_STRUCT_ASSERT(pOpenContext, oc); if (pIrp->MdlAddress == NULL) @@ -86,7 +86,7 @@ Return Value: // // Try to get a virtual address for the MDL. // - + pEthHeader = NULL; NdisQueryMdl(pIrp->MdlAddress, &pEthHeader, &DataLength, NormalPagePriority | MdlMappingNoExecute); @@ -127,14 +127,14 @@ Return Value: NtStatus = STATUS_INVALID_PARAMETER; break; } - + if (!NPROT_MEM_CMP(pEthHeader->SrcAddr, pOpenContext->CurrentAddress, NPROT_MAC_ADDR_LEN)) { DEBUGP(DL_WARN, ("Write: Failing with invalid Source address")); NtStatus = STATUS_INVALID_PARAMETER; break; } - + NPROT_ACQUIRE_LOCK(&pOpenContext->Lock, FALSE); @@ -147,13 +147,13 @@ Return Value: NtStatus = STATUS_INVALID_HANDLE; break; - } + } if (pOpenContext->State != NdisprotRunning || pOpenContext->PowerState != NetDeviceStateD0) { NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - + DEBUGP(DL_INFO, ("Device is not ready.\n")); NtStatus = STATUS_UNSUCCESSFUL; break; @@ -169,11 +169,11 @@ Return Value: pMdl, 0, // Data offset DataLength); - + if (pNetBufferList == NULL) { NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - + DEBUGP(DL_FATAL, ("Write: open %p, failed to alloc send net buffer list\n", pOpenContext)); NtStatus = STATUS_INSUFFICIENT_RESOURCES; @@ -192,11 +192,11 @@ Return Value: NPROT_SEND_NBL_RSVD(pNetBufferList)->RefCount = 1; // - // We set up a cancel ID on each send NetBufferList (which maps to a Write IRP), + // We set up a cancel ID on each send NetBufferList (which maps to a Write IRP), // and save the NetBufferList pointer in the IRP. If the IRP gets cancelled, we use // NdisCancelSendNetBufferLists() to cancel the NetBufferList. // - + CancelId = NPROT_GET_NEXT_CANCEL_ID(); NDIS_SET_NET_BUFFER_LIST_CANCEL_ID(pNetBufferList, CancelId); pIrp->Tail.Overlay.DriverContext[0] = (PVOID)pOpenContext; @@ -225,7 +225,7 @@ Return Value: pData = MmGetSystemAddressForMdlSafe(pMdl, NormalPagePriority | MdlMappingNoExecute); NPROT_ASSERT(pEthHeader == pData); - DEBUGP(DL_VERY_LOUD, + DEBUGP(DL_VERY_LOUD, ("Write: MDL %p, MdlFlags %x, SystemAddr %p, %d bytes\n", pIrp->MdlAddress, pIrp->MdlAddress->MdlFlags, pData, DataLength)); @@ -235,10 +235,10 @@ Return Value: pNetBufferList->SourceHandle = pOpenContext->BindingHandle; ASSERT (NDIS_MDL_LINKAGE(pMdl) == NULL); - + SendFlags |= NDIS_SEND_FLAGS_CHECK_FOR_LOOPBACK; - NdisSendNetBufferLists( + NdisSendNetBufferLists( pOpenContext->BindingHandle, pNetBufferList, NDIS_DEFAULT_PORT_NUMBER, @@ -285,7 +285,7 @@ Return Value: BOOLEAN FoundIrp = FALSE; UNREFERENCED_PARAMETER(pDeviceObject); - + pOpenContext = (PNDISPROT_OPEN_CONTEXT) pIrp->Tail.Overlay.DriverContext[0]; if (pOpenContext == NULL) { @@ -295,10 +295,10 @@ Return Value: IoReleaseCancelSpinLock(pIrp->CancelIrql); return; } - + NPROT_REF_OPEN(pOpenContext); IoReleaseCancelSpinLock(pIrp->CancelIrql); - + NPROT_STRUCT_ASSERT(pOpenContext, oc); // @@ -320,7 +320,7 @@ Return Value: NPROT_RELEASE_LOCK(&pOpenContext->Lock, FALSE); - if (FoundIrp) + if (FoundIrp) { PVOID CancelId; @@ -344,11 +344,11 @@ Return Value: // DEBUGP(DL_INFO, ("CancelWrite: cancelling nbl %p on Open %p\n", pIrp->Tail.Overlay.DriverContext[1], pOpenContext)); - + NdisCancelSendNetBufferLists( pOpenContext->BindingHandle, CancelId); - + } // // else the send completion routine has already picked up this IRP. @@ -399,7 +399,7 @@ Return Value: CurrNetBufferList = NextNetBufferList) { NextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(CurrNetBufferList); - + pIrp = NPROT_IRP_FROM_SEND_NBL(CurrNetBufferList); IoAcquireCancelSpinLock(&pIrp->CancelIrql); @@ -413,10 +413,10 @@ Return Value: NPROT_REMOVE_ENTRY_LIST(&pIrp->Tail.Overlay.ListEntry); NPROT_RELEASE_LOCK(&pOpenContext->Lock, DispatchLevel); - + CompletionStatus = NET_BUFFER_LIST_STATUS(CurrNetBufferList); - - + + // // We are done with the NDIS_PACKET: // @@ -457,7 +457,7 @@ Return Value: NPROT_DEREF_OPEN(pOpenContext); // send complete - dequeued send IRP } - + } diff --git a/network/ndis/ndisprot/6x/test/prottest.c b/network/ndis/ndisprot/6x/test/prottest.c index 54af3ddc..c743bed5 100644 --- a/network/ndis/ndisprot/6x/test/prottest.c +++ b/network/ndis/ndisprot/6x/test/prottest.c @@ -379,6 +379,7 @@ GetSrcMac( BytesReturned)); #pragma warning(suppress:6202) // buffer overrun warning - enough space allocated in QueryBuffer + // codeql[cpp/buffer-overflow] memcpy(pSrcMacAddr, pQueryOid->Data, MAC_ADDR_LEN); } else diff --git a/network/ndis/ndisprot/6x/test/prottest.vcxproj b/network/ndis/ndisprot/6x/test/prottest.vcxproj index bbe324c4..b8f5d68b 100644 --- a/network/ndis/ndisprot/6x/test/prottest.vcxproj +++ b/network/ndis/ndisprot/6x/test/prottest.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{34A953AA-28CB-472E-B438-1BE26FDF1D54}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{80BF7199-3D05-47CD-85FC-CEE847224F3E}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>prottest</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>prottest</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>prottest</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>prottest</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -105,7 +105,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32WIN_</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE=1</PreprocessorDefinitions> @@ -123,7 +123,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32WIN_</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE=1</PreprocessorDefinitions> @@ -141,7 +141,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32WIN_</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE=1</PreprocessorDefinitions> @@ -175,7 +175,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\sys</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);user32.lib</AdditionalDependencies> </Link> @@ -191,7 +191,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\sys</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);user32.lib</AdditionalDependencies> </Link> @@ -207,7 +207,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\sys</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);user32.lib</AdditionalDependencies> </Link> diff --git a/network/ndis/ndisprot_kmdf/60/debug.c b/network/ndis/ndisprot_kmdf/60/debug.c index 59471e3f..af6bc053 100644 --- a/network/ndis/ndisprot_kmdf/60/debug.c +++ b/network/ndis/ndisprot_kmdf/60/debug.c @@ -39,7 +39,7 @@ ndisprotAuditAllocMem( ) { PVOID pBuffer; - PNPROTD_ALLOCATION pAllocInfo; + PNPROTD_ALLOCATION pAllocInfo = NULL; if (!ndisprotdInitDone) { diff --git a/network/ndis/ndisprot_kmdf/60/ndisbind.c b/network/ndis/ndisprot_kmdf/60/ndisbind.c index 0878e198..32272f93 100644 --- a/network/ndis/ndisprot_kmdf/60/ndisbind.c +++ b/network/ndis/ndisprot_kmdf/60/ndisbind.c @@ -61,14 +61,17 @@ Routine Description: Arguments: + ProtocolDriverContext - handle to the protocol driver context + BindContext - handle to the bind context provided by NDIS + BindParameters - parameters describing the adapter to which we are binding Return Value: - None + NDIS_STATUS_SUCCESS if successful, failure code otherwise. --*/ { - PNDISPROT_OPEN_CONTEXT pOpenContext; + PNDISPROT_OPEN_CONTEXT pOpenContext = NULL; NDIS_STATUS Status; WDF_IO_QUEUE_CONFIG queueConfig; NTSTATUS ntStatus; @@ -1334,9 +1337,9 @@ Return Value: while (FALSE); DEBUGP(DL_LOUD, ("ValidateOpenAndDoReq: Open %p/%x, OID %x, Status %x\n", - pOpenContext, - pOpenContext == NULL ? 0 : pOpenContext->Flags, - Oid, + pOpenContext, + pOpenContext == NULL ? 0 : pOpenContext->Flags, + Oid, Status)); return (Status); diff --git a/network/ndis/ndisprot_kmdf/60/ndisprot.inx b/network/ndis/ndisprot_kmdf/60/ndisprot.inx Binary files differindex ecd932c1..1c5762f1 100644 --- a/network/ndis/ndisprot_kmdf/60/ndisprot.inx +++ b/network/ndis/ndisprot_kmdf/60/ndisprot.inx diff --git a/network/ndis/ndisprot_kmdf/60/nprt6wdf.vcxproj b/network/ndis/ndisprot_kmdf/60/nprt6wdf.vcxproj index 81a2d78e..77a28765 100644 --- a/network/ndis/ndisprot_kmdf/60/nprt6wdf.vcxproj +++ b/network/ndis/ndisprot_kmdf/60/nprt6wdf.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -25,7 +25,7 @@ <SupportsPackaging>false</SupportsPackaging> <RequiresPackageProject>true</RequiresPackageProject> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{BDE78A2F-D982-42E4-9E9E-95DA20A2BBAA}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -37,23 +37,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -68,13 +68,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -87,13 +87,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>nprt6wdf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>nprt6wdf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>nprt6wdf</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>nprt6wdf</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -107,18 +107,18 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> </ClCompile> @@ -129,15 +129,15 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS60=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -153,9 +153,10 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <ClCompile> <ExceptionHandling> @@ -165,7 +166,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> </Link> @@ -177,7 +178,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> </Link> diff --git a/network/ndis/ndisprot_kmdf/60/protuser.h b/network/ndis/ndisprot_kmdf/60/protuser.h index 44a57c95..cba3a678 100644 --- a/network/ndis/ndisprot_kmdf/60/protuser.h +++ b/network/ndis/ndisprot_kmdf/60/protuser.h @@ -4,7 +4,7 @@ Copyright (c) 2000 Microsoft Corporation Module Name: - nuiouser.h + protuser.h Abstract: diff --git a/network/ndis/ndisprot_kmdf/60/send.c b/network/ndis/ndisprot_kmdf/60/send.c index 5c009939..31efd03c 100644 --- a/network/ndis/ndisprot_kmdf/60/send.c +++ b/network/ndis/ndisprot_kmdf/60/send.c @@ -37,10 +37,10 @@ Arguments: Queue - Default queue handle Request - Handle to the read/write request - Lenght - Length of the data buffer associated with the request. + Length - Length of the data buffer associated with the request. The default property of the queue is to not dispatch - zero lenght read & write requests to the driver and - complete is with status success. So we will never get + zero length read & write requests to the driver and + complete it with status success. So we will never get a zero length request. Return Value: diff --git a/network/ndis/ndisprot_kmdf/Package/package.VcxProj b/network/ndis/ndisprot_kmdf/Package/package.VcxProj index a4c9990a..6eee04d4 100644 --- a/network/ndis/ndisprot_kmdf/Package/package.VcxProj +++ b/network/ndis/ndisprot_kmdf/Package/package.VcxProj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -39,15 +39,11 @@ <SampleGuid>{9B10F9EB-6405-4756-A5C7-FB9F5A528BE5}</SampleGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>true</UseDebugLibraries> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>false</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>true</UseDebugLibraries> </PropertyGroup> @@ -55,6 +51,10 @@ <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>false</UseDebugLibraries> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <TargetVersion>Windows10</TargetVersion> + <UseDebugLibraries>false</UseDebugLibraries> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> @@ -79,22 +79,22 @@ <VerifyDrivers /> <VerifyFlags>133563</VerifyFlags> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> diff --git a/network/ndis/ndisprot_kmdf/ndisprot_kmdf.sln b/network/ndis/ndisprot_kmdf/ndisprot_kmdf.sln index e8eb8891..4cf5bdbc 100644 --- a/network/ndis/ndisprot_kmdf/ndisprot_kmdf.sln +++ b/network/ndis/ndisprot_kmdf/ndisprot_kmdf.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -17,32 +17,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nprt6wdf", "60\nprt6wdf.vcx EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|Win32.ActiveCfg = Debug|Win32 - {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|Win32.Build.0 = Debug|Win32 - {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|Win32.ActiveCfg = Release|Win32 - {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|Win32.Build.0 = Release|Win32 + {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|ARM64.Build.0 = Debug|ARM64 + {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|ARM64.Build.0 = Debug|ARM64 + {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|ARM64.Build.0 = Debug|ARM64 + {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|ARM64.ActiveCfg = Release|ARM64 + {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|ARM64.Build.0 = Release|ARM64 + {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|ARM64.ActiveCfg = Release|ARM64 + {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|ARM64.Build.0 = Release|ARM64 + {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Release|ARM64.ActiveCfg = Release|ARM64 + {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Release|ARM64.Build.0 = Release|ARM64 {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|x64.ActiveCfg = Debug|x64 {346D9284-B69E-40A5-9584-084D7BE578B2}.Debug|x64.Build.0 = Debug|x64 {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|x64.ActiveCfg = Release|x64 {346D9284-B69E-40A5-9584-084D7BE578B2}.Release|x64.Build.0 = Release|x64 - {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|Win32.ActiveCfg = Debug|Win32 - {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|Win32.Build.0 = Debug|Win32 - {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|Win32.ActiveCfg = Release|Win32 - {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|Win32.Build.0 = Release|Win32 {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|x64.ActiveCfg = Debug|x64 {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Debug|x64.Build.0 = Debug|x64 {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|x64.ActiveCfg = Release|x64 {E92C4A1E-396E-4CAF-A5DB-44901F07C515}.Release|x64.Build.0 = Release|x64 - {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|Win32.ActiveCfg = Debug|Win32 - {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|Win32.Build.0 = Debug|Win32 - {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Release|Win32.ActiveCfg = Release|Win32 - {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Release|Win32.Build.0 = Release|Win32 {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|x64.ActiveCfg = Debug|x64 {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Debug|x64.Build.0 = Debug|x64 {D01AA8E0-4817-4C0F-BDD7-B367F1A4B680}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/ndis/ndisprot_kmdf/notifyob/ProtNotify.vcxproj b/network/ndis/ndisprot_kmdf/notifyob/ProtNotify.vcxproj index da20b3b2..629ce98a 100644 --- a/network/ndis/ndisprot_kmdf/notifyob/ProtNotify.vcxproj +++ b/network/ndis/ndisprot_kmdf/notifyob/ProtNotify.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,11 +22,11 @@ <ProjectGuid>{E92C4A1E-396E-4CAF-A5DB-44901F07C515}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> - <KMDF_VERSION_MINOR>11</KMDF_VERSION_MINOR> + <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> <SupportsPackaging>false</SupportsPackaging> <RequiresPackageProject>true</RequiresPackageProject> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{27DF4F3B-383E-497C-8DBB-DFA4C1A27708}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -38,23 +38,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> @@ -69,26 +69,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ProtNotify</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>ProtNotify</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ProtNotify</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>ProtNotify</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -102,7 +102,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ClCompile> @@ -113,7 +113,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ClCompile> @@ -124,7 +124,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;_WINDOWS;_USRDLL;USE_STDAFX;UNICODE;_UNICODE</PreprocessorDefinitions> </ClCompile> @@ -137,26 +137,22 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -165,19 +161,19 @@ <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <RuntimeTypeInfo>true</RuntimeTypeInfo> <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <RuntimeTypeInfo>true</RuntimeTypeInfo> <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <RuntimeTypeInfo>true</RuntimeTypeInfo> <ExceptionHandling>Sync</ExceptionHandling> @@ -186,13 +182,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <UseOfAtl>Static</UseOfAtl> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -200,84 +196,84 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;setupapi.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ResourceCompile> <Link> <ModuleDefinitionFile>ProtNotify.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ResourceCompile> <Link> <ModuleDefinitionFile>ProtNotify.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ResourceCompile> <Link> <ModuleDefinitionFile>ProtNotify.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=11</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.11</AdditionalIncludeDirectories> + <PreprocessorDefinitions>%(PreprocessorDefinitions);KMDF_VERSION_MAJOR=1;KMDF_VERSION_MINOR=15</PreprocessorDefinitions> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WDKContentRoot)\Include\wdf\kmdf\1.15</AdditionalIncludeDirectories> </ResourceCompile> <Link> <ModuleDefinitionFile>ProtNotify.def</ModuleDefinitionFile> diff --git a/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp b/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp index 2452d95c..2414ceee 100644 --- a/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp +++ b/network/ndis/ndisprot_kmdf/notifyob/dllmain.cpp @@ -12,10 +12,10 @@ Abstract: notify object dll and the Wdf Coinstaller library. --*/ - + #include "Common.hpp" #include <DriverSpecs.h> -_Analysis_mode_(_Analysis_code_type_user_code_) +_Analysis_mode_(_Analysis_code_type_user_code_) #include <strsafe.h> #include "ProtNotify_i.c" @@ -61,7 +61,7 @@ DllMain( if (Reason == DLL_PROCESS_ATTACH) { // // Initialize the COM Server module with the object map. - // Do this prior to loading the coinstaller as the detach + // Do this prior to loading the coinstaller as the detach // assumes the Module is initialized. // _Module.Init(ObjectMap, Instance); @@ -159,8 +159,8 @@ HMODULE LoadWdfCoInstaller( ) { - - #pragma prefast(suppress:6262, "Supprress overflow warnings") + + #pragma prefast(suppress:6262, "Supprress overflow warnings") HRESULT hr = S_OK; HMODULE library = NULL; WCHAR coinstaller[MAX_PATH] = {0}; @@ -190,7 +190,7 @@ LoadWdfCoInstaller( // // Load the Wdf Coinstaller library. // -#pragma prefast(suppress:28160, "Suppressing false positive from PFD") +#pragma prefast(suppress:28160, "Suppressing false positive from PFD") library = LoadLibrary(coinstaller); if (library == NULL) { hr = GetLastError(); diff --git a/network/ndis/netvmini/6x/60/netvmini60.inf b/network/ndis/netvmini/6x/60/netvmini60.inf Binary files differindex 63382e9b..31361685 100644 --- a/network/ndis/netvmini/6x/60/netvmini60.inf +++ b/network/ndis/netvmini/6x/60/netvmini60.inf diff --git a/network/ndis/netvmini/6x/60/netvmini60.rc b/network/ndis/netvmini/6x/60/netvmini60.rc index ac470534..a01b2097 100644 --- a/network/ndis/netvmini/6x/60/netvmini60.rc +++ b/network/ndis/netvmini/6x/60/netvmini60.rc @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: - netvmini.rc + netvmini60.rc Abstract: diff --git a/network/ndis/netvmini/6x/60/netvmini60.vcxproj b/network/ndis/netvmini/6x/60/netvmini60.vcxproj index 5e5a4ed9..c48172b8 100644 --- a/network/ndis/netvmini/6x/60/netvmini60.vcxproj +++ b/network/ndis/netvmini/6x/60/netvmini60.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{50458BE9-A423-44C1-AF44-21D4B5233063}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{68DE2BFB-DBF2-4102-B6D9-5C3D45F287A0}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,13 +65,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -89,13 +89,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>netvmini60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>netvmini60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>netvmini60</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>netvmini60</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -127,9 +127,9 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> @@ -139,23 +139,24 @@ </ExceptionHandling> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -183,9 +184,9 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> @@ -195,12 +196,12 @@ </ExceptionHandling> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS60_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </ResourceCompile> diff --git a/network/ndis/netvmini/6x/620/netvmini620.inf b/network/ndis/netvmini/6x/620/netvmini620.inf Binary files differindex 4dc1c9b6..f2ece226 100644 --- a/network/ndis/netvmini/6x/620/netvmini620.inf +++ b/network/ndis/netvmini/6x/620/netvmini620.inf diff --git a/network/ndis/netvmini/6x/620/netvmini620.rc b/network/ndis/netvmini/6x/620/netvmini620.rc index 72dba137..ddd4495d 100644 --- a/network/ndis/netvmini/6x/620/netvmini620.rc +++ b/network/ndis/netvmini/6x/620/netvmini620.rc @@ -9,7 +9,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. Module Name: - netvmini.rc + netvmini620.rc Abstract: diff --git a/network/ndis/netvmini/6x/620/netvmini620.vcxproj b/network/ndis/netvmini/6x/620/netvmini620.vcxproj index 90d22072..9119e6d9 100644 --- a/network/ndis/netvmini/6x/620/netvmini620.vcxproj +++ b/network/ndis/netvmini/6x/620/netvmini620.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{062B87F8-6021-4BE2-B677-3AEF2456CBA0}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{A9AA92D6-CEFF-4533-A39F-156429EEE805}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,13 +65,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -89,13 +89,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>netvmini620</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>netvmini620</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>netvmini620</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>netvmini620</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -127,9 +127,9 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> @@ -139,23 +139,24 @@ </ExceptionHandling> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -183,9 +184,9 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> @@ -195,12 +196,12 @@ </ExceptionHandling> </ClCompile> <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </Midl> <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS620_MINIPORT=1</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_MINIPORT_DRIVER=1</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1</PreprocessorDefinitions> </ResourceCompile> diff --git a/network/ndis/netvmini/6x/630/netvmini630.inf b/network/ndis/netvmini/6x/630/netvmini630.inf Binary files differindex eb7d61c8..40db5135 100644 --- a/network/ndis/netvmini/6x/630/netvmini630.inf +++ b/network/ndis/netvmini/6x/630/netvmini630.inf diff --git a/network/ndis/netvmini/6x/630/netvmini630.vcxproj b/network/ndis/netvmini/6x/630/netvmini630.vcxproj index 65b5dd78..fabd1729 100644 --- a/network/ndis/netvmini/6x/630/netvmini630.vcxproj +++ b/network/ndis/netvmini/6x/630/netvmini630.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{7B9C33BA-F817-42B9-A355-9E54854CE9D6}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{173BE266-31F2-4D74-A9C1-35B20D4DD5EA}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,13 +65,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -89,13 +89,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>netvmini630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>netvmini630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>netvmini630</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>netvmini630</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -127,7 +127,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -150,12 +150,13 @@ </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -183,7 +184,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS630_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> diff --git a/network/ndis/netvmini/6x/680/netvmini680.inf b/network/ndis/netvmini/6x/680/netvmini680.inf Binary files differindex 4160c520..5da91049 100644 --- a/network/ndis/netvmini/6x/680/netvmini680.inf +++ b/network/ndis/netvmini/6x/680/netvmini680.inf diff --git a/network/ndis/netvmini/6x/680/netvmini680.vcxproj b/network/ndis/netvmini/6x/680/netvmini680.vcxproj index 01b8736e..20bb5f7b 100644 --- a/network/ndis/netvmini/6x/680/netvmini680.vcxproj +++ b/network/ndis/netvmini/6x/680/netvmini680.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{B08F62D4-7A4C-4789-A0F7-862E622839A7}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{173BE266-31F2-4D74-A9C1-35B20D4DD5EA}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,13 +65,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -89,13 +89,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>netvmini680</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>netvmini680</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>netvmini680</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>netvmini680</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -127,7 +127,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS680_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -150,12 +150,13 @@ </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib</AdditionalDependencies> + <CETCompat>false</CETCompat> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS680_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> @@ -183,7 +184,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS680_MINIPORT=1</PreprocessorDefinitions> <TreatWarningAsError>true</TreatWarningAsError> diff --git a/network/ndis/netvmini/6x/adapter.c b/network/ndis/netvmini/6x/adapter.c index 3cf0ce59..1dd3e312 100644 --- a/network/ndis/netvmini/6x/adapter.c +++ b/network/ndis/netvmini/6x/adapter.c @@ -552,7 +552,7 @@ Routine Description: send requests must be completed, and new requests must be rejected with NDIS_STATUS_PAUSED. - Once all sends have been completed and all recieve NBLs have returned to + Once all sends have been completed and all receive NBLs have returned to the miniport, the miniport enters the Paused state. While paused, the miniport can still service interrupts from the hardware @@ -2281,7 +2281,7 @@ Arguments: Return Value: - NDIS_STATUS_SUCCESS if reference was acquired succesfully. + NDIS_STATUS_SUCCESS if reference was acquired successfully. NDIS_STATUS_ADAPTER_NOT_READY if the adapter state is such that we should not acquire new references to resources --*/ diff --git a/network/ndis/netvmini/6x/adapter.h b/network/ndis/netvmini/6x/adapter.h index cfc540d3..92d84508 100644 --- a/network/ndis/netvmini/6x/adapter.h +++ b/network/ndis/netvmini/6x/adapter.h @@ -52,14 +52,14 @@ typedef struct _MP_ADAPTER_RECEIVE_DPC { LIST_ENTRY Entry; // - // Kernel DPC used for recieve + // Kernel DPC used for receive // KDPC Dpc; USHORT ProcessorGroup; ULONG ProcessorNumber; // - // Tracks which receive blocks need to be recieved on this DPC. + // Tracks which receive blocks need to be received on this DPC. // BOOLEAN RecvBlock[NIC_SUPPORTED_NUM_QUEUES]; volatile LONG RecvBlockCount; diff --git a/network/ndis/netvmini/6x/ctrlpath.c b/network/ndis/netvmini/6x/ctrlpath.c index 6a745a36..3864420a 100644 --- a/network/ndis/netvmini/6x/ctrlpath.c +++ b/network/ndis/netvmini/6x/ctrlpath.c @@ -20,6 +20,7 @@ Abstract: #include "netvmin6.h" +#include <ntintsafe.h> #include "ctrlpath.tmh" @@ -223,7 +224,7 @@ MPSynchronousOidRequest( Routine Description: - Entry point called by NDIS to get or set the value of a specified + Entry point called by NDIS to get or set the value of a specified synchronous OID. Arguments: @@ -516,7 +517,7 @@ Return Value: #if (NDIS_SUPPORT_NDIS61 && !NDIS_SUPPORT_NDIS620) case OID_PNP_CAPABILITIES: // - // This OID is obsolete for NDIS 6.20 drivers + // This OID is obsolete for NDIS 6.20 drivers // // Return the wake-up capabilities of its NIC. If you return // NDIS_STATUS_NOT_SUPPORTED, NDIS considers the miniport driver @@ -773,7 +774,7 @@ Return Value: case OID_GEN_INTERRUPT_MODERATION: { PNDIS_INTERRUPT_MODERATION_PARAMETERS Moderation = (PNDIS_INTERRUPT_MODERATION_PARAMETERS)Query->InformationBuffer; - Moderation->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; + Moderation->Header.Type = NDIS_OBJECT_TYPE_DEFAULT; Moderation->Header.Revision = NDIS_INTERRUPT_MODERATION_PARAMETERS_REVISION_1; Moderation->Header.Size = NDIS_SIZEOF_INTERRUPT_MODERATION_PARAMETERS_REVISION_1; Moderation->Flags = 0; @@ -906,10 +907,10 @@ Return Value: case OID_RECEIVE_FILTER_FREE_QUEUE: // - // Free the requested receive queue. + // Free the requested receive queue. // Status = NICFreeRxQueue( - Adapter, + Adapter, NdisSetRequest); break; @@ -928,17 +929,17 @@ Return Value: // Status = NICUpdateRxQueue( Adapter, - NdisSetRequest); + NdisSetRequest); break; #endif case OID_PNP_SET_POWER: // - // Update power state + // Update power state // Status = MPSetPower( Adapter, - NdisSetRequest); + NdisSetRequest); break; #if (NDIS_SUPPORT_NDIS680) @@ -962,7 +963,7 @@ Return Value: case OID_PNP_REMOVE_WAKE_UP_PATTERN: case OID_PNP_ENABLE_WAKE_UP: #endif - ASSERT(!"NIC does not support wake on LAN OIDs"); + ASSERT(!"NIC does not support wake on LAN OIDs"); default: Status = NDIS_STATUS_NOT_SUPPORTED; break; @@ -1015,24 +1016,24 @@ Return Value: switch (Oid) { - + #if (NDIS_SUPPORT_NDIS620) case OID_RECEIVE_FILTER_ALLOCATE_QUEUE: // // Allocate the requested receive queue. // Status = NICAllocateRxQueue( - Adapter, + Adapter, NdisRequest); break; case OID_RECEIVE_FILTER_QUEUE_ALLOCATION_COMPLETE: // - // Complete any remaining allocation for receive queues. + // Complete any remaining allocation for receive queues. // Status = NICCompleteAllocationRxQueue( - Adapter, + Adapter, NdisRequest); break; @@ -1305,7 +1306,7 @@ NICAllocateRxQueue( Routine Description: This routine will allocate a receive queue according to the passed in allocation request. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1321,22 +1322,22 @@ Return Value: NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _METHOD *Method = &NdisMethodRequest->DATA.METHOD_INFORMATION; PNDIS_RECEIVE_QUEUE_PARAMETERS QueueParams = (PNDIS_RECEIVE_QUEUE_PARAMETERS)Method->InformationBuffer; - + PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICAllocateRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1; @@ -1373,7 +1374,7 @@ NICCompleteAllocationRxQueue( Routine Description: This routine will complete any remaining queue allocation, including shared memory. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1384,7 +1385,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1394,21 +1395,21 @@ Return Value: PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICCompleteAllocationRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // - Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1+ + Method->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_ALLOCATION_COMPLETE_ARRAY_REVISION_1+ (CompleteArray->NumElements * CompleteArray->ElementSize); // @@ -1417,9 +1418,9 @@ Return Value: Status = CompleteAllocationRxQueue(Adapter, CompleteArray); }while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- NICCompleteAllocationRxQueue Status 0x%08x\n", Adapter, Status); - + return Status; } @@ -1432,7 +1433,7 @@ NICFreeRxQueue( Routine Description: This routine will handle the passed in queue free request. It verifies that the request - is well formed, then passes the request to underlying queue management code. + is well formed, then passes the request to underlying queue management code. Arguments: @@ -1452,21 +1453,21 @@ Return Value: PAGED_CODE(); DEBUGP(MP_TRACE, "[%p] ---> NICFreeRxQueue\n", Adapter); - + do { // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_QUEUE_FREE_PARAMETERS_REVISION_1; - + // // Default queue cannot be freed // @@ -1478,14 +1479,14 @@ Return Value: } // - // Ready to attempt a free. + // Ready to attempt a free. // Status = FreeRxQueue(Adapter, QueueFreeParams, NdisSetRequest); }while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- NICFreeRxQueuee Status 0x%08x\n", Adapter, Status); - + return Status; } @@ -1498,7 +1499,7 @@ NICSetRxFilter( Routine Description: This routine will handle the passed filter set request. It verifies that the request - is well formed, then passes the request to underlying filter management code. + is well formed, then passes the request to underlying filter management code. Arguments: @@ -1509,7 +1510,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1523,12 +1524,12 @@ Return Value: // // Verify that the request matches our requirements // - VERIFY_OID_METHOD(NdisMethodRequest, - NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_1, + VERIFY_OID_METHOD(NdisMethodRequest, + NDIS_RECEIVE_FILTER_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Method->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_PARAMETERS_REVISION_1; @@ -1536,7 +1537,7 @@ Return Value: // Ready to set Filter // Status = SetRxFilter(Adapter, FilterParams); - + }while(FALSE); return Status; @@ -1551,7 +1552,7 @@ NICClearRxFilter( Routine Description: This routine will handle the passed filter clear request. It verifies that the request - is well formed, then passes the request to underlying filter management code. + is well formed, then passes the request to underlying filter management code. Arguments: @@ -1562,7 +1563,7 @@ Return Value: NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _SET *Set = &NdisSetRequest->DATA.SET_INFORMATION; @@ -1576,15 +1577,15 @@ Return Value: // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1; - + // // Ready to clear the filter // @@ -1613,15 +1614,15 @@ NICUpdateRxQueue( // // Verify that the request matches our requirements // - VERIFY_OID_SET(NdisSetRequest, - NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, + VERIFY_OID_SET(NdisSetRequest, + NDIS_RECEIVE_QUEUE_PARAMETERS_REVISION_1, NDIS_SIZEOF_RECEIVE_QUEUE_PARAMETERS_REVISION_1); // - // Request is well formed, set bytes read + // Request is well formed, set bytes read // Set->BytesRead = NDIS_SIZEOF_RECEIVE_FILTER_CLEAR_PARAMETERS_REVISION_1; - + // // Ready to clear the filter // @@ -1671,6 +1672,9 @@ Return Value: do { + ULONG ClassificationBytes = 0; + ULONG BytesRead = 0; + // // Verify that the request matches our requirements. // @@ -1681,8 +1685,18 @@ Return Value: // // Request is well formed, set bytes read. // - Method->BytesRead = NDIS_SIZEOF_QOS_PARAMETERS_REVISION_1 + - Params->NumClassificationElements * Params->ClassificationElementSize; + if (!NT_SUCCESS(RtlULongMult(Params->NumClassificationElements, + Params->ClassificationElementSize, + &ClassificationBytes)) || + !NT_SUCCESS(RtlULongAdd(NDIS_SIZEOF_QOS_PARAMETERS_REVISION_1, + ClassificationBytes, + &BytesRead))) + { + Status = NDIS_STATUS_INVALID_LENGTH; + break; + } + + Method->BytesRead = BytesRead; Status = SetQOSParameters(Adapter, Params); if (Status != NDIS_STATUS_SUCCESS) @@ -1711,7 +1725,7 @@ MPSetPower( /*++ Routine Description: - This routine handles OID_PNP_SET_POWER request. + This routine handles OID_PNP_SET_POWER request. Arguments: @@ -1720,9 +1734,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; struct _SET *Set = &NdisSetRequest->DATA.SET_INFORMATION; @@ -1775,9 +1789,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; @@ -1799,19 +1813,19 @@ MPSetPowerLow( /*++ Routine Description: - The NIC is about to be transitioned to a low power state. + The NIC is about to be transitioned to a low power state. Prepare the NIC for the sleeping state: - - Disable interrupts and the NIC's DMA engine, cancel timers. - - Save any hardware context that the NIC cannot preserve in - a sleeping state (packet filters, multicast addresses, + - Disable interrupts and the NIC's DMA engine, cancel timers. + - Save any hardware context that the NIC cannot preserve in + a sleeping state (packet filters, multicast addresses, the current MAC address, etc.) - A miniport driver cannot access the NIC hardware after + A miniport driver cannot access the NIC hardware after the NIC has been set to the D3 state by the bus driver. - Miniport drivers NDIS v6.30 and above - Do NOT wait for NDIS to return the ownership of all + Miniport drivers NDIS v6.30 and above + Do NOT wait for NDIS to return the ownership of all NBLs from outstanding receive indications - Retain ownership of all the receive descriptors and + Retain ownership of all the receive descriptors and packet buffers previously owned by the hardware. Arguments: @@ -1821,9 +1835,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { NDIS_STATUS Status = NDIS_STATUS_SUCCESS; LONG nSendWaitCount = 0; @@ -1837,8 +1851,8 @@ Return Value: #if (NDIS_SUPPORT_NDIS630) // - // Miniport drivers NDIS v6.30 and above are not - // necessarily paused prior the low power transition + // Miniport drivers NDIS v6.30 and above are not + // necessarily paused prior the low power transition // // @@ -1848,7 +1862,7 @@ Return Value: // // Wait for outstanding sends - // Do NOT wait for outstanding receives + // Do NOT wait for outstanding receives // while(Adapter->nBusySend) { @@ -1867,8 +1881,8 @@ Return Value: UNREFERENCED_PARAMETER(nSendWaitCount); // - // Miniport drivers NDIS v6.20 and below are - // paused prior the low power transition + // Miniport drivers NDIS v6.20 and below are + // paused prior the low power transition // ASSERT(MP_TEST_FLAG(Adapter, fMP_ADAPTER_PAUSED)); ASSERT(!NICIsBusy(Adapter)); @@ -1888,7 +1902,7 @@ MPSetRSSv2Parameters( /*++ Routine Description: - This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. + This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. Arguments: @@ -1897,9 +1911,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { struct _SET *Set; @@ -1908,7 +1922,7 @@ Return Value: // // Validate the request // - if (Set->InformationBufferLength < + if (Set->InformationBufferLength < NDIS_SIZEOF_RECEIVE_SCALE_PARAMETERS_V2_REVISION_1) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid InformationBufferLength\n"); @@ -1928,7 +1942,7 @@ MPSetRSSv2IndirectionTableEntries( /*++ Routine Description: - This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. + This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. Arguments: @@ -1937,9 +1951,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { struct _METHOD *Method; @@ -1950,7 +1964,7 @@ Return Value: // // Validate the request // - if (Method->InputBufferLength < + if (Method->InputBufferLength < NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRIES_REVISION_1) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid InformationBufferLength\n"); diff --git a/network/ndis/netvmini/6x/datapath.c b/network/ndis/netvmini/6x/datapath.c index 1c18094c..19b7cb6c 100644 --- a/network/ndis/netvmini/6x/datapath.c +++ b/network/ndis/netvmini/6x/datapath.c @@ -755,7 +755,7 @@ Arguments: Return Value: - NDIS_STATUS_SUCCESS if reference was acquired succesfully. + NDIS_STATUS_SUCCESS if reference was acquired successfully. NDIS_STATUS_ADAPTER_NOT_READY if the adapter state is such that we should not acquire new references to resources --*/ diff --git a/network/ndis/netvmini/6x/hardware.h b/network/ndis/netvmini/6x/hardware.h index ddc4c4a3..3b0731b0 100644 --- a/network/ndis/netvmini/6x/hardware.h +++ b/network/ndis/netvmini/6x/hardware.h @@ -130,7 +130,7 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // // Maximum number of receives that will be processed per DPC. -// This constraints the amount of time spent for a single receive DPC. +// This constraints the amount of time spent for a single receive DPC. // #define NIC_MAX_RECVS_PER_DPC 64 @@ -179,9 +179,9 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // and suspend. Ensure the correct flags are set for your hardware. // // If your hardware supports busmaster DMA, you must specify -// NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER. Our virtual miniport will -// not be allocating hardware resources such as interrupts, so we set the -// WDM attribute. +// NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER. Our virtual miniport will +// not be allocating hardware resources such as interrupts, so we set the +// WDM attribute. // #define NIC_ADAPTER_ATTRIBUTES_FLAGS (\ NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM) @@ -239,21 +239,21 @@ C_ASSERT(sizeof(NIC_FRAME_HEADER) == HW_FRAME_HEADER_SIZE); // // The NIC must reserve at least one filter available HW queue. More filters allows // the VMQ queues to be assigned asymmetrically. For this sample we chose to allow -// twice as many filters as queues. +// twice as many filters as queues. // #define NIC_SUPPORTED_NUM_QUEUES 8 #define NIC_MAX_HEADER_FILTERS (NIC_SUPPORTED_NUM_QUEUES*2) // // Determines the minimum and maximum amount of lookahead split that we can do. Real hardware -// might have tighter constraints on the range depending on the HW design. +// might have tighter constraints on the range depending on the HW design. // #define NIC_MIN_LOOKAHEAD_SPLIT 64 #define NIC_MAX_LOOKAHEAD_SPLIT 128 // // Determines the minimum amount of receive blocks we will attempt to allocate if the full allocations fail and -// we retry with a reduced count. If we fail with this amount we fail the allocation. +// we retry with a reduced count. If we fail with this amount we fail the allocation. // #define NIC_MIN_BUSY_RECVS 64 diff --git a/network/ndis/netvmini/6x/miniport.c b/network/ndis/netvmini/6x/miniport.c index 9ec793af..5526789f 100644 --- a/network/ndis/netvmini/6x/miniport.c +++ b/network/ndis/netvmini/6x/miniport.c @@ -344,7 +344,7 @@ VOID MPAttachAdapter( _In_ PMP_ADAPTER Adapter) { - MP_LOCK_STATE LockState; + MP_LOCK_STATE LockState; DEBUGP(MP_TRACE, "[%p] ---> MPAttachAdapter\n", Adapter); diff --git a/network/ndis/netvmini/6x/miniport.h b/network/ndis/netvmini/6x/miniport.h index 364ad704..77d68599 100644 --- a/network/ndis/netvmini/6x/miniport.h +++ b/network/ndis/netvmini/6x/miniport.h @@ -19,7 +19,7 @@ Abstract: 1. Set the correct driver version number for your versioning scheme. 2. Create unique memory allocation tags. - --*/ +--*/ #ifndef _MINIPORT_H diff --git a/network/ndis/netvmini/6x/mphal.c b/network/ndis/netvmini/6x/mphal.c index e363f613..63aff834 100644 --- a/network/ndis/netvmini/6x/mphal.c +++ b/network/ndis/netvmini/6x/mphal.c @@ -90,7 +90,7 @@ Return Value: case CmResourceTypePort: DEBUGP(MP_INFO, "[%p] IoBaseAddress = 0x%x\n", Adapter, NdisGetPhysicalAddressLow(pResDesc->u.Port.Start)); - DEBUGP(MP_INFO, "[%p] IoRange = x%x\n", Adapter, + DEBUGP(MP_INFO, "[%p] IoRange = x%x\n", Adapter, pResDesc->u.Port.Length); break; @@ -173,7 +173,7 @@ Return Value: NDIS_STATUS Status; PNDIS_CONFIGURATION_PARAMETER Parameter = NULL; NDIS_STRING PermanentAddressKey = RTL_CONSTANT_STRING(NETVMINI_MAC_ADDRESS_KEY); - + UNREFERENCED_PARAMETER(Adapter); PAGED_CODE(); @@ -234,7 +234,7 @@ Return Value: PermanentMacAddress[2] = 0xF2; // - // Generated value based on the current tick count value. + // Generated value based on the current tick count value. // KeQueryTickCount(&TickCountValue); do @@ -455,9 +455,9 @@ HWCopyBytesFromNetBuffer( Routine Description: - Copies the first cbDest bytes from a NET_BUFFER. In order to show how the various data structures fit together, this + Copies the first cbDest bytes from a NET_BUFFER. In order to show how the various data structures fit together, this implementation copies the data by iterating through the MDLs for the NET_BUFFER. The NdisGetDataBuffer API also allows you - to copy a contiguous block of data from a NET_BUFFER. + to copy a contiguous block of data from a NET_BUFFER. Runs at IRQL <= DISPATCH_LEVEL. @@ -496,8 +496,8 @@ Notes: while (DestOffset < *cbDest && CurrentMdl) { // - // Map MDL memory to System Address Space. LowPagePriority means mapping may fail if - // system is low on memory resources. + // Map MDL memory to System Address Space. LowPagePriority means mapping may fail if + // system is low on memory resources. // PUCHAR SrcMemory = MmGetSystemAddressForMdlSafe(CurrentMdl, LowPagePriority | MdlMappingNoExecute); ULONG Length = MmGetMdlByteCount(CurrentMdl); @@ -526,7 +526,7 @@ Notes: DestOffset += Length; // - // Get next MDL (if any available) + // Get next MDL (if any available) // CurrentMdl = NDIS_MDL_LINKAGE(CurrentMdl); } @@ -837,12 +837,12 @@ Return Value: // - // For simplicity in the sample in order to support VLAN we extract the information from the NBL or frame and pass the + // For simplicity in the sample in order to support VLAN we extract the information from the NBL or frame and pass the // NDIS_NET_BUFFER_LIST_8021Q_INFO structure to the code that simulates the send/receive. The code does nothing to convert - // modify the frame format. + // modify the frame format. // In real HW, on send the code should extract the information from the NBL and covert it to 802.1Q format for transmission, and // on receive the adapter should detect if the packet is in 802.1Q format and if so convert it back to 802.3 before indicating it up to NDIS - // (populating the 8021Q info in the NBL being indicated). + // (populating the 8021Q info in the NBL being indicated). // Nbl = NBL_FROM_SEND_NB(NetBuffer); Nbl1QInfo.Value = NET_BUFFER_LIST_INFO(Nbl, Ieee8021QNetBufferListInfo); @@ -854,7 +854,7 @@ Return Value: else { DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no OOB VLAN tag, checking frame header.\n", Adapter, Nbl); - if(IS_FRAME_8021Q(Frame)) + if(IS_FRAME_8021Q(Frame)) { // // The frame has type of 802.1Q. Retrieve the VLAN information @@ -864,9 +864,9 @@ Return Value: } else { - DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no VLAN information in its frame header.\n", Adapter, Nbl); + DEBUGP(MP_TRACE, "[%p] Send NBL (%p) has no VLAN information in its frame header.\n", Adapter, Nbl); } - } + } RXDeliverFrameToEveryAdapter(Adapter, &Nbl1QInfo, Frame, fAtDispatch); @@ -923,8 +923,8 @@ HWBeginReceiveDma( Routine Description: - Simulate the hardware deciding to receive a FRAME into one of its RCBs. In VMQ enabled scenarios, it will - find the matching queue and if matched retrieve the shared memory for the queue for the NBL. Otherwise, it + Simulate the hardware deciding to receive a FRAME into one of its RCBs. In VMQ enabled scenarios, it will + find the matching queue and if matched retrieve the shared memory for the queue for the NBL. Otherwise, it uses the existing Frame for the NBL. Arguments: @@ -949,7 +949,7 @@ Return Value: DEBUGP(MP_TRACE, "[%p] ---> HWBeginReceiveDma. Frame: 0x%p\n", Adapter, Frame); // - // Preserve 802.1Q information, if specified. + // Preserve 802.1Q information, if specified. // if(Nbl1QInfo->Value) { @@ -963,7 +963,7 @@ Return Value: } // - // If VMQ is enabled, and we're not using the default queue, + // If VMQ is enabled, and we're not using the default queue, // we need to copy the FRAME to the NBL's shared memory area // if(VMQ_ENABLED(Adapter)) @@ -991,12 +991,12 @@ Return Value: NET_BUFFER_DATA_OFFSET(NetBuffer) = 0; NET_BUFFER_CURRENT_MDL(NetBuffer) = NET_BUFFER_FIRST_MDL(NetBuffer); NET_BUFFER_CURRENT_MDL_OFFSET(NetBuffer) = 0; - + } while(FALSE); - + DEBUGP(MP_TRACE, "[%p] <--- HWBeginReceiveDma Status 0x%08x\n", Adapter, Status); return Status; } - + diff --git a/network/ndis/netvmini/6x/mphal.h b/network/ndis/netvmini/6x/mphal.h index 5348545b..0bcd11e6 100644 --- a/network/ndis/netvmini/6x/mphal.h +++ b/network/ndis/netvmini/6x/mphal.h @@ -51,7 +51,7 @@ struct _RCB; typedef struct _VLAN_TAG_HEADER { - UCHAR TagInfo[2]; + UCHAR TagInfo[2]; } VLAN_TAG_HEADER, *PVLAN_TAG_HEADER; #define GET_FRAME_VLAN_TAG_HEADER(_Frame)\ diff --git a/network/ndis/netvmini/6x/netvmini.sln b/network/ndis/netvmini/6x/netvmini.sln index e5eaca43..e623ae9a 100644 --- a/network/ndis/netvmini/6x/netvmini.sln +++ b/network/ndis/netvmini/6x/netvmini.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -21,40 +21,36 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netvmini680", "680\netvmini EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {50458BE9-A423-44C1-AF44-21D4B5233063}.Debug|Win32.ActiveCfg = Debug|Win32 - {50458BE9-A423-44C1-AF44-21D4B5233063}.Debug|Win32.Build.0 = Debug|Win32 - {50458BE9-A423-44C1-AF44-21D4B5233063}.Release|Win32.ActiveCfg = Release|Win32 - {50458BE9-A423-44C1-AF44-21D4B5233063}.Release|Win32.Build.0 = Release|Win32 + {50458BE9-A423-44C1-AF44-21D4B5233063}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|ARM64.Build.0 = Debug|ARM64 + {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|ARM64.Build.0 = Debug|ARM64 + {50458BE9-A423-44C1-AF44-21D4B5233063}.Release|ARM64.ActiveCfg = Release|ARM64 + {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Release|ARM64.ActiveCfg = Release|ARM64 + {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|ARM64.ActiveCfg = Release|ARM64 + {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|ARM64.Build.0 = Release|ARM64 + {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Release|ARM64.ActiveCfg = Release|ARM64 + {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Release|ARM64.Build.0 = Release|ARM64 {50458BE9-A423-44C1-AF44-21D4B5233063}.Debug|x64.ActiveCfg = Debug|x64 {50458BE9-A423-44C1-AF44-21D4B5233063}.Debug|x64.Build.0 = Debug|x64 {50458BE9-A423-44C1-AF44-21D4B5233063}.Release|x64.ActiveCfg = Release|x64 {50458BE9-A423-44C1-AF44-21D4B5233063}.Release|x64.Build.0 = Release|x64 - {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Debug|Win32.ActiveCfg = Debug|Win32 - {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Debug|Win32.Build.0 = Debug|Win32 - {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Release|Win32.ActiveCfg = Release|Win32 - {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Release|Win32.Build.0 = Release|Win32 {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Debug|x64.ActiveCfg = Debug|x64 {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Debug|x64.Build.0 = Debug|x64 {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Release|x64.ActiveCfg = Release|x64 {062B87F8-6021-4BE2-B677-3AEF2456CBA0}.Release|x64.Build.0 = Release|x64 - {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|Win32.Build.0 = Debug|Win32 - {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|Win32.ActiveCfg = Release|Win32 - {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|Win32.Build.0 = Release|Win32 {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|x64.ActiveCfg = Debug|x64 {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Debug|x64.Build.0 = Debug|x64 {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|x64.ActiveCfg = Release|x64 {7B9C33BA-F817-42B9-A355-9E54854CE9D6}.Release|x64.Build.0 = Release|x64 - {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|Win32.Build.0 = Debug|Win32 - {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Release|Win32.ActiveCfg = Release|Win32 - {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Release|Win32.Build.0 = Release|Win32 {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|x64.ActiveCfg = Debug|x64 {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Debug|x64.Build.0 = Debug|x64 {B08F62D4-7A4C-4789-A0F7-862E622839A7}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/ndis/netvmini/6x/qos.c b/network/ndis/netvmini/6x/qos.c index a7b2e530..fe455b1b 100644 --- a/network/ndis/netvmini/6x/qos.c +++ b/network/ndis/netvmini/6x/qos.c @@ -637,7 +637,7 @@ Return Value: IndicateParameters(Adapter, NDIS_STATUS_QOS_OPERATIONAL_PARAMETERS_CHANGE, OperationalParams); - + NdisFreeMemoryWithTagPriority(NdisDriverHandle, OperationalParams, NIC_TAG_QOS_PARAMS); } else diff --git a/network/ndis/netvmini/6x/rssv2.c b/network/ndis/netvmini/6x/rssv2.c index 1f8efb0e..481c4f5e 100644 --- a/network/ndis/netvmini/6x/rssv2.c +++ b/network/ndis/netvmini/6x/rssv2.c @@ -51,10 +51,10 @@ Arguments: Vport - Pointer to the VPort - Command - Move command which identifies the steering + Command - Move command which identifies the steering parameter and the target processor. - NewLocalCpuIndex - Local index of the target processor the steering + NewLocalCpuIndex - Local index of the target processor the steering parameter is being pointed to. Return Value: @@ -74,13 +74,13 @@ MiniportApplyConfigurationToHW( _Inout_ PMP_ADAPTER Adapter, _Inout_ PMP_ADAPTER_VPORT VPort, _In_ BOOLEAN IsRssEnabled, - _In_ USHORT NewITCount, + _In_ USHORT NewITCount, _In_ ULONG NewNumberOfQueues ) /*++ Routine Description: - This routine propagates changes as specified by the configuration OID to + This routine propagates changes as specified by the configuration OID to the HW. All failures cases are already handled and before calling this function. @@ -109,7 +109,7 @@ Return Value: UNREFERENCED_PARAMETER(NewITCount); UNREFERENCED_PARAMETER(NewNumberOfQueues); } - + _IRQL_requires_(PASSIVE_LEVEL) NDIS_STATUS @@ -152,8 +152,8 @@ Return Value: // // Allocate the neccessary memory for reading the available processors // - Adapter->RSSData.RssProcessorInfo = - (PNDIS_RSS_PROCESSOR_INFO)ExAllocatePool2(POOL_FLAG_NON_PAGED, + Adapter->RSSData.RssProcessorInfo = + (PNDIS_RSS_PROCESSOR_INFO)ExAllocatePool2(POOL_FLAG_NON_PAGED, RssInfoSize, 'IRMT'); if (Adapter->RSSData.RssProcessorInfo == NULL) @@ -166,7 +166,7 @@ Return Value: Status = NdisGetRssProcessorInformation(Adapter->AdapterHandle, Adapter->RSSData.RssProcessorInfo, &RssInfoSize); - + if (Status != NDIS_STATUS_SUCCESS) { DEBUGP(MP_ERROR, "%s: Unabled to get rss information\n", __FUNCTION__); @@ -174,7 +174,7 @@ Return Value: } Adapter->RSSData.RssProcessorArray = (PNDIS_RSS_PROCESSOR) - ((PUCHAR)Adapter->RSSData.RssProcessorInfo + + ((PUCHAR)Adapter->RSSData.RssProcessorInfo + Adapter->RSSData.RssProcessorInfo->RssProcessorArrayOffset); Status = NDIS_STATUS_SUCCESS; @@ -210,19 +210,19 @@ Return Value: --*/ { - UINT8 index; + ULONG index; PNDIS_RSS_PROCESSOR processor; - for (index = 0; - index < Adapter->RSSData.RssProcessorInfo->RssProcessorCount; + for (index = 0; + index < Adapter->RSSData.RssProcessorInfo->RssProcessorCount; index++) { processor = &Adapter->RSSData.RssProcessorArray[index]; - if ((processor->ProcNum.Group == ProcessorNumber.Group) && + if ((processor->ProcNum.Group == ProcessorNumber.Group) && (processor->ProcNum.Number == ProcessorNumber.Number)) { - return index; + return (UINT8)index; } } @@ -274,7 +274,7 @@ NICSetRSSv2ValidateRssProcessor( /*++ Routine Description: - This routine validates processor against minport's RSS settings, and if it + This routine validates processor against minport's RSS settings, and if it is valid, returns local index. Arguments: @@ -322,7 +322,7 @@ Return Value: if ((ProcessorNumber.Group == (USHORT)RssProcessorInfo->RssMaxProcessor.Group) && (ProcessorNumber.Number > (UCHAR)RssProcessorInfo->RssMaxProcessor.Number)) { - DEBUGP(MP_ERROR, "RssValidateProcessor: Invalid Proc Number %d:%d, above RssMaxProcNumber\n", + DEBUGP(MP_ERROR, "RssValidateProcessor: Invalid Proc Number %d:%d, above RssMaxProcNumber\n", ProcessorNumber.Group, ProcessorNumber.Number); return FALSE; } @@ -373,7 +373,7 @@ Return Value: VPort->RssEnabled = FALSE; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - PrimaryProcessor, + PrimaryProcessor, &PrimaryProcessorIndex)) { DEBUGP(MP_TRACE, "Primary is not a valid RSS processor.\n"); @@ -393,7 +393,7 @@ Return Value: goto Cleanup; } - RssV2NQEnforcerInitialize(VPort->QueueMap, + RssV2NQEnforcerInitialize(VPort->QueueMap, RSSV2_MAX_NUMBER_OF_PROCESSORS_IN_RSS_TABLE); RtlFillMemory(&VPort->RssV2IndexTable, sizeof(VPort->RssV2IndexTable), 0xFF); @@ -430,7 +430,7 @@ NICSetRSSv2SetCurrentProcessor( /*++ Routine Description: - This routine updates tracking information for the steering parameter + This routine updates tracking information for the steering parameter (Primary, Default or ITE[n]), as selected by the Command. Routine is called after the "move command" has fully succeeded. @@ -474,10 +474,10 @@ Return Value: VPort->RssV2Table[Command->IndirectionTableIndex] = NewProcessor; DEBUGP(MP_TRACE, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: OK: ITE[%d] VPortId %d, RssEnabled %d, TargetProc %d:%d\n", - Command->IndirectionTableIndex, - Command->VPortId, - VPort->RssEnabled, - NewProcessor.Group, + Command->IndirectionTableIndex, + Command->VPortId, + VPort->RssEnabled, + NewProcessor.Group, NewProcessor.Number); } } @@ -495,7 +495,7 @@ NICSetRSSv2ValidateCommandAndGetProcessor ( /*++ Routine Description: - This routine validates the move command, and returns information about + This routine validates the move command, and returns information about specified steering parameter (Primary, Default or ITE[n] if command is valid. Arguments: @@ -504,7 +504,7 @@ Arguments: Command - Move command used to update steering parameter - CurrentProcessor - Pointer which receives processor where steering + CurrentProcessor - Pointer which receives processor where steering parameter currenty points to. CurrentCpuIndex - Corresponding local index @@ -550,8 +550,8 @@ Return Value: } else { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid IndirectionTableIndex(%d) >= %d\n", - Command->IndirectionTableIndex, + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid IndirectionTableIndex(%d) >= %d\n", + Command->IndirectionTableIndex, VPort->RssV2Params.NumberOfIndirectionTableEntries); } } @@ -572,7 +572,7 @@ NICSetRSSv2Parameters( /*++ Routine Description: - This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. + This routine handles OID_GEN_RECEIVE_SCALE_PARAMETERS_V2 set request. Arguments: @@ -581,9 +581,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { USHORT EntryIndex; BOOLEAN IsHashInfoChanged; @@ -614,14 +614,14 @@ Return Value: // // Validate the request // - if (RssParams->HashSecretKeySize != + if (RssParams->HashSecretKeySize != NDIS_RSS_HASH_SECRET_KEY_MAX_SIZE_REVISION_2) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid HashSecretKeySize\n"); return NDIS_STATUS_INVALID_LENGTH; } - if ((Set->InformationBufferLength < + if ((Set->InformationBufferLength < (RssParams->HashSecretKeyOffset + RssParams->HashSecretKeySize)) || (RssParams->HashSecretKeyOffset < @@ -633,7 +633,7 @@ Return Value: if ((NdisRequest->Flags & NDIS_OID_REQUEST_FLAGS_VPORT_ID_VALID) != 0) { - DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Issued for VPortId=%d, Flags=0x%x \n", + DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Issued for VPortId=%d, Flags=0x%x \n", NdisRequest->VPortId, RssParams->Flags); VPortId = NdisRequest->VPortId; } @@ -643,7 +643,7 @@ Return Value: VPortId = NDIS_INVALID_VPORT_ID; } - if ((VPortId != NDIS_INVALID_VPORT_ID) && + if ((VPortId != NDIS_INVALID_VPORT_ID) && (VPortId >= MAX_NIC_SWITCH_VPORTS)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid VPortId\n"); @@ -659,23 +659,23 @@ Return Value: VPort = &Adapter->RSSData.NativeVPort; } - IsNumQueuesChanged = + IsNumQueuesChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_QUEUES_CHANGED) != 0) && (RssParams->NumberOfQueues != VPort->RssV2Params.NumberOfQueues); - IsRssEnabled = + IsRssEnabled = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_ENABLE_RSS) != 0); - IsNumITEsChanged = + IsNumITEsChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_NUMBER_OF_ENTRIES_CHANGED) != 0) && - (RssParams->NumberOfIndirectionTableEntries != + (RssParams->NumberOfIndirectionTableEntries != VPort->RssV2Params.NumberOfIndirectionTableEntries); - IsHashInfoChanged = + IsHashInfoChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_HASH_INFO_CHANGED) != 0) && (VPort->RssV2Params.HashInformation != RssParams->HashInformation); - IsHashKeyChanged = + IsHashKeyChanged = ((RssParams->Flags & NDIS_RECEIVE_SCALE_PARAM_HASH_KEY_CHANGED) != 0) && !RtlEqualMemory(&VPort->RssV2Key, (PUCHAR)RssParams + RssParams->HashSecretKeyOffset, @@ -700,7 +700,7 @@ Return Value: { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, NQ-Violation (queue change): NQueues=%d < NProcs=%d\n", NdisRequest->VPortId, - NewNumberOfQueues, + NewNumberOfQueues, NumProcs); Status = NDIS_STATUS_NO_QUEUES; goto Cleanup; @@ -730,9 +730,9 @@ Return Value: if ((ProcessorNumber.Group != VPort->RssV2Table[EntryIndex].Group) || (ProcessorNumber.Number != VPort->RssV2Table[EntryIndex].Number)) { - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Cannot shrink IT size from %d to %d, mismatch at ITE[%d]\n", - NdisRequest->VPortId, - OldITCount, + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Cannot shrink IT size from %d to %d, mismatch at ITE[%d]\n", + NdisRequest->VPortId, + OldITCount, NewITCount, EntryIndex); Status = NDIS_STATUS_INVALID_DATA; @@ -755,7 +755,7 @@ Return Value: &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid DedfaultProcessorNumebr: %d:%d \n", - VPort->DefaultProcessorNumber.Group, + VPort->DefaultProcessorNumber.Group, VPort->DefaultProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -772,12 +772,12 @@ Return Value: ProcessorNumber = VPort->RssV2Table[EntryIndex]; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - ProcessorNumber, + ProcessorNumber, &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid ITE[%d]: %d:%d \n", EntryIndex, - ProcessorNumber.Group, + ProcessorNumber.Group, ProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -789,7 +789,7 @@ Return Value: } // - // After VPort->QueueMap is built, check for NQ-violation during + // After VPort->QueueMap is built, check for NQ-violation during // RSS enablement. // // Get number of queues after RSS enablement. @@ -798,7 +798,7 @@ Return Value: if (NumProcs > NewNumberOfQueues) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: NQ-Violation: NQueues=%d < NProcs=%d\n", - NewNumberOfQueues, + NewNumberOfQueues, NumProcs); Status = NDIS_STATUS_NO_QUEUES; goto Cleanup; @@ -813,11 +813,11 @@ Return Value: PrimaryProcessorNumber = VPort->PrimaryProcessorNumber; if (!NICSetRSSv2ValidateRssProcessor(Adapter, - PrimaryProcessorNumber, + PrimaryProcessorNumber, &LocalCpuIndex)) { DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: Invalid PrimaryProcessorNumebr: %d:%d \n", - PrimaryProcessorNumber.Group, + PrimaryProcessorNumber.Group, PrimaryProcessorNumber.Number); Status = NDIS_STATUS_INVALID_DATA; @@ -834,7 +834,7 @@ Return Value: // if (IsHashKeyChanged) { - VPort->RssV2Params.HashSecretKeySize = + VPort->RssV2Params.HashSecretKeySize = RssParams->HashSecretKeySize; NdisMoveMemory(&VPort->RssV2Key, @@ -857,7 +857,7 @@ Return Value: // // IT expansion // - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Expand IT size from %d to %d\n", + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Expand IT size from %d to %d\n", NdisRequest->VPortId, OldITCount, NewITCount); ASSERT((NewITCount % OldITCount) == 0); @@ -876,7 +876,7 @@ Return Value: // // IT contraction // - DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Shrink IT size from %d to %d\n", + DEBUGP(MP_ERROR, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId %d, Shrink IT size from %d to %d\n", NdisRequest->VPortId, OldITCount, NewITCount); ASSERT((OldITCount % NewITCount) == 0); @@ -893,20 +893,20 @@ Return Value: } // - // Apply new configuration to HW (hash key and information is already in + // Apply new configuration to HW (hash key and information is already in // the VPort object). // - MiniportApplyConfigurationToHW(Adapter, - VPort, + MiniportApplyConfigurationToHW(Adapter, + VPort, IsRssEnabled, - NewITCount, + NewITCount, NewNumberOfQueues); VPort->RssV2Params.NumberOfIndirectionTableEntries = NewITCount; VPort->RssV2Params.NumberOfQueues = NewNumberOfQueues; VPort->RssEnabled = IsRssEnabled; - DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, RssEnabled=%d, IT.size=%d\n", + DEBUGP(MP_TRACE, "OID_GEN_RECEIVE_SCALE_PARAMETERS_V2: VPortId=%d, RssEnabled=%d, IT.size=%d\n", NdisRequest->VPortId, IsRssEnabled, VPort->RssV2Params.NumberOfIndirectionTableEntries); Set->BytesNeeded = Set->InformationBufferLength; @@ -928,7 +928,7 @@ NICSetRSSv2IndirectionTableEntries( /*++ Routine Description: - This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. + This routine handles OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES method request. Arguments: @@ -937,9 +937,9 @@ Arguments: Return Value: - NDIS_STATUS + NDIS_STATUS ---*/ +--*/ { PROCESSOR_NUMBER ActorProcessorNumber; PNDIS_RSS_SET_INDIRECTION_ENTRY Command; @@ -962,10 +962,10 @@ Return Value: PMP_ADAPTER_VPORT VPort; // - // Allocate a local queue map on stack, to hold temporary results during + // Allocate a local queue map on stack, to hold temporary results during // handling of each "move all" group. // - DECLARE_RSSV2_QUEUE_MAP_ON_STACK(LocalQueueMap, + DECLARE_RSSV2_QUEUE_MAP_ON_STACK(LocalQueueMap, RSSV2_MAX_NUMBER_OF_PROCESSORS_IN_RSS_TABLE); DEBUGP(MP_TRACE, "[%p] ---> NICSetRSSv2IndirectionTableEntries\n", Adapter); @@ -976,12 +976,12 @@ Return Value: Method->BytesRead = 0; Method->BytesNeeded = 0; - Method->BytesWritten = 0; + Method->BytesWritten = 0; // // Validate the request // - if (InputBufferLength < + if (InputBufferLength < (NDIS_SIZEOF_RSS_SET_INDIRECTION_ENTRIES_REVISION_1 + RssEntries->NumberOfRssEntries * RssEntries->RssEntrySize)) { @@ -993,7 +993,7 @@ Return Value: // // RSSv2 spec requires up to 130 entries to be handled in a single batch. // - if (RssEntries->NumberOfRssEntries > + if (RssEntries->NumberOfRssEntries > (2 + MAX_NUMBER_OF_INDIRECTION_TABLE_ENTRIES)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid NumberOfRssEntries \n"); @@ -1011,8 +1011,8 @@ Return Value: ((PUCHAR)RssEntries + RssEntries->RssEntryTableOffset); DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Actor %d:%d, NumberOfRssEntries %d \n", - ActorProcessorNumber.Group, - ActorProcessorNumber.Number, + ActorProcessorNumber.Group, + ActorProcessorNumber.Number, RssEntries->NumberOfRssEntries); NumCommandsToExecute = 0; @@ -1034,18 +1034,18 @@ Return Value: { if (SwitchId != NDIS_DEFAULT_SWITCH_ID) { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid SwitchId (%d)\n", + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid SwitchId (%d)\n", SwitchId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } if (VPortId > MAX_NIC_SWITCH_VPORTS) { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid VPortId (%d)\n", + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: Invalid VPortId (%d)\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } @@ -1053,19 +1053,19 @@ Return Value: VPort = &Adapter->RSSData.VPort[VPortId]; if (VPort->Created == FALSE) - { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not created\n", + { + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not created\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PARAMETER); continue; // while (RssV2FindNextCommandRange()) } if (VPort->Active == FALSE) - { - DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not active\n", + { + DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPort %d is not active\n", VPortId); - RssV2SetCommandRangeStatus(&Context, + RssV2SetCommandRangeStatus(&Context, NDIS_STATUS_INVALID_PORT_STATE); continue; // while (RssV2FindNextCommandRange()) } @@ -1080,7 +1080,7 @@ Return Value: while ((Command = RssV2GetNextCommand(&Context, FALSE)) != NULL) { if (!NICSetRSSv2ValidateCommandAndGetProcessor( - VPort, + VPort, Command, &CurrentProcessorNumber, &OldCpuIndex, @@ -1094,12 +1094,12 @@ Return Value: (ActorProcessorNumber.Number != CurrentProcessorNumber.Number)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPortId=%d, Flags=0x%x, EntryIndex=%d: Invalid Actor %d:%d, expected %d:%d\n", - Command->VPortId, + Command->VPortId, Command->Flags, - Command->IndirectionTableIndex, + Command->IndirectionTableIndex, ActorProcessorNumber.Group, ActorProcessorNumber.Number, - CurrentProcessorNumber.Group, + CurrentProcessorNumber.Group, CurrentProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_NOT_ACCEPTED; @@ -1116,9 +1116,9 @@ Return Value: (TargetProcessorNumber.Number == CurrentProcessorNumber.Number)) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: OK1: VPortId=%d, Flags=0x%x, EntryIndex=%d: TargetProc=%d:%d\n", - Command->VPortId, + Command->VPortId, Command->Flags, - Command->IndirectionTableIndex, + Command->IndirectionTableIndex, TargetProcessorNumber.Group, TargetProcessorNumber.Number); @@ -1132,16 +1132,16 @@ Return Value: // INACTIVE steering entities are only tracked and will be // enforced during RSS transition to ON/OFF. // - NICSetRSSv2SetCurrentProcessor(VPort, - Command, - TargetProcessorNumber, + NICSetRSSv2SetCurrentProcessor(VPort, + Command, + TargetProcessorNumber, 0xFF); DEBUGP(MP_ERROR, "NDIS_SET_INDIRECTION_TABLE_ENTRY: OK2: VPortId=%d, Flags=0x%x, EntryIndex=%d, TargetProc=%d:%d\n", - Command->VPortId, - Command->Flags, - Command->IndirectionTableIndex, - TargetProcessorNumber.Group, + Command->VPortId, + Command->Flags, + Command->IndirectionTableIndex, + TargetProcessorNumber.Group, TargetProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_SUCCESS; @@ -1149,7 +1149,7 @@ Return Value: } if (!NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex)) { Command->EntryStatus = NDIS_STATUS_INVALID_DATA; @@ -1189,7 +1189,7 @@ Return Value: // // VPorts are already validated // - VPort = IsNativeRss ? &Adapter->RSSData.NativeVPort : + VPort = IsNativeRss ? &Adapter->RSSData.NativeVPort : &Adapter->RSSData.VPort[VPortId]; RssV2NQEnforcerEnter(VPort->QueueMap, LocalQueueMap); @@ -1201,7 +1201,7 @@ Return Value: { TargetProcessorNumber = Command->TargetProcessorNumber; IsValid = NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex); ASSERT(IsValid); @@ -1216,12 +1216,12 @@ Return Value: } Status = RssV2NQEnforcerLeave(VPort->QueueMap, - LocalQueueMap, + LocalQueueMap, VPort->RssV2Params.NumberOfQueues); if (Status != NDIS_STATUS_SUCCESS) { DEBUGP(MP_ERROR, "OID_GEN_RSS_SET_INDIRECTION_TABLE_ENTRIES: VPortId=%d: NQ-violation: NQueues=%d < NProcs=%d\n", - VPortId, + VPortId, VPort->RssV2Params.NumberOfQueues, RssV2NQEnforcerGetNumberOfProcs(LocalQueueMap)); RssV2SetCommandRangeStatus(&Context, Status); @@ -1233,7 +1233,7 @@ Return Value: // // - // Iterate over the same Command range to actually update the + // Iterate over the same Command range to actually update the // processor numbers/indices. // RssV2RestartCommandIterator(&Context); @@ -1242,7 +1242,7 @@ Return Value: { TargetProcessorNumber = Command->TargetProcessorNumber; IsValid = NICSetRSSv2ValidateRssProcessor(Adapter, - TargetProcessorNumber, + TargetProcessorNumber, &NewCpuIndex); ASSERT(IsValid); @@ -1254,16 +1254,16 @@ Return Value: // // Reflect the change in software structure. // - NICSetRSSv2SetCurrentProcessor(VPort, - Command, - TargetProcessorNumber, + NICSetRSSv2SetCurrentProcessor(VPort, + Command, + TargetProcessorNumber, NewCpuIndex); DEBUGP(MP_ERROR, "NDIS_SET_INDIRECTION_TABLE_ENTRY: OK3: VPortId=%d, Flags=0x%x, EntryIndex=%d, TargetProc=%d:%d\n", - Command->VPortId, - Command->Flags, - Command->IndirectionTableIndex, - TargetProcessorNumber.Group, + Command->VPortId, + Command->Flags, + Command->IndirectionTableIndex, + TargetProcessorNumber.Group, TargetProcessorNumber.Number); Command->EntryStatus = NDIS_STATUS_SUCCESS; diff --git a/network/ndis/netvmini/6x/rssv2lib.c b/network/ndis/netvmini/6x/rssv2lib.c index a2bc5550..9bee9583 100644 --- a/network/ndis/netvmini/6x/rssv2lib.c +++ b/network/ndis/netvmini/6x/rssv2lib.c @@ -23,7 +23,7 @@ Abstract: #define PRAGMA_STRUCTURE_PADDED 4324 #define PRAGMA_NO_RETTYPE_FOR_FUNC 4508 #pragma warning(disable: PRAGMA_NO_RETTYPE_FOR_FUNC) -#pragma warning(disable: PRAGMA_ZERO_SIZED_ARRAY) +#pragma warning(disable: PRAGMA_ZERO_SIZED_ARRAY) #pragma warning(disable: PRAGMA_NAMELESS_STRUCT_UNION) #pragma warning(disable: PRAGMA_STRUCTURE_PADDED) #include <ndis.h> @@ -63,7 +63,7 @@ Return Value: Context->IsNativeRss = IsNativeRss; Context->RssV2Oid = RssV2Oid; Context->MaxIndex = RssV2Oid->NumberOfRssEntries; - Context->LimitIndex = 0; + Context->LimitIndex = 0; Context->StartIndex = 0; Context->LastStartIndex = 0; } @@ -182,14 +182,14 @@ RssV2GetNextCommand ( /*++ Routine Description: - This routine returns next command from the current command group (which - target the same SwitchId & VPortId). + This routine returns next command from the current command group (which + target the same SwitchId & VPortId). Arguments: Context - parsing context - SkipProcessedCommands - TRUE, if user wants to commands which already + SkipProcessedCommands - TRUE, if user wants to commands which already have EntryStatus changed from NDIS_STATUS_PENDING. FALSE, if user wants to iterate over all commands. @@ -205,14 +205,14 @@ Return Value: { if (Context->StartIndex < Context->LimitIndex) { - command = RSSV2_GET_COMMAND(Context->RssV2Oid, + command = RSSV2_GET_COMMAND(Context->RssV2Oid, Context->StartIndex++); } else { command = NULL; } - } while (SkipProcessedCommands && + } while (SkipProcessedCommands && (command != NULL) && (command->EntryStatus != NDIS_STATUS_PENDING)); @@ -289,7 +289,7 @@ RssV2NQEnforcerGetBitfield ( /*++ Routine Description: - Routine finds a pointer to the bitfield for specified + Routine finds a pointer to the bitfield for specified (RSS-)local processor index. Arguments: @@ -306,8 +306,8 @@ Return Value: { ASSERT(LocalCpuIndex < QueueMap->MaxProcessors); - return (PULONG_PTR)((PUINT8)QueueMap + - sizeof(RSSV2_QUEUE_MAP) + + return (PULONG_PTR)((PUINT8)QueueMap + + sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_OFFSET(LocalCpuIndex)); } @@ -320,7 +320,7 @@ RssV2NQEnforceGetReference ( /*++ Routine Description: - Routine finds a pointer to the reference counter for the specified + Routine finds a pointer to the reference counter for the specified (RSS-)local processor index. Arguments: @@ -337,8 +337,8 @@ Return Value: { ASSERT(LocalCpuIndex < QueueMap->MaxProcessors); - return (PUINT8)((PUINT8)QueueMap + - sizeof(RSSV2_QUEUE_MAP) + + return (PUINT8)((PUINT8)QueueMap + + sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_SIZE(QueueMap->MaxProcessors) + RSSV2_REFERENCE_OFFSET(LocalCpuIndex)); } @@ -387,7 +387,7 @@ Arguments: QueueMap - Pointer to the queue map - MaxNumberOfProcessorsInRssTable - Maximum number of processors which + MaxNumberOfProcessorsInRssTable - Maximum number of processors which RSS table can ever contain. Return Value: @@ -410,7 +410,7 @@ RssV2NQEnforcerReference ( /*++ Routine Description: - Routine marks processor as holding a reference. Corresponding bit in + Routine marks processor as holding a reference. Corresponding bit in the bitfiled is set to 1, and reference count is incremented. Arguments: @@ -448,7 +448,7 @@ RssV2NQEnforcerDereference ( Routine Description: Routine removes one reference cause by the processor. Reference count - is decremented, and if it becomes zero, a corresponding bit in + is decremented, and if it becomes zero, a corresponding bit in the bitfiled is cleared to 0. Arguments: @@ -482,7 +482,7 @@ Return Value: VOID RssV2NQEnforcerUpdate ( _Inout_ PRSSV2_QUEUE_MAP QueueMap, - _In_ UINT8 OldCpuIndex, + _In_ UINT8 OldCpuIndex, _In_ UINT8 NewCpuIndex ) /*++ @@ -540,8 +540,8 @@ Return Value: numberOfProcessors = 0; - for (localCpuIndex = 0; - localCpuIndex < QueueMap->MaxProcessors; + for (localCpuIndex = 0; + localCpuIndex < QueueMap->MaxProcessors; localCpuIndex += BITS_PER_WORD) { bitfield = RssV2NQEnforcerGetBitfield(QueueMap, localCpuIndex); @@ -576,9 +576,9 @@ Return Value: --*/ { KeAcquireSpinLockAtDpcLevel(&GlobalQueueMap->SpinLock); - - RtlMoveMemory(LocalQueueMap, - GlobalQueueMap, + + RtlMoveMemory(LocalQueueMap, + GlobalQueueMap, RssV2NQEnforcerGetQueueMapSize(GlobalQueueMap->MaxProcessors)); } @@ -616,9 +616,9 @@ Routine Description: Arguments: GlobalQueueMap - Pointer to the global queue map (e.g. VPort's) visible by - many processors. + many processors. - LocalQueueMap - Pointer to the queue map on stack. If NQ-check succeeds, + LocalQueueMap - Pointer to the queue map on stack. If NQ-check succeeds, the global queue map will be updated from the local copy. If NQ-check fails, local copy will be discarded and global copy is unchanged. @@ -627,10 +627,10 @@ Arguments: Return Value: - NDIS_STATUS_SUCCESS - if the accumulated local changes lead to valid + NDIS_STATUS_SUCCESS - if the accumulated local changes lead to valid configuration. - - NDIS_STATUS_NO_QUEUES - if the accumulated local configuration exceeds + + NDIS_STATUS_NO_QUEUES - if the accumulated local configuration exceeds QueueLimit. --*/ @@ -639,8 +639,8 @@ Return Value: if (RssV2NQEnforcerGetNumberOfProcs(LocalQueueMap) <= QueueLimit) { - RtlMoveMemory(GlobalQueueMap, - LocalQueueMap, + RtlMoveMemory(GlobalQueueMap, + LocalQueueMap, RssV2NQEnforcerGetQueueMapSize(GlobalQueueMap->MaxProcessors)); status = NDIS_STATUS_SUCCESS; diff --git a/network/ndis/netvmini/6x/rssv2lib.h b/network/ndis/netvmini/6x/rssv2lib.h index 619624ec..9a867a57 100644 --- a/network/ndis/netvmini/6x/rssv2lib.h +++ b/network/ndis/netvmini/6x/rssv2lib.h @@ -26,7 +26,7 @@ Revision History: // #if !defined(NDIS_STATUS_NO_QUEUES) #define NDIS_STATUS_NO_QUEUES 0xC0230031L -#endif +#endif #ifdef __cplusplus extern "C" @@ -98,7 +98,7 @@ RssV2SetCommandRangeStatus ( // // Queue map for VPort (or for adapter's in NativeRSS mode) -// +// #define BITS_PER_WORD (sizeof(ULONG_PTR) * 8) #define RSSV2_BITFIELD_OFFSET(_PROC_INDEX_) ((_PROC_INDEX_) / BITS_PER_WORD) #define RSSV2_BITFIELD_SIZE(_MAX_PROC_) \ @@ -112,7 +112,7 @@ typedef struct _RSSV2_QUEUE_MAP // // Members to help enforce "NQ-violation" (per-VPort limit on number of queues) // - KSPIN_LOCK SpinLock; + KSPIN_LOCK SpinLock; // // Maximum number of processors in adapter's RSS table. @@ -124,7 +124,7 @@ typedef struct _RSSV2_QUEUE_MAP // Two variable-size fields follow this structure: // // - Bitmask of referenced processors - // - Array with reference counts for each RSS processor + // - Array with reference counts for each RSS processor // (indexed by a local CPU index, which is relative to RSS table). // // @@ -140,12 +140,12 @@ typedef struct _RSSV2_QUEUE_MAP (PRSSV2_QUEUE_MAP)_alloca(RssV2NQEnforcerGetQueueMapSize(_MAX_PROCS_)) FORCEINLINE -ULONG +ULONG RssV2NQEnforcerGetQueueMapSize ( _In_ ULONG MaxNumberOfProcessorsInRssTable ) { - return sizeof(RSSV2_QUEUE_MAP) + + return sizeof(RSSV2_QUEUE_MAP) + RSSV2_BITFIELD_SIZE(MaxNumberOfProcessorsInRssTable) + RSSV2_REFERENCE_SIZE(MaxNumberOfProcessorsInRssTable); } @@ -176,7 +176,7 @@ RssV2NQEnforcerDereference ( VOID RssV2NQEnforcerUpdate ( _Inout_ PRSSV2_QUEUE_MAP QueueMap, - _In_ UINT8 OldCpuIndex, + _In_ UINT8 OldCpuIndex, _In_ UINT8 NewCpuIndex ); diff --git a/network/ndis/netvmini/6x/tcbrcb.c b/network/ndis/netvmini/6x/tcbrcb.c index 1d2faf50..1cbeb673 100644 --- a/network/ndis/netvmini/6x/tcbrcb.c +++ b/network/ndis/netvmini/6x/tcbrcb.c @@ -111,7 +111,7 @@ Return Value: { // // The adapter is no longer in a ready state, so we were not able to take a reference on the - // receive block. Add the RCB back to the free list and fail this receive. + // receive block. Add the RCB back to the free list and fail this receive. // NdisInterlockedInsertTailList( &Adapter->FreeRcbList, @@ -136,14 +136,14 @@ Return Value: // if(Status == NDIS_STATUS_RESOURCES) { - ++Adapter->RxResourceErrors; + ++Adapter->RxResourceErrors; } else if(Status != NDIS_STATUS_INVALID_ADDRESS) { ++Adapter->RxRuntErrors; } // - // Recover RCB + // Recover RCB // ReturnRCB(Adapter, Rcb); Rcb = NULL; @@ -186,7 +186,7 @@ Return Value: --*/ { PUCHAR Data = Rcb->Data; - ASSERT(Data); + ASSERT(Data); DEBUGP(MP_TRACE, "[%p] ---> ReturnRCB. RCB: %p\n", Adapter, Rcb); diff --git a/network/ndis/netvmini/6x/tcbrcb.h b/network/ndis/netvmini/6x/tcbrcb.h index fca8f123..78f8b5ca 100644 --- a/network/ndis/netvmini/6x/tcbrcb.h +++ b/network/ndis/netvmini/6x/tcbrcb.h @@ -57,7 +57,7 @@ typedef struct _RCB LIST_ENTRY RcbLink; PNET_BUFFER_LIST Nbl; PVOID Data; -#if (NDIS_SUPPORT_NDIS620) +#if (NDIS_SUPPORT_NDIS620) PVOID LookaheadData; #endif } RCB, *PRCB; diff --git a/network/ndis/netvmini/6x/trace.h b/network/ndis/netvmini/6x/trace.h index b42c5275..b8adbd2e 100644 --- a/network/ndis/netvmini/6x/trace.h +++ b/network/ndis/netvmini/6x/trace.h @@ -14,7 +14,7 @@ Module Name: Abstract: - --*/ +--*/ #ifndef _TRACE_H diff --git a/network/ndis/netvmini/6x/vmq.c b/network/ndis/netvmini/6x/vmq.c index d4e8fa7c..71c561bb 100644 --- a/network/ndis/netvmini/6x/vmq.c +++ b/network/ndis/netvmini/6x/vmq.c @@ -325,7 +325,7 @@ Return Value: #if (NDIS_SUPPORT_NDIS630) HwCapabilities.SupportedQueueProperties |= NDIS_RECEIVE_FILTER_DYNAMIC_PROCESSOR_AFFINITY_CHANGE_SUPPORTED; #endif - + HwCapabilities.SupportedFilterTests = NDIS_RECEIVE_FILTER_TEST_HEADER_FIELD_EQUAL_SUPPORTED; HwCapabilities.SupportedHeaders = NDIS_RECEIVE_FILTER_MAC_HEADER_SUPPORTED; HwCapabilities.SupportedMacHeaderFields = NDIS_RECEIVE_FILTER_MAC_HEADER_DEST_ADDR_SUPPORTED | NDIS_RECEIVE_FILTER_MAC_HEADER_VLAN_ID_SUPPORTED; @@ -3104,7 +3104,7 @@ Routine Description: Arguments: Adapter - Pointer to our adapter - Rcb - RCB to queue for recieve + Rcb - RCB to queue for receive Return Value: diff --git a/network/ndis/netvmini/6x/vmq.h b/network/ndis/netvmini/6x/vmq.h index 5b949e2a..98224c02 100644 --- a/network/ndis/netvmini/6x/vmq.h +++ b/network/ndis/netvmini/6x/vmq.h @@ -13,7 +13,7 @@ Module Name: Abstract: - This module declares the VMQ related data types, flags, macros, and functions. + This module declares the VMQ related data types, flags, macros, and functions. Revision History: @@ -24,7 +24,7 @@ Notes: struct _FRAME; struct _RCB; - + #if (NDIS_SUPPORT_NDIS620) @@ -65,8 +65,8 @@ typedef struct _MP_ADAPTER_SHARED_MEMORY } MP_ADAPTER_SHARED_MEMORY, *PMP_ADAPTER_SHARED_MEMORY; // -// The minimum number of shared memory blocks we require. Used when recovering from -// shared memory allocation failures. +// The minimum number of shared memory blocks we require. Used when recovering from +// shared memory allocation failures. // #define NIC_MIN_RECV_ENTRY_ALLOCATION_COUNT 32 @@ -75,20 +75,20 @@ typedef struct _MP_ADAPTER_SHARED_MEMORY // lock. // // -// The queue is initialized, but not yet completed. Receives disabled. +// The queue is initialized, but not yet completed. Receives disabled. // #define fMPAQI_INITIALIZED 0x1 // -// Completion of the queue has started. Receives disabled. +// Completion of the queue has started. Receives disabled. // #define fMPAQI_COMPLETION_STARTED 0x2 // -// Queue completed. Receives enabled. +// Queue completed. Receives enabled. // #define fMPAQI_COMPLETION_FINISHED 0x4 // -// Queue is being freed (pending RefCount). Receives disabled. -// +// Queue is being freed (pending RefCount). Receives disabled. +// #define fMPAQI_FREEING 0x8 // // DMA is being performed for queue @@ -153,7 +153,7 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE // PUCHAR RcbMemoryBlock; NDIS_HANDLE RecvNblPoolHandle; - + // // Shared memory information (MP_ADAPTER_SHARED_MEMORY) // @@ -164,12 +164,12 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE LIST_ENTRY LookaheadSharedMemoryList; LIST_ENTRY PostLookaheadSharedMemoryList; // - // MP_ADAPTER_SHARED_MEMORY_BLOCK buffers to hold book-keeping info on subdivided shared memory buffers + // MP_ADAPTER_SHARED_MEMORY_BLOCK buffers to hold book-keeping info on subdivided shared memory buffers // PUCHAR LookaheadBlocks; ULONG NumLookaheadBlocks; - PUCHAR PostLookaheadBlocks; - ULONG NumPostLookaheadBlocks; + PUCHAR PostLookaheadBlocks; + ULONG NumPostLookaheadBlocks; // // Data passed in through the VMQ Queue configuration related OIDs @@ -187,7 +187,7 @@ typedef struct DECLSPEC_CACHEALIGN _MP_ADAPTER_QUEUE typedef struct _MP_ADAPTER_FILTER { // - // Whether the receive filter should be used + // Whether the receive filter should be used // BOOLEAN Valid; // @@ -214,11 +214,11 @@ typedef struct _MP_ADAPTER_FILTER // #define fMPVMQD_FILTERING_ENABLED 0x0001 // -// Lookahead split in VMQ indication is enabled on the adapter. +// Lookahead split in VMQ indication is enabled on the adapter. // #define fMPVMQD_LOOKAHEAD_ENABLED 0x0002 // -// VLAN filtering in VMQ is enabled on the adapter. +// VLAN filtering in VMQ is enabled on the adapter. // #define fMPVMQD_VLANFILTER_ENABLED 0x0004 @@ -237,7 +237,7 @@ typedef struct _MP_ADAPTER_FILTER // // The MP_ADAPTER_VMQ_DATA structure is used to track the global VMQ configuration for an adapter -// +// typedef struct _MP_ADAPTER_VMQ_DATA { // @@ -246,7 +246,7 @@ typedef struct _MP_ADAPTER_VMQ_DATA ULONG Flags; // // Individual Queues. The MP_ADAPTER_QUEUE array is not dynamically allocated to reduce - // pointer dereferencing during receives, which can affect performance. + // pointer dereferencing during receives, which can affect performance. // MP_ADAPTER_QUEUE RxQueues[NIC_SUPPORTED_NUM_QUEUES]; // @@ -263,7 +263,7 @@ VOID FreeVMQData( _Inout_ struct _MP_ADAPTER *Adapter); -NDIS_STATUS +NDIS_STATUS ReadRxQueueConfig( _In_ NDIS_HANDLE ConfigurationHandle, _Inout_ struct _MP_ADAPTER *Adapter); @@ -315,7 +315,7 @@ SetRxFilter( ); NDIS_STATUS -ClearRxFilter( +ClearRxFilter( _Inout_ struct _MP_ADAPTER *Adapter, _In_ PNDIS_RECEIVE_FILTER_CLEAR_PARAMETERS FilterParams ); @@ -346,16 +346,16 @@ GetRcbForRxQueue( _In_ PNDIS_NET_BUFFER_LIST_8021Q_INFO Nbl1QInfo, _Outptr_result_maybenull_ struct _RCB **Rcb); -NDIS_STATUS +NDIS_STATUS CopyFrameToRxQueueRcb( _In_ struct _MP_ADAPTER *Adapter, _In_ struct _FRAME *Frame, _In_ PNDIS_NET_BUFFER_LIST_8021Q_INFO Nbl1QInfo, _Inout_ struct _RCB *Rcb, _Out_ BOOLEAN *Copied); - + VOID -RecoverRxQueueRcb( +RecoverRxQueueRcb( _In_ struct _MP_ADAPTER *Adapter, _In_ struct _RCB *Rcb); @@ -369,10 +369,10 @@ AddPendingRcbToRxQueue( #else // -// In order to avoid excessible "#if defined(NDIS620_MINIPORT)" statements scattered -// through the miniport implementation, NDIS60 miniports define -// placeholder macros for the VMQ functions which cause the code to always proceed -// as if VMQ were disabled on the adapter. +// In order to avoid excessible "#if defined(NDIS620_MINIPORT)" statements scattered +// through the miniport implementation, NDIS60 miniports define +// placeholder macros for the VMQ functions which cause the code to always proceed +// as if VMQ were disabled on the adapter. // #define VMQ_ENABLED(_Adapter) FALSE @@ -380,7 +380,7 @@ AddPendingRcbToRxQueue( #define VLAN_FILTER_ENABLED(_Adapter) FALSE #define LOOKAHEAD_SPLIT_REQUIRED(_QueueInfo) FALSE #define AllocateDefaultRxQueue(Adapter) NDIS_STATUS_NOT_SUPPORTED -#define AddPendingRcbToRxQueue(Adapter, Rcb) +#define AddPendingRcbToRxQueue(Adapter, Rcb) #define GetRxQueueDpc(Adapter, QueueId) NULL #define AllocateVMQData(Adapter) NDIS_STATUS_SUCCESS #define FreeVMQData(Adapter) @@ -388,6 +388,6 @@ AddPendingRcbToRxQueue( #define InitializeRxQueueMPConfig(Adapter) NDIS_STATUS_SUCCESS #define CopyFrameToRxQueueRcb(Adapter, Frame, Nbl1QInfo, Rcb, Copied) FALSE #define GetRcbForRxQueue(Adapter, Frame, Nbl1QInfo, Rcb) NDIS_STATUS_NOT_SUPPORTED -#define RecoverRxQueueRcb(Adapter, Rcb) +#define RecoverRxQueueRcb(Adapter, Rcb) #endif diff --git a/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln b/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln deleted file mode 100644 index 7bbffb25..00000000 --- a/network/radio/HidSwitchDriverSample/HidSwitchDriverSample.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0 -MinimumVisualStudioVersion = 12.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RadioSwitchHidUsbFx2", "RadioSwitchHidUsbFx2.vcxproj", "{43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|Win32.Build.0 = Debug|Win32 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|Win32.ActiveCfg = Release|Win32 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|Win32.Build.0 = Release|Win32 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|x64.ActiveCfg = Debug|x64 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Debug|x64.Build.0 = Debug|x64 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|x64.ActiveCfg = Release|x64 - {43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/network/radio/HidSwitchDriverSample/README.md b/network/radio/HidSwitchDriverSample/README.md deleted file mode 100644 index 55ca9daf..00000000 --- a/network/radio/HidSwitchDriverSample/README.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -page_type: sample -description: "Demonstrates how to structure a HID driver for radio switches for the OSR USB-FX2 Development Board." -languages: -- cpp -products: -- windows -- windows-wdk ---- - -# Radio Switch Test Driver for OSR USB-FX2 Development Board - -This sample demonstrates how to structure a HID driver for radio switches for the OSR USB-FX2 Development Board. - -The hardware switch or button to control wireless transmission and the global software switch (Airplane mode switch) in the Radio Management User Interface must be synchronized. To ensure the hardware and software switches that control radio transmission are synchronized, the hardware switch or button must have a HID-compliant driver. - -## Switch Pack Mapping - -### Switch Mapping - -| 1 | 2 | 3 | 4 | 5 | 7 | 8 | -| --- | --- | --- | --- | --- | --- | --- | -| Mode Select Bit 3 | Mode Select Bit 2 | Mode Select Bit 1 | - | - | - | Radio Switch | - -## Testing - -### Testing Modes - -The driver supports five modes representing the valid combinations of HID descriptors that we have defined for the USB forum. Modes are selected using switches 1, 2, and 3 on the switch pack. - -### Switch Mapping Modes - -| 1 | 2 | 3 | Mode | -| --- | --- | --- | --- | -| 0 | 0 | 0 | Mode 1 | -| 0 | 0 | 1 | Mode 1 | -| 0 | 1 | 0 | Mode 2 | -| 0 | 1 | 1 | Mode 3 | -| 1 | 0 | 0 | Mode 4 | -| 1 | 0 | 1 | Mode 5 | -| 1 | 1 | 0 | Mode 1 | -| 1 | 1 | 1 | Mode 1 | - -### Mode 1 Radio Push Button - -In this mode the radio switch (switch 8 on the switch pack) represents a momentary push button. A HID report is generated when the switch transitions to the On state (switch down). - -### Mode 2 Radio Push Button & LED - -In this mode the radio switch (switch 8 on the switch pack) represents a momentary push button. A HID report is generated when the switch transitions to the On state (switch down). In addition, the LED array will reflect the state of the Radio LED: either all on or all off (note that the top 2 LEDs never illuminate as these are not wired in). - -### Mode 3 Radio Slider Switch - -In this mode the radio switch (switch 8 on the switch pack) represents a momentary push button. A HID report is generated when the switch transitions to the On state (switch down). - -### Mode 4 Radio Slider Switch & LED - -In this mode the radio switch (switch 8 on the switch pack) represents an A-B slider switch. A HID report is generated in both cases: when the switch transitions to the On state (switch down) and to the Off state (switch up). In addition the LED array will reflect the state of the Radio LED: either all on or all off (note that the top 2 LEDs never illuminate as these are not wired in). - -### Mode 5 LED only - -In this mode the radio switch (switch 8 on the switch pack) is ignored. The LED array will reflect the state of the Radio LED: either all on or all off (note that the top 2 LEDs never illuminate as these are not wired in). diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.h b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.h deleted file mode 100644 index ce92cfff..00000000 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef _RADIOSWITCHHIDUSBFX2_H_ -#define _RADIOSWITCHHIDUSBFX2_H_ - -#include <initguid.h> -#include <wdm.h> -#include "usbdi.h" -#include "usbdlib.h" -#include <wdf.h> -#include "wdfusb.h" -#include <hidport.h> -#define NTSTRSAFE_LIB -#include <ntstrsafe.h> -#include "trace.h" - - -#define HID_CLASS_SPEC_RELEASE_1_00 0x0100 // HID Class Specification release 1.00 -#define HID_COUNTRY_NON_LOCALIZED 0x00 // Hardware is not localized - -#define GENERIC_DESKTOP_REPORT_ID 0x01 - -#define GENERIC_DESKTOP_USAGE_PAGE 0x01 -#define WIRELESS_RADIO_CONTROLS_USAGE 0x0C -#define WIRELESS_RADIO_BUTTON_USAGE 0xC6 -#define WIRELESS_RADIO_LED_USAGE 0xC7 -#define WIRELESS_RADIO_SLIDER_USAGE 0xC8 - - -#define MODE_SELECTION_BUTTONS_BIT_MASK 0xE0 -#define RADIO_SWITCH_BUTTONS_BIT_MASK 0x01 -#define SWITCHPACK_SELECTION_FOR_MODE2 0x40 -#define SWITCHPACK_SELECTION_FOR_MODE3 0x60 -#define SWITCHPACK_SELECTION_FOR_MODE4 0x80 -#define SWITCHPACK_SELECTION_FOR_MODE5 0xA0 - -#define INTERRUPT_ENDPOINT_INDEX (0) - -#define SWITCHPACK_DEBOUNCE_TIME 10 // in millseconds - -// Define the vendor commands supported by device -#define HIDFX2_READ_SWITCH_STATE 0xD6 -#define HIDFX2_READ_7SEGMENT_DISPLAY 0xD4 -#define HIDFX2_READ_BARGRAPH_DISPLAY 0xD7 -#define HIDFX2_SET_BARGRAPH_DISPLAY 0xD8 -#define HIDFX2_IS_HIGH_SPEED 0xD9 -#define HIDFX2_REENUMERATE 0xDA -#define HIDFX2_SET_7SEGMENT_DISPLAY 0xDB - -// Bit masks for 7 segment display to be used with vendor command -#define SEG_TOP 0x1 -#define SEG_R_UPPER 0x2 -#define SEG_R_LOWER 0x4 -#define SEG_DOT 0x8 -#define SEG_L_LOWER 0x10 -#define SEG_MID 0x20 -#define SEG_L_UPPER 0x40 -#define SEG_BASE 0x80 - -#define SEGMENT_DISPLAY_1 SEG_R_UPPER | SEG_R_LOWER -#define SEGMENT_DISPLAY_2 SEG_TOP | SEG_R_UPPER | SEG_MID | SEG_L_LOWER | SEG_BASE -#define SEGMENT_DISPLAY_3 SEG_TOP | SEG_R_UPPER | SEG_MID | SEG_R_LOWER | SEG_BASE -#define SEGMENT_DISPLAY_4 SEG_R_UPPER | SEG_R_LOWER | SEG_MID | SEG_L_UPPER -#define SEGMENT_DISPLAY_5 SEG_TOP | SEG_R_LOWER | SEG_MID | SEG_L_UPPER | SEG_BASE -#define SEGMENT_DISPLAY_6 SEG_TOP | SEG_R_LOWER | SEG_L_LOWER | SEG_MID | SEG_L_UPPER | SEG_BASE -#define SEGMENT_DISPLAY_7 SEG_TOP | SEG_R_UPPER | SEG_R_LOWER -#define SEGMENT_DISPLAY_8 SEG_TOP | SEG_R_UPPER | SEG_R_LOWER | SEG_L_UPPER | SEG_L_LOWER | SEG_MID | SEG_BASE - -#define BARGRAPH_LED_ALL_ON 0xff -#define BARGRAPH_LED_ALL_OFF 0x00 - - -typedef UCHAR HID_REPORT_DESCRIPTOR, *PHID_REPORT_DESCRIPTOR; - -#include <pshpack1.h> // make sure packing is handled correctly - -typedef struct _HIDFX2_IO_REPORT -{ - unsigned char bReportId; //Report ID for the collection - unsigned char bData; //one-byte data for switch/LED -}HIDFX2_IO_REPORT, *PHIDFX2_IO_REPORT; - - -typedef enum _DRIVER_MODE -{ - DM_BUTTON = 1, - DM_BUTTON_AND_LED, - DM_SLIDER_SWITCH, - DM_SLIDER_SWITCH_AND_LED, - DM_LED_ONLY -} DRIVER_MODE; - -#include <poppack.h> - -typedef struct _DEVICE_EXTENSION -{ - WDFUSBDEVICE hUsbDevice; //WDF handles for USB Target - WDFUSBINTERFACE hUsbInterface; - WDFUSBPIPE hInterruptPipe; - WDFMEMORY hDeviceDescriptor; // Device descriptor for the USB device - unsigned char bCurrentSwitchState; // Switch state. - unsigned char bLatestToggledSwitch; // State for the switch that got toggled most recently - BOOLEAN fIsPowerUpSwitchState; //Interrupt endpoints sends switch state when first started .we ignore this - WDFTIMER hDebounceTimer; // Handle debouncing of switchpack - WDFQUEUE hInterruptMsgQueue; // WDF Queue for read IOCTLs from hidclass that get satisfied from USB interrupt endpoint - DRIVER_MODE driverMode; -} DEVICE_EXTENSION, *PDEVICE_EXTENSION; - -WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(DEVICE_EXTENSION, GetDeviceContext) - - -// -// Driver routines -// -DRIVER_INITIALIZE DriverEntry; - -EVT_WDF_DRIVER_DEVICE_ADD HidFx2EvtDeviceAdd; - -EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL HidFx2EvtInternalDeviceControl; - -EVT_WDF_DEVICE_PREPARE_HARDWARE HidFx2EvtDevicePrepareHardware; - -EVT_WDF_DEVICE_D0_ENTRY HidFx2EvtDeviceD0Entry; - -EVT_WDF_DEVICE_D0_EXIT HidFx2EvtDeviceD0Exit; - -EVT_WDF_USB_READER_COMPLETION_ROUTINE HidFx2EvtUsbInterruptPipeReadComplete; - -EVT_WDF_TIMER HidFx2EvtTimerFunction; - -EVT_WDF_OBJECT_CONTEXT_CLEANUP HidFx2EvtDriverContextCleanup; - -EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE HidFx2EvtIoCanceledOnQueue; - - -NTSTATUS HidFx2GetHidDescriptor(_In_ WDFDEVICE hDevice, _In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2GetReportDescriptor(_In_ WDFDEVICE hDevice, _In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2GetDeviceAttributes(_In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2ConfigContReaderForInterruptEndPoint(PDEVICE_EXTENSION pDeviceContext); - -NTSTATUS HidFx2SendIdleNotification(_In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2SetOutput(_In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2GetInput(_In_ WDFREQUEST hRequest); - -NTSTATUS HidFx2GetSwitchState(_In_ WDFDEVICE hDevice, _Out_ unsigned char *pbSwitchState); - -NTSTATUS SendVendorCommand(_In_ WDFDEVICE hDevice, _In_ unsigned char bVendorCommand, _In_ unsigned char bCommandData); - -PCWSTR DbgDevicePowerString(_In_ WDF_POWER_DEVICE_STATE powerState); - -#endif //_RADIOSWITCHHIDUSBFX2_H_ - - diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx Binary files differdeleted file mode 100644 index a9cf9004..00000000 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.inx +++ /dev/null diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.rc b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.rc deleted file mode 100644 index 6737f603..00000000 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.rc +++ /dev/null @@ -1,11 +0,0 @@ -#include <windows.h> - -#include <ntverp.h> - -#define VER_FILETYPE VFT_DRV -#define VER_FILESUBTYPE VFT2_DRV_SYSTEM -#define VER_FILEDESCRIPTION_STR "HID Radio Switch mini driver for USB Fx2 Device" -#define VER_INTERNALNAME_STR "RadioSwitchHidUsbFx2.sys" - -#include "common.ver" - diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj deleted file mode 100644 index 84bbb1ea..00000000 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{43FD9C1A-290E-4FF7-8B6F-35A88A075DF8}</ProjectGuid> - <RootNamespace>$(MSBuildProjectName)</RootNamespace> - <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> - <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{88093BCB-F03A-40B7-B648-891643B48CC0}</SampleGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <DriverType>KMDF</DriverType> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <DriverType>KMDF</DriverType> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <DriverType>KMDF</DriverType> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> - <DriverType>KMDF</DriverType> - <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> - <ConfigurationType>Driver</ConfigurationType> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <PropertyGroup> - <OutDir>$(IntDir)</OutDir> - </PropertyGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ItemGroup Label="WrappedTaskItems"> - <ClCompile Include="driver.c; hid.c; usb.c"> - <WppEnabled>true</WppEnabled> - <WppKernelMode>true</WppKernelMode> - <WppTraceFunction>TraceEvents(LEVEL,FLAGS,MSG,...);TraceErr{LEVEL=TRACE_LEVEL_ERROR}(FLAGS,MSG,...);TraceWarning{LEVEL=TRACE_LEVEL_WARNING}(FLAGS,MSG,...);TraceInfo{LEVEL=TRACE_LEVEL_INFORMATION}(FLAGS,MSG,...);TraceVerbose{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS,MSG,...)</WppTraceFunction> - <WppGenerateUsingTemplateFile>{km-WdfDefault.tpl}*.tmh</WppGenerateUsingTemplateFile> - </ClCompile> - <Inf Include=".\RadioSwitchHidUsbFx2.inx"> - <Architecture>$(InfArch)</Architecture> - <SpecifyArchitecture>true</SpecifyArchitecture> - <CopyOutput>.\$(IntDir)\RadioSwitchHidUsbFx2.inf</CopyOutput> - </Inf> - <OtherWpp Include="RadioSwitchHidUsbFx2.rc"> - <WppEnabled>true</WppEnabled> - <WppKernelMode>true</WppKernelMode> - <WppTraceFunction>TraceEvents(LEVEL,FLAGS,MSG,...);TraceErr{LEVEL=TRACE_LEVEL_ERROR}(FLAGS,MSG,...);TraceWarning{LEVEL=TRACE_LEVEL_WARNING}(FLAGS,MSG,...);TraceInfo{LEVEL=TRACE_LEVEL_INFORMATION}(FLAGS,MSG,...);TraceVerbose{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS,MSG,...)</WppTraceFunction> - <WppGenerateUsingTemplateFile>{km-WdfDefault.tpl}*.tmh</WppGenerateUsingTemplateFile> - </OtherWpp> - </ItemGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetName>RadioSwitchHidUsbFx2</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetName>RadioSwitchHidUsbFx2</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>RadioSwitchHidUsbFx2</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>RadioSwitchHidUsbFx2</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\hidclass.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\hidclass.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\hidclass.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\hidclass.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies> - </Link> - </ItemDefinitionGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ALLOW_DATE_TIME>1</ALLOW_DATE_TIME> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ALLOW_DATE_TIME>1</ALLOW_DATE_TIME> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ALLOW_DATE_TIME>1</ALLOW_DATE_TIME> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ALLOW_DATE_TIME>1</ALLOW_DATE_TIME> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemGroup> - <ResourceCompile Include="RadioSwitchHidUsbFx2.rc" /> - </ItemGroup> - <ItemGroup> - <Inf Exclude="@(Inf)" Include="*.inf" /> - <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" /> - </ItemGroup> - <ItemGroup> - <None Exclude="@(None)" Include="*.txt;*.htm;*.html" /> - <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" /> - <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" /> - </ItemGroup> - <ItemGroup> - <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file diff --git a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters b/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters deleted file mode 100644 index b8f7cb14..00000000 --- a/network/radio/HidSwitchDriverSample/RadioSwitchHidUsbFx2.vcxproj.Filters +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> - <UniqueIdentifier>{652E78B0-5E7D-4A38-BAF7-486EBD37CAF8}</UniqueIdentifier> - </Filter> - <Filter Include="Header Files"> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{D1C9D70E-E910-4C53-9624-EB5A85A5A36B}</UniqueIdentifier> - </Filter> - <Filter Include="Resource Files"> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> - <UniqueIdentifier>{91962FEB-66CF-4C7D-A911-BA196B70A87A}</UniqueIdentifier> - </Filter> - <Filter Include="Driver Files"> - <Extensions>inf;inv;inx;mof;mc;</Extensions> - <UniqueIdentifier>{DCB61952-1CBD-4DF7-A231-3432A7250271}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="driver.c; hid.c; usb.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="driver.c; hid.c; usb.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="driver.c; hid.c; usb.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <Inf Include=".\RadioSwitchHidUsbFx2.inx"> - <Filter>Driver Files</Filter> - </Inf> - </ItemGroup> - <ItemGroup> - <ResourceCompile Include="RadioSwitchHidUsbFx2.rc"> - <Filter>Resource Files</Filter> - </ResourceCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/network/radio/HidSwitchDriverSample/driver.c b/network/radio/HidSwitchDriverSample/driver.c deleted file mode 100644 index 61cc97fc..00000000 --- a/network/radio/HidSwitchDriverSample/driver.c +++ /dev/null @@ -1,156 +0,0 @@ -#include "RadioSwitchHidUsbFx2.h" -#pragma warning(disable:28252) -#pragma warning(disable:28253) -#include "driver.tmh" - - -#ifdef ALLOC_PRAGMA - #pragma alloc_text(INIT, DriverEntry) - #pragma alloc_text(PAGE, HidFx2EvtDriverContextCleanup) - #pragma alloc_text(PAGE, HidFx2EvtDeviceAdd) -#endif - - - -//Installable driver initialization entry point. This entry point is called directly by the I/O system. -// -NTSTATUS DriverEntry (_In_ PDRIVER_OBJECT pDriverObject, _In_ PUNICODE_STRING pszRegistryPath) -{ - NTSTATUS status = STATUS_SUCCESS; - WDF_DRIVER_CONFIG config; - WDF_OBJECT_ATTRIBUTES attributes; - - - // Initialize WPP Tracing - WPP_INIT_TRACING(pDriverObject, pszRegistryPath); - - TraceInfo(DBG_INIT, "(%!FUNC!) Enter -DriverEntry\n"); - - WDF_DRIVER_CONFIG_INIT(&config, HidFx2EvtDeviceAdd); - - // Register a cleanup callback so that we can call WPP_CLEANUP when the framework driver object is deleted during driver unload. - WDF_OBJECT_ATTRIBUTES_INIT(&attributes); - attributes.EvtCleanupCallback = HidFx2EvtDriverContextCleanup; - - // Create a framework driver object to represent our driver. - status = WdfDriverCreate(pDriverObject, - pszRegistryPath, - &attributes, // Driver Attributes - &config, // Driver Config Info - WDF_NO_HANDLE - ); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_INIT, "(%!FUNC!)WdfDriverCreate failed with status %!STATUS!\n", status); - WPP_CLEANUP(pDriverObject); - } - - TraceVerbose(DBG_INIT, "(%!FUNC!) Exit\n"); - return status; -} - - - -//Free resources allocated in DriverEntry that are not automatically cleaned up framework. -// -void HidFx2EvtDriverContextCleanup(_In_ WDFOBJECT hDriver) -{ - PAGED_CODE (); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Enter/Exit\n"); - - WPP_CLEANUP(WdfDriverWdmGetDriverObject(hDriver)); -} - - - -//HidFx2EvtDeviceAdd is called by the framework in response to AddDevicecall from the PnP manager. -//We create and initialize a WDF device object to represent a new instance of device. -// -NTSTATUS HidFx2EvtDeviceAdd(_In_ WDFDRIVER hDriver, _Inout_ PWDFDEVICE_INIT pDeviceInit) -{ - NTSTATUS status = STATUS_SUCCESS; - WDF_IO_QUEUE_CONFIG queueConfig; - WDF_OBJECT_ATTRIBUTES attributes; - WDFDEVICE hDevice; - PDEVICE_EXTENSION pDevContext = NULL; - WDFQUEUE hQueue; - WDF_PNPPOWER_EVENT_CALLBACKS pnpPowerCallbacks; - WDF_TIMER_CONFIG timerConfig; - WDFTIMER hTimer; - - UNREFERENCED_PARAMETER(hDriver); - - PAGED_CODE(); - - TraceVerbose(DBG_PNP, "(%!FUNC!) Enter\n"); - - // Tell framework this is a filter driver. - WdfFdoInitSetFilter(pDeviceInit); - - // Initialize pnp-power callbacks, attributes and a context area for the device object. - WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&pnpPowerCallbacks); - - // For usb devices, PrepareHardware callback is the to place select the interface and configure the device. - pnpPowerCallbacks.EvtDevicePrepareHardware = HidFx2EvtDevicePrepareHardware; - - // These two callbacks start and stop the wdfusb pipe continuous reader as we go in and out of the D0-working state. - pnpPowerCallbacks.EvtDeviceD0Entry = HidFx2EvtDeviceD0Entry; - pnpPowerCallbacks.EvtDeviceD0Exit = HidFx2EvtDeviceD0Exit; - - WdfDeviceInitSetPnpPowerEventCallbacks(pDeviceInit, &pnpPowerCallbacks); - - WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, DEVICE_EXTENSION); - - // Create a framework device object.This call will in turn create a WDM device object, attach to the lower stack. - status = WdfDeviceCreate(&pDeviceInit, &attributes, &hDevice); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfDeviceCreate failed with status code %!STATUS!\n", status); - return status; - } - - pDevContext = GetDeviceContext(hDevice); - - WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel); - queueConfig.EvtIoInternalDeviceControl = HidFx2EvtInternalDeviceControl; - - status = WdfIoQueueCreate(hDevice, &queueConfig, WDF_NO_OBJECT_ATTRIBUTES, &hQueue); - if (!NT_SUCCESS (status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfIoQueueCreate failed 0x%x\n", status); - return status; - } - - // Register a manual I/O queue for handling Interrupt Message Read Requests. - WDF_IO_QUEUE_CONFIG_INIT(&queueConfig, WdfIoQueueDispatchManual); - - // This queue is used for requests that dont directly access the device. - // The requests in this queue are serviced only when the device is in a fully powered state and sends an interrupt. - queueConfig.PowerManaged = WdfFalse; - - status = WdfIoQueueCreate(hDevice, &queueConfig, WDF_NO_OBJECT_ATTRIBUTES, &pDevContext->hInterruptMsgQueue); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfIoQueueCreate failed %!STATUS!\n", status); - return status; - } - - // Create a timer to handle debouncing of switchpack - WDF_TIMER_CONFIG_INIT(&timerConfig, HidFx2EvtTimerFunction); - timerConfig.AutomaticSerialization = FALSE; - - WDF_OBJECT_ATTRIBUTES_INIT(&attributes); - attributes.ParentObject = hDevice; - status = WdfTimerCreate(&timerConfig, &attributes, &hTimer); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfTimerCreate failed status:%!STATUS!\n", status); - return status; - } - - pDevContext->hDebounceTimer = hTimer; - - TraceVerbose(DBG_PNP, "(%!FUNC!) Exit\n"); - return status; -} diff --git a/network/radio/HidSwitchDriverSample/hid.c b/network/radio/HidSwitchDriverSample/hid.c deleted file mode 100644 index 2421b88f..00000000 --- a/network/radio/HidSwitchDriverSample/hid.c +++ /dev/null @@ -1,659 +0,0 @@ -#include "RadioSwitchHidUsbFx2.h" -#include "hid.tmh" - -// Radio Management Collection - Scenario 1 control collection (Button only) -// -const HID_REPORT_DESCRIPTOR c_ButtonDescriptor[] = { - 0x05, GENERIC_DESKTOP_USAGE_PAGE, // USAGE_PAGE (Generic Desktop) - 0x09, WIRELESS_RADIO_CONTROLS_USAGE,// USAGE (Wireless Radio Controls) - 0xA1, 0x01, // COLLECTION (Application) - 0x85, GENERIC_DESKTOP_REPORT_ID, // REPORT_ID - 0x15, 0x00, // LOGICAL_MINIMUM(0) - 0x25, 0x01, // LOGICAL_MAXIMUM(1) - // - 0x09, WIRELESS_RADIO_BUTTON_USAGE, // USAGE (Wireless Radio Button) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x81, 0x06, // INPUT (Data, Variable, Rel) - button bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x81, 0x03, // INPUT (const, var, abs) -7 bits of padding - 0xC0 // END_COLLECTION -}; - - -// Radio Management Collection - Scenario 2 control collection (Button with LED) -// -const HID_REPORT_DESCRIPTOR c_ButtonWithLedDescriptor[] = { - 0x05, GENERIC_DESKTOP_USAGE_PAGE, // USAGE_PAGE (Generic Desktop) - 0x09, WIRELESS_RADIO_CONTROLS_USAGE,// USAGE (Wireless Radio Controls) - 0xA1, 0x01, // COLLECTION (Application) - 0x85, GENERIC_DESKTOP_REPORT_ID, // REPORT_ID - 0x15, 0x00, // LOGICAL_MINIMUM(0) - 0x25, 0x01, // LOGICAL_MAXIMUM(1) - // - 0x09, WIRELESS_RADIO_BUTTON_USAGE, // USAGE (Wireless Radio Button) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x81, 0x06, // INPUT (Data, Variable, Rel) - button bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x81, 0x03, // INPUT (const, var, abs) -7 bits of padding - // - 0x09, WIRELESS_RADIO_LED_USAGE, // USAGE (Wireless Radio LED) - 0x75, 0x01, // REPORT_SIZE (1) - 0x91, 0x02, // OUTPUT (Data, Variable, Rel) -led bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x91, 0x03, // OUTPUT (const, var, abs) -7 bits of padding - 0xC0 // END_COLLECTION -}; - - -// Radio Management Collection - Scenario 3 control collection (Slider Switch) -// -const HID_REPORT_DESCRIPTOR c_SliderSwitchDescriptor[] = { - 0x05, GENERIC_DESKTOP_USAGE_PAGE, // USAGE_PAGE (Generic Desktop) - 0x09, WIRELESS_RADIO_CONTROLS_USAGE,// USAGE (Wireless Radio Controls) - 0xA1, 0x01, // COLLECTION (Application) - 0x85, GENERIC_DESKTOP_REPORT_ID, // REPORT_ID - 0x15, 0x00, // LOGICAL_MINIMUM(0) - 0x25, 0x01, // LOGICAL_MAXIMUM(1) - // - 0x09, WIRELESS_RADIO_SLIDER_USAGE, // USAGE (Wireless Radio Slider Switch) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x81, 0x02, // INPUT (Data, Variable, Abs) -switch bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x81, 0x03, // INPUT (const, var, abs) -7 bits of padding - 0xC0 // END_COLLECTION -}; - - -// Radio Management Collection - Scenario 4 control collection (Slider Switch with LED) -// -const HID_REPORT_DESCRIPTOR c_SliderSwitchWithLedDescriptor[] = { - 0x05, GENERIC_DESKTOP_USAGE_PAGE, // USAGE_PAGE (Generic Desktop) - 0x09, WIRELESS_RADIO_CONTROLS_USAGE,// USAGE (Wireless Radio Controls) - 0xA1, 0x01, // COLLECTION (Application) - 0x85, GENERIC_DESKTOP_REPORT_ID, // REPORT_ID - 0x15, 0x00, // LOGICAL_MINIMUM(0) - 0x25, 0x01, // LOGICAL_MAXIMUM(1) - // - 0x09, WIRELESS_RADIO_SLIDER_USAGE, // USAGE (Wireless Radio Slider Switch) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x81, 0x02, // INPUT (Data, Variable, Abs) -switch bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x81, 0x03, // INPUT (const, var, abs) -7 bits of padding - // - 0x09, WIRELESS_RADIO_LED_USAGE, // USAGE (Wireless Radio LED) - 0x75, 0x01, // REPORT_SIZE (1) - 0x91, 0x02, // OUTPUT (Data, Variable, Rel) -led bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x91, 0x03, // OUTPUT (const, var, abs) -7 bits of padding - 0xC0 // END_COLLECTION -}; - - -// Radio Management Collection - Scenario 5 control collection (LED only) -// -const HID_REPORT_DESCRIPTOR c_LedOnlyDescriptor[] = { - 0x05, GENERIC_DESKTOP_USAGE_PAGE, // USAGE_PAGE (Generic Desktop) - 0x09, WIRELESS_RADIO_CONTROLS_USAGE,// USAGE (Wireless Radio Controls) - 0xA1, 0x01, // COLLECTION (Application) - 0x85, GENERIC_DESKTOP_REPORT_ID, // REPORT_ID - 0x15, 0x00, // LOGICAL_MINIMUM(0) - 0x25, 0x01, // LOGICAL_MAXIMUM(1) - // - 0x09, WIRELESS_RADIO_LED_USAGE, // USAGE (Wireless Radio LED) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x91, 0x02, // OUTPUT (Data, Variable, Rel) -led bit - 0x75, 0x07, // REPORT_SIZE (7) - 0x91, 0x03, // OUTPUT (const, var, abs) -7 bits of padding - 0xC0 // END_COLLECTION -}; - - -#ifdef ALLOC_PRAGMA - #pragma alloc_text(PAGE, HidFx2SetOutput) - #pragma alloc_text(PAGE, HidFx2GetInput) - #pragma alloc_text(PAGE, SendVendorCommand) -#endif - - -// This event is called when the framework receives IRP_MJ_INTERNAL DEVICE_CONTROL requests from the system. -// -void HidFx2EvtInternalDeviceControl( - _In_ WDFQUEUE hQueue, - _In_ WDFREQUEST hRequest, - _In_ size_t cOutputBufferLength, - _In_ size_t cInputBufferLength, - _In_ ULONG ulIoControlCode - ) -{ - NTSTATUS status = STATUS_SUCCESS; - WDFDEVICE hDevice; - PDEVICE_EXTENSION pDevContext = NULL; - - UNREFERENCED_PARAMETER(cOutputBufferLength); - UNREFERENCED_PARAMETER(cInputBufferLength); - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n"); - - hDevice = WdfIoQueueGetDevice(hQueue); - pDevContext = GetDeviceContext(hDevice); - - TraceInfo(DBG_IOCTL, "(%!FUNC!) Queue:0x%p, Request:0x%p\n", hQueue, hRequest); - - switch (ulIoControlCode) - { - case IOCTL_HID_GET_DEVICE_DESCRIPTOR: - TraceInfo(DBG_IOCTL, "IOCTL_HID_GET_DEVICE_DESCRIPTOR\n"); - status = HidFx2GetHidDescriptor(hDevice, hRequest); - WdfRequestComplete(hRequest, status); - break; - - case IOCTL_HID_GET_DEVICE_ATTRIBUTES: - TraceInfo(DBG_IOCTL, "IOCTL_HID_GET_DEVICE_ATTRIBUTES\n"); - status = HidFx2GetDeviceAttributes(hRequest); - WdfRequestComplete(hRequest, status); - break; - - case IOCTL_HID_GET_REPORT_DESCRIPTOR: - TraceInfo(DBG_IOCTL, "IOCTL_HID_GET_REPORT_DESCRIPTOR\n"); - status = HidFx2GetReportDescriptor(hDevice, hRequest); - WdfRequestComplete(hRequest, status); - break; - - case IOCTL_HID_READ_REPORT: - TraceInfo(DBG_IOCTL, "IOCTL_HID_READ_REPORT\n"); - status = WdfRequestForwardToIoQueue(hRequest, pDevContext->hInterruptMsgQueue); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_IOCTL, "WdfRequestForwardToIoQueue failed with status: %!STATUS!\n", status); - WdfRequestComplete(hRequest, status); - } - break; - - case IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST: - TraceInfo(DBG_IOCTL, "IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST\n"); - status = HidFx2SendIdleNotification(hRequest); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_IOCTL, "SendIdleNotification failed with status: %!STATUS!\n", status); - WdfRequestComplete(hRequest, status); - } - break; - - case IOCTL_HID_GET_INPUT_REPORT: - TraceInfo(DBG_IOCTL, "IOCTL_HID_GET_INPUT_REPORT\n"); - HidFx2GetInput(hRequest); - WdfRequestComplete(hRequest, status); - break; - - case IOCTL_HID_SET_OUTPUT_REPORT: - TraceInfo(DBG_IOCTL, "IOCTL_HID_SET_OUTPUT_REPORT\n"); - status = HidFx2SetOutput(hRequest); - WdfRequestComplete(hRequest, status); - break; - - default: - TraceInfo(DBG_IOCTL, "IOCTL Not Supported 0x%X\n", ulIoControlCode); - status = STATUS_NOT_SUPPORTED; - WdfRequestComplete(hRequest, status); - break; - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit\n"); - return; -} - - - -NTSTATUS HidFx2GetInput(_In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - WDF_REQUEST_PARAMETERS params; - WDFDEVICE hDevice; - PHID_XFER_PACKET pTransferPacket = NULL; - PHIDFX2_IO_REPORT pOutputReport = NULL; - unsigned char bSwitchState = 0; - - PAGED_CODE(); - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n"); - - hDevice = WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest)); - - WDF_REQUEST_PARAMETERS_INIT(¶ms); - WdfRequestGetParameters(hRequest, ¶ms); - - - if (params.Parameters.DeviceIoControl.OutputBufferLength < sizeof(HID_XFER_PACKET)) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) Userbuffer is small %!STATUS!\n", status); - return status; - } - - pTransferPacket = (PHID_XFER_PACKET) WdfRequestWdmGetIrp(hRequest)->UserBuffer; - if (pTransferPacket == NULL) - { - status = STATUS_INVALID_DEVICE_REQUEST; - TraceErr(DBG_IOCTL, "(%!FUNC!) Irp->UserBuffer is NULL %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportBufferLen == 0) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) HID_XFER_PACKET->reportBufferLen is 0, %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportBufferLen < sizeof(UCHAR)) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) HID_XFER_PACKET->reportBufferLen is too small, %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportId != GENERIC_DESKTOP_REPORT_ID) - { - status = STATUS_INVALID_DEVICE_REQUEST; - TraceErr(DBG_IOCTL, "(%!FUNC!) Incorrect report ID, %!STATUS!\n", status); - return status; - } - - pOutputReport = (PHIDFX2_IO_REPORT)pTransferPacket->reportBuffer; - - // Get the switch state directly from the hardware - status = HidFx2GetSwitchState(hDevice, &bSwitchState); - TraceVerbose(DBG_IOCTL, "(%!FUNC!) switch state 0x%x\n", bSwitchState); - - //Mask off everything except the actual switch bit - bSwitchState &= RADIO_SWITCH_BUTTONS_BIT_MASK; - TraceVerbose(DBG_IOCTL, "(%!FUNC!) maskedswitch state 0x%x\n", bSwitchState); - - pOutputReport->bReportId = GENERIC_DESKTOP_REPORT_ID; - pOutputReport->bData = bSwitchState; - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit status %!STATUS!\n", status); - return status; -} - - - -NTSTATUS HidFx2SetOutput(_In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - PHID_XFER_PACKET pTransferPacket = NULL; - WDF_REQUEST_PARAMETERS params; - PHIDFX2_IO_REPORT pOutputReport = NULL; - WDFDEVICE hDevice; - - PAGED_CODE(); - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n"); - - hDevice = WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest)); - - WDF_REQUEST_PARAMETERS_INIT(¶ms); - WdfRequestGetParameters(hRequest, ¶ms); - - if (params.Parameters.DeviceIoControl.InputBufferLength < sizeof(HID_XFER_PACKET)) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) Userbuffer is small %!STATUS!\n", status); - return status; - } - - pTransferPacket = (PHID_XFER_PACKET) WdfRequestWdmGetIrp(hRequest)->UserBuffer; - if (pTransferPacket == NULL) - { - status = STATUS_INVALID_DEVICE_REQUEST; - TraceErr(DBG_IOCTL, "(%!FUNC!) Irp->UserBuffer is NULL %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportBufferLen == 0) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) HID_XFER_PACKET->reportBufferLen is 0, %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportBufferLen < sizeof(UCHAR)) - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) HID_XFER_PACKET->reportBufferLen is too small, %!STATUS!\n", status); - return status; - } - - if (pTransferPacket->reportId != GENERIC_DESKTOP_REPORT_ID) - { - status = STATUS_INVALID_DEVICE_REQUEST; - TraceErr(DBG_IOCTL, "(%!FUNC!) Incorrect report ID, %!STATUS!\n", status); - return status; - } - - pOutputReport = (PHIDFX2_IO_REPORT)pTransferPacket->reportBuffer; - - if (pOutputReport->bData == 0) - { - status = SendVendorCommand(hDevice, HIDFX2_SET_BARGRAPH_DISPLAY, BARGRAPH_LED_ALL_OFF); - } - else - { - status = SendVendorCommand(hDevice, HIDFX2_SET_BARGRAPH_DISPLAY, BARGRAPH_LED_ALL_ON); - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit status %!STATUS!\n", status); - return status; -} - - - -//This routine sets the state of the Feature: in this case Segment Display on the USB FX2 board. -NTSTATUS SendVendorCommand(_In_ WDFDEVICE hDevice, _In_ unsigned char bVendorCommand, _In_ unsigned char bCommandData) -{ - NTSTATUS status = STATUS_SUCCESS; - ULONG cBytesTransferred = 0; - PDEVICE_EXTENSION pDevContext = NULL; - WDF_MEMORY_DESCRIPTOR memDesc; - WDF_USB_CONTROL_SETUP_PACKET controlSetupPacket; - WDF_REQUEST_SEND_OPTIONS sendOptions; - - PAGED_CODE(); - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n"); - - pDevContext = GetDeviceContext(hDevice); - - TraceInfo(DBG_IOCTL, "(%!FUNC!): Command:0x%x, data: 0x%x\n", bVendorCommand, bCommandData); - - // Send the I/O with a timeout. - // We do that because we send the I/O in the context of the user thread and if it gets stuck, it would prevent the user process from existing. - WDF_REQUEST_SEND_OPTIONS_INIT(&sendOptions, WDF_REQUEST_SEND_OPTION_TIMEOUT); - - WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(&sendOptions, WDF_REL_TIMEOUT_IN_SEC(5)); - - WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(&controlSetupPacket, - BmRequestHostToDevice, - BmRequestToDevice, - bVendorCommand, // Request - 0, // Value - 0); // Index - - WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&memDesc, &bCommandData, sizeof(bCommandData)); - - status = WdfUsbTargetDeviceSendControlTransferSynchronously(pDevContext->hUsbDevice, - WDF_NO_HANDLE, // Optional WDFREQUEST - &sendOptions, // PWDF_REQUEST_SEND_OPTIONS - &controlSetupPacket, - &memDesc, - &cBytesTransferred); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_IOCTL, "(%!FUNC!): Failed to set Segment Display state - %!STATUS!\n", status); - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit\n"); - - return status; -} - - - -// Finds the HID descriptor and copies it into the buffer provided by the Request. -// -NTSTATUS HidFx2GetHidDescriptor(_In_ WDFDEVICE hDevice, _In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - size_t cBytesToCopy = 0; - WDFMEMORY memory; - PDEVICE_EXTENSION pDevContext = NULL; - HID_DESCRIPTOR hidDescriptor; - - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Entry\n"); - - status = WdfRequestRetrieveOutputMemory(hRequest, &memory); - if (NT_SUCCESS(status)) - { - hidDescriptor.bLength= sizeof(hidDescriptor); // length of HID descriptor - hidDescriptor.bDescriptorType= HID_HID_DESCRIPTOR_TYPE; // descriptor type == HID 0x21 - hidDescriptor.bcdHID= HID_CLASS_SPEC_RELEASE_1_00; // hid spec release - hidDescriptor.bCountry= HID_COUNTRY_NON_LOCALIZED; // country code - hidDescriptor.bNumDescriptors= 0x01; // number of HID class descriptors - hidDescriptor.DescriptorList[0].bReportType =HID_REPORT_DESCRIPTOR_TYPE; - hidDescriptor.DescriptorList[0].wReportLength = sizeof(c_ButtonDescriptor); - - pDevContext = GetDeviceContext(hDevice); - if (pDevContext != NULL) - { - // Set length of non default report descriptor - switch (pDevContext->driverMode) - { - case DM_BUTTON_AND_LED: - hidDescriptor.DescriptorList[0].wReportLength = sizeof(c_ButtonWithLedDescriptor); - break; - case DM_SLIDER_SWITCH: - hidDescriptor.DescriptorList[0].wReportLength = sizeof(c_SliderSwitchDescriptor); - break; - case DM_SLIDER_SWITCH_AND_LED: - hidDescriptor.DescriptorList[0].wReportLength = sizeof(c_SliderSwitchWithLedDescriptor); - break; - case DM_LED_ONLY: - hidDescriptor.DescriptorList[0].wReportLength = sizeof(c_LedOnlyDescriptor); - break; - default: - break; - } - } - cBytesToCopy = hidDescriptor.bLength; - if (cBytesToCopy != 0) - { - status = WdfMemoryCopyFromBuffer(memory, 0, (PVOID)&hidDescriptor, cBytesToCopy); - if (NT_SUCCESS(status)) - { - // Report how many bytes were copied - WdfRequestSetInformation(hRequest, cBytesToCopy); - } - else // WdfMemoryCopyFromBuffer failed - { - TraceErr(DBG_IOCTL, "(%!FUNC!) WdfMemoryCopyFromBuffer failed %!STATUS!\n", status); - return status; - } - } - else // length is zero - { - status = STATUS_INVALID_DEVICE_STATE; - TraceErr(DBG_IOCTL, "(%!FUNC!) c_DefaultHidDescriptor is zero, %!STATUS!\n", status); - return status; - } - - } - else // WdfRequestRetrieveOutputMemory failed - { - TraceErr(DBG_IOCTL, " (%!FUNC!) WdfRequestRetrieveOutputMemory failed %!STATUS!\n", status); - return status; - } - - TraceVerbose(DBG_IOCTL, " (%!FUNC!) HidFx2GetHidDescriptor Exit = %!STATUS!\n", status); - return status; -} - - - -// Finds the Report descriptor and copies it into the buffer provided by the Request. -// -NTSTATUS HidFx2GetReportDescriptor(_In_ WDFDEVICE hDevice, _In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - WDFMEMORY memory; - PDEVICE_EXTENSION pDevContext = NULL; - PVOID pBuffer = (PVOID)c_ButtonDescriptor; - size_t cBytesToCopy = sizeof(c_ButtonDescriptor); - - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Entry\n"); - - status = WdfRequestRetrieveOutputMemory(hRequest, &memory); - if (NT_SUCCESS(status)) - { - pDevContext = GetDeviceContext(hDevice); - if (pDevContext != NULL) - { - // Select a non default report descriptor - switch (pDevContext->driverMode) - { - case DM_BUTTON_AND_LED: - pBuffer = (PVOID)c_ButtonWithLedDescriptor; - cBytesToCopy = sizeof(c_ButtonWithLedDescriptor); - break; - case DM_SLIDER_SWITCH: - pBuffer = (PVOID)c_SliderSwitchDescriptor; - cBytesToCopy = sizeof(c_SliderSwitchDescriptor); - break; - case DM_SLIDER_SWITCH_AND_LED: - pBuffer = (PVOID)c_SliderSwitchWithLedDescriptor; - cBytesToCopy = sizeof(c_SliderSwitchWithLedDescriptor); - break; - case DM_LED_ONLY: - pBuffer = (PVOID)c_LedOnlyDescriptor; - cBytesToCopy = sizeof(c_LedOnlyDescriptor); - break; - default: - break; - } - } - if (cBytesToCopy != 0) - { - status = WdfMemoryCopyFromBuffer(memory, 0, pBuffer, cBytesToCopy); - if (NT_SUCCESS(status)) - { - // Report how many bytes were copied - WdfRequestSetInformation(hRequest, cBytesToCopy); - } - else // WdfMemoryCopyFromBuffer failed - { - TraceErr(DBG_IOCTL, "(%!FUNC!) WdfMemoryCopyFromBuffer failed %!STATUS!\n", status); - } - } - else // report length is zero - { - status = STATUS_INVALID_DEVICE_STATE; - TraceErr(DBG_IOCTL, "(%!FUNC!) c_DefaultHidDescriptor's reportLength is zero, %!STATUS!\n", status); - } - } - else // WdfRequestRetrieveOutputMemory failed - { - TraceErr(DBG_IOCTL, "(%!FUNC!)WdfRequestRetrieveOutputMemory failed %!STATUS!\n", status); - - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit = %!STATUS!\n", status); - return status; -} - - - -// Fill in the given struct _HID_DEVICE_ATTRIBUTES -// -NTSTATUS HidFx2GetDeviceAttributes(_In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - PHID_DEVICE_ATTRIBUTES pDeviceAttributes = NULL; - PUSB_DEVICE_DESCRIPTOR pUsbDeviceDescriptor = NULL; - PDEVICE_EXTENSION pDeviceInfo = NULL; - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Entry\n"); - - pDeviceInfo = GetDeviceContext(WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest))); - status = WdfRequestRetrieveOutputBuffer(hRequest, sizeof (HID_DEVICE_ATTRIBUTES), &pDeviceAttributes, NULL); - if (NT_SUCCESS(status)) - { - // Retrieve USB device descriptor saved in device context - pUsbDeviceDescriptor = WdfMemoryGetBuffer(pDeviceInfo->hDeviceDescriptor, NULL); - pDeviceAttributes->Size = sizeof (HID_DEVICE_ATTRIBUTES); - pDeviceAttributes->VendorID = pUsbDeviceDescriptor->idVendor; - pDeviceAttributes->ProductID = pUsbDeviceDescriptor->idProduct; - pDeviceAttributes->VersionNumber = pUsbDeviceDescriptor->bcdDevice; - // Report how many bytes were copied - WdfRequestSetInformation(hRequest, sizeof (HID_DEVICE_ATTRIBUTES)); - } - else // WdfRequestRetrieveOutputBuffer failed - { - TraceErr(DBG_IOCTL, "(%!FUNC!) WdfRequestRetrieveOutputBuffer failed %!STATUS!\n", status); - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit = %!STATUS!\n", status); - return status; -} - - - -// Pass down Idle notification request to lower driver -// -NTSTATUS HidFx2SendIdleNotification(_In_ WDFREQUEST hRequest) -{ - NTSTATUS status = STATUS_SUCCESS; - WDF_REQUEST_SEND_OPTIONS options; - WDFIOTARGET hNextLowerDriver; - WDFDEVICE hDevice; - PIO_STACK_LOCATION pCurrentIrpStack = NULL; - IO_STACK_LOCATION nextIrpStack; - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Entry\n"); - - hDevice = WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest)); - pCurrentIrpStack = IoGetCurrentIrpStackLocation(WdfRequestWdmGetIrp(hRequest)); - - // Convert the request to corresponding USB Idle notification request - if (pCurrentIrpStack->Parameters.DeviceIoControl.InputBufferLength >= sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO)) - { - ASSERT(sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO) == sizeof(USB_IDLE_CALLBACK_INFO)); - #pragma warning(suppress :4127) // conditional expression is constant warning - if (sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO) == sizeof(USB_IDLE_CALLBACK_INFO)) - { - // prepare next stack location - RtlZeroMemory(&nextIrpStack, sizeof(IO_STACK_LOCATION)); - nextIrpStack.MajorFunction = pCurrentIrpStack->MajorFunction; - nextIrpStack.Parameters.DeviceIoControl.InputBufferLength = pCurrentIrpStack->Parameters.DeviceIoControl.InputBufferLength; - nextIrpStack.Parameters.DeviceIoControl.Type3InputBuffer = pCurrentIrpStack->Parameters.DeviceIoControl.Type3InputBuffer; - nextIrpStack.Parameters.DeviceIoControl.IoControlCode = IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION; - nextIrpStack.DeviceObject = WdfIoTargetWdmGetTargetDeviceObject(WdfDeviceGetIoTarget(hDevice)); - - // Format the I/O request for the driver's local I/O target by using the contents of the specified WDM I/O stack location structure. - WdfRequestWdmFormatUsingStackLocation(hRequest, &nextIrpStack); - - // Send the request down using Fire and forget option. - WDF_REQUEST_SEND_OPTIONS_INIT(&options, WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET); - hNextLowerDriver = WdfDeviceGetIoTarget(hDevice); - if (WdfRequestSend(hRequest, hNextLowerDriver, &options) == FALSE) - { - status = STATUS_UNSUCCESSFUL; - } - } - else // Incorrect DeviceIoControl.InputBufferLength - { - status = STATUS_INFO_LENGTH_MISMATCH; - TraceErr(DBG_IOCTL, "(%!FUNC!) Incorrect DeviceIoControl.InputBufferLength, %!STATUS!\n", status); - return status; - } - } - else // DeviceIoControl.InputBufferLength too small - { - status = STATUS_BUFFER_TOO_SMALL; - TraceErr(DBG_IOCTL, "(%!FUNC!) DeviceIoControl.InputBufferLength too small, %!STATUS!\n", status); - return status; - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit = %!STATUS!\n", status); - return status; -} - - - - - diff --git a/network/radio/HidSwitchDriverSample/trace.h b/network/radio/HidSwitchDriverSample/trace.h deleted file mode 100644 index 0ec09b91..00000000 --- a/network/radio/HidSwitchDriverSample/trace.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#define WPP_CHECK_FOR_NULL_STRING //to prevent exceptions due to NULL strings - -#define WPP_CONTROL_GUIDS \ - WPP_DEFINE_CONTROL_GUID(HidUsbFx2TraceGuid, (091182d7, 5167, 4e77, aa80, ca6c1e6201e9), \ - WPP_DEFINE_BIT(DBG_INIT) \ - WPP_DEFINE_BIT(DBG_PNP) \ - WPP_DEFINE_BIT(DBG_IOCTL) \ - ) - -#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags) -#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl) diff --git a/network/radio/HidSwitchDriverSample/usb.c b/network/radio/HidSwitchDriverSample/usb.c deleted file mode 100644 index 84cf7faa..00000000 --- a/network/radio/HidSwitchDriverSample/usb.c +++ /dev/null @@ -1,466 +0,0 @@ -#include "RadioSwitchHidUsbFx2.h" -#include "usb.tmh" - - -#ifdef ALLOC_PRAGMA -#pragma alloc_text(PAGE, HidFx2EvtDevicePrepareHardware) -#pragma alloc_text(PAGE, HidFx2EvtDeviceD0Exit) -#pragma alloc_text(PAGE, HidFx2ConfigContReaderForInterruptEndPoint) -#endif - - -// In this callback, the driver does whatever is necessary to make the hardware ready to use. -// In the case of a USB device, this involves reading and selecting descriptors. -NTSTATUS -HidFx2EvtDevicePrepareHardware( - _In_ WDFDEVICE hDevice, - _In_ WDFCMRESLIST hResourceList, - _In_ WDFCMRESLIST hResourceListTranslated - ) -{ - NTSTATUS status = STATUS_SUCCESS; - PDEVICE_EXTENSION pDevContext = NULL; - WDF_USB_DEVICE_SELECT_CONFIG_PARAMS configParams; - WDF_OBJECT_ATTRIBUTES attributes; - PUSB_DEVICE_DESCRIPTOR pUsbDeviceDescriptor = NULL; - - UNREFERENCED_PARAMETER(hResourceList); - UNREFERENCED_PARAMETER(hResourceListTranslated); - - PAGED_CODE (); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Enter\n"); - - pDevContext = GetDeviceContext(hDevice); - - // Create a WDFUSBDEVICE object. WdfUsbTargetDeviceCreate obtains the USB device descriptor and the first USB configuration - //descriptor from the device and stores them. It also creates a framework USB interface object for each interface in the device's first configuration. - // - // The parent of each USB device object is the driver's framework driver object. The driver cannot change this parent, and the ParentObject - // member or the WDF_OBJECT_ATTRIBUTES structure must be NULL. - // - // We only create device the first time PrepareHardware is called. If the device is restarted by pnp manager for resource rebalance, we - // will use the same device handle but then select the interfaces again because the USB stack could reconfigure the device on restart. - if (pDevContext->hUsbDevice == NULL) - { - status = WdfUsbTargetDeviceCreate(hDevice, WDF_NO_OBJECT_ATTRIBUTES, &pDevContext->hUsbDevice); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfUsbTargetDeviceCreate failed %!STATUS!\n", status); - return status; - } - } - - // Select a device configuration by using a WDF_USB_DEVICE_SELECT_CONFIG_PARAMS - WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE(&configParams); - status = WdfUsbTargetDeviceSelectConfig(pDevContext->hUsbDevice, WDF_NO_OBJECT_ATTRIBUTES, &configParams); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfUsbTargetDeviceSelectConfig failed %!STATUS!\n", status); - return status; - } - - pDevContext->hUsbInterface = configParams.Types.SingleInterface.ConfiguredUsbInterface; - - // Get the device descriptor and store it in device context - WDF_OBJECT_ATTRIBUTES_INIT(&attributes); - attributes.ParentObject = hDevice; - status = WdfMemoryCreate(&attributes, - NonPagedPoolNx, - 0, - sizeof(USB_DEVICE_DESCRIPTOR), - &pDevContext->hDeviceDescriptor, - &pUsbDeviceDescriptor); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_PNP, "(%!FUNC!) WdfMemoryCreate for Device Descriptor failed %!STATUS!\n", status); - return status; - } - - WdfUsbTargetDeviceGetDeviceDescriptor(pDevContext->hUsbDevice, pUsbDeviceDescriptor); - - // Get the Interrupt pipe. There are other endpoints but we are only interested in interrupt endpoint since our HID data comes from this - pDevContext->hInterruptPipe = WdfUsbInterfaceGetConfiguredPipe(pDevContext->hUsbInterface, INTERRUPT_ENDPOINT_INDEX, NULL); - if (NULL == pDevContext->hInterruptPipe) - { - TraceErr(DBG_PNP, "(%!FUNC!) Failed to get interrupt pipe info\n"); - status = STATUS_INVALID_DEVICE_STATE; - return status; - } - - // Tell the framework that it's okay to read less than MaximumPacketSize - WdfUsbTargetPipeSetNoMaximumPacketSizeCheck(pDevContext->hInterruptPipe); - - //configure continuous reader - status = HidFx2ConfigContReaderForInterruptEndPoint(pDevContext); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Exit, Status: %!STATUS!\n", status); - - return status; -} - - - -// This routine configures a continuous reader on the interrupt endpoint. It's called from the PrepareHarware event. -// -NTSTATUS HidFx2ConfigContReaderForInterruptEndPoint(PDEVICE_EXTENSION pDeviceContext) -{ - WDF_USB_CONTINUOUS_READER_CONFIG contReaderConfig; - NTSTATUS status = STATUS_SUCCESS; - - PAGED_CODE (); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Enter\n"); - - WDF_USB_CONTINUOUS_READER_CONFIG_INIT(&contReaderConfig, - HidFx2EvtUsbInterruptPipeReadComplete, - pDeviceContext, // Context - sizeof(UCHAR)); // TransferLength - - status = WdfUsbTargetPipeConfigContinuousReader(pDeviceContext->hInterruptPipe, &contReaderConfig); - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_INIT, "(%!FUNC!) failed %!STATUS!\n", status); - } - - TraceVerbose(DBG_INIT, "(%!FUNC!) Exit, status: %!STATUS!\n", status); - - return status; -} - - - -// This the completion routine of the continuous reader. This can called concurrently on multiprocessor system if there are -// more than one readers configured. So make sure to protect access to global resources. -// -void HidFx2EvtUsbInterruptPipeReadComplete( - WDFUSBPIPE hPipe, - WDFMEMORY hBuffer, - size_t cNumBytesTransferred, - WDFCONTEXT pContext - ) -{ - PDEVICE_EXTENSION pDevContext = pContext; - BOOLEAN fInTimerQueue; - unsigned char *pbSwitchState = NULL; - unsigned char bCurrentSwitchState = 0; - unsigned char bPrevSwitchState = 0; - unsigned char bToggledSwitch = 0; - - UNREFERENCED_PARAMETER(cNumBytesTransferred); - UNREFERENCED_PARAMETER(hPipe); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Enter\n"); - - // Interrupt endpoints sends switch state when first started or when resuming from suspend. - // We need to ignore that data since user did not change the switch state. - if (pDevContext->fIsPowerUpSwitchState) - { - pDevContext->fIsPowerUpSwitchState = FALSE; - TraceInfo(DBG_INIT, "(%!FUNC!) Dropping interrupt message since received during powerup/resume\n"); - return; - } - - - // Make sure that there is data in the read packet. - // Depending on the device specification, it is possible for it to return a 0 length read in certain conditions. - if (cNumBytesTransferred == 0) - { - TraceWarning(DBG_INIT, "(%!FUNC!) Zero length read occured on the Interrupt Pipe's Continuous Reader\n"); - return; - } - - pbSwitchState = WdfMemoryGetBuffer(hBuffer, NULL); - bCurrentSwitchState = ~(*pbSwitchState); // switchs are inverted on hardware boards - bCurrentSwitchState &= RADIO_SWITCH_BUTTONS_BIT_MASK; //Mask off everything except the actual radio switch bit - bPrevSwitchState = pDevContext->bCurrentSwitchState; - - if (bPrevSwitchState ^ bCurrentSwitchState) // make sure we toggled the radio switch - { - switch(pDevContext->driverMode) - { - // If it's a slider switch we want 0->1 and 1->0 transitions. - case DM_SLIDER_SWITCH: - case DM_SLIDER_SWITCH_AND_LED: - bToggledSwitch = bCurrentSwitchState; - // A timer is started for 10 ms everytime there is a switch toggled - fInTimerQueue = WdfTimerStart(pDevContext->hDebounceTimer, WDF_REL_TIMEOUT_IN_MS(SWITCHPACK_DEBOUNCE_TIME)); - TraceInfo(DBG_INIT, "(%!FUNC!) Debounce Timer started. Existing -%!bool!\n", fInTimerQueue); - break; - //If it's a button so we only report 0->1 transitions - case DM_BUTTON: - case DM_BUTTON_AND_LED: - bToggledSwitch = (bPrevSwitchState ^ bCurrentSwitchState) & bCurrentSwitchState; - if (bToggledSwitch != 0) - { - // A timer is started for 10 ms everytime there is a switch toggled on - fInTimerQueue = WdfTimerStart(pDevContext->hDebounceTimer, WDF_REL_TIMEOUT_IN_MS(SWITCHPACK_DEBOUNCE_TIME)); - TraceInfo(DBG_INIT, "(%!FUNC!) Debounce Timer started. Existing -%!bool!\n", fInTimerQueue); - } - break; - // Ignore button presses if LED only - case DM_LED_ONLY: - default: - break; - } - - // Store switch state in device context - pDevContext->bCurrentSwitchState = bCurrentSwitchState; - pDevContext->bLatestToggledSwitch = bToggledSwitch; - } - else - { - TraceInfo(DBG_INIT, "(%!FUNC!) Not a radio switch toggle\n"); - } - TraceInfo(DBG_INIT, "(%!FUNC!) Switch 0x%x, prevSwitch:0x%x, X0R:0x%x\n", bCurrentSwitchState, bPrevSwitchState, bToggledSwitch); - - TraceVerbose(DBG_INIT, "(%!FUNC!) Exit\n"); -} - - - -// This function gets called when the timeout period of debounce timer elapses. -// It reports a switch change by completing a pending request -// -void HidFx2EvtTimerFunction(_In_ WDFTIMER hTimer) -{ - WDFDEVICE hDevice = NULL; - WDFREQUEST hRequest; - PDEVICE_EXTENSION pDevContext = NULL; - NTSTATUS status = STATUS_SUCCESS; - size_t cBytesReturned = 0; - unsigned char bToggledSwitch = 0; - ULONG cBytesToCopy = 0; - PHIDFX2_IO_REPORT pInputReport = NULL; - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n"); - - - hDevice = WdfTimerGetParentObject(hTimer); - pDevContext = GetDeviceContext(hDevice); - - bToggledSwitch = pDevContext->bLatestToggledSwitch; - TraceInfo(DBG_IOCTL, "(%!FUNC!) mode %d switch %d\n", pDevContext->driverMode, bToggledSwitch); - - if (!((pDevContext->driverMode == DM_BUTTON || pDevContext->driverMode == DM_BUTTON_AND_LED) && bToggledSwitch == 0)) - { - // Check if there are any pending requests in the Interrupt Message Queue. - // If a request is found then complete the pending request. - status = WdfIoQueueRetrieveNextRequest(pDevContext->hInterruptMsgQueue, &hRequest); - if (NT_SUCCESS(status)) - { - cBytesToCopy = sizeof(pInputReport[0]); - status = WdfRequestRetrieveOutputBuffer(hRequest, - cBytesToCopy, - &pInputReport, - &cBytesReturned); // BufferLength - if (NT_SUCCESS(status)) - { - TraceInfo(DBG_IOCTL, "(%!FUNC!) WdfRequestRetrieveOutputBuffer switch %d\n", bToggledSwitch); - - pInputReport->bReportId = GENERIC_DESKTOP_REPORT_ID; - pInputReport->bData = bToggledSwitch; - cBytesReturned = cBytesToCopy; - } - else // WdfRequestRetrieveOutputBuffer failed - { - TraceErr(DBG_IOCTL, "(%!FUNC!) WdfRequestRetrieveOutputBuffer failed with status: %!STATUS!\n", status); - } - - WdfRequestCompleteWithInformation(hRequest, status, cBytesReturned); - - } - else if (status != STATUS_NO_MORE_ENTRIES) - { - TraceErr(DBG_IOCTL, "(%!FUNC!) WdfIoQueueRetrieveNextRequest status %!STATUS!\n", status); - } - } - else - { - TraceInfo(DBG_IOCTL, "(%!FUNC!) ignore switch"); - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit\n"); -} - - - -// This function gets the switch state of the USB device directly from the hardware -// -NTSTATUS HidFx2GetSwitchState(_In_ WDFDEVICE hDevice, _Out_ unsigned char *pbSwitchState) -{ - PDEVICE_EXTENSION pDevContext = NULL; - NTSTATUS status = STATUS_SUCCESS; - WDF_MEMORY_DESCRIPTOR memDesc; - WDF_USB_CONTROL_SETUP_PACKET controlSetupPacket; - ULONG cBytesTransferred = 0; - - if(pbSwitchState != NULL) - { - *pbSwitchState = 0; - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Entry\n"); - - pDevContext = GetDeviceContext(hDevice); - - // set the segment state on the USB device - WDF_USB_CONTROL_SETUP_PACKET_INIT_VENDOR(&controlSetupPacket, - BmRequestDeviceToHost, - BmRequestToDevice, - HIDFX2_READ_SWITCH_STATE, // Request - 0, // Value - 0); // Index - - WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&memDesc, pbSwitchState, sizeof(*pbSwitchState)); - - status = WdfUsbTargetDeviceSendControlTransferSynchronously(pDevContext->hUsbDevice, - NULL, // Optional WDFREQUEST - NULL, // PWDF_REQUEST_SEND_OPTIONS - &controlSetupPacket, - &memDesc, - &cBytesTransferred); - - if (!NT_SUCCESS(status)) - { - TraceErr(DBG_IOCTL, "(%!FUNC!) Failed to read switch state - %!STATUS! \n", status); - } - else - { - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Switch state is 0x%x\n", *pbSwitchState); - *pbSwitchState = ~(*pbSwitchState); // switchs are inverted on hardware boards - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Switch state is 0x%x\n", *pbSwitchState); - } - - TraceVerbose(DBG_IOCTL, "(%!FUNC!) Exit, status: %!STATUS!\n", status); - return status; -} - - - -// EvtDeviceD0Entry event callback must perform any operations that are necessary before the specified device is used. -// Called every time the hardware needs to be initialized/reinitialized. -// This function is not marked pageable because this function is in the device power up path. -// This function runs at PASSIVE_LEVEL, even though it is not paged. -// -NTSTATUS HidFx2EvtDeviceD0Entry(_In_ WDFDEVICE hDevice, _In_ WDF_POWER_DEVICE_STATE previousState) -{ - PDEVICE_EXTENSION pDevContext = NULL; - NTSTATUS status = STATUS_SUCCESS; - unsigned char bSwitchState = 0; - unsigned char bMode = 0; - - pDevContext = GetDeviceContext(hDevice); - - TraceVerbose(DBG_PNP, "(%!FUNC!) Enter - coming from %S\n", DbgDevicePowerString(previousState)); - - SendVendorCommand(hDevice, HIDFX2_SET_BARGRAPH_DISPLAY, BARGRAPH_LED_ALL_OFF); - - // Retrieve the current switch state and store it in device context - status = HidFx2GetSwitchState(hDevice, &bSwitchState); - if (NT_SUCCESS(status)) - { - // Left most switches define Mode - bMode = bSwitchState & MODE_SELECTION_BUTTONS_BIT_MASK; - switch (bMode) - { - case SWITCHPACK_SELECTION_FOR_MODE2: - pDevContext->driverMode = DM_BUTTON_AND_LED; - SendVendorCommand(hDevice, HIDFX2_SET_7SEGMENT_DISPLAY, SEGMENT_DISPLAY_2); - break; - case SWITCHPACK_SELECTION_FOR_MODE3: - pDevContext->driverMode = DM_SLIDER_SWITCH; - SendVendorCommand(hDevice, HIDFX2_SET_7SEGMENT_DISPLAY, SEGMENT_DISPLAY_3); - break; - case SWITCHPACK_SELECTION_FOR_MODE4: - pDevContext->driverMode = DM_SLIDER_SWITCH_AND_LED; - SendVendorCommand(hDevice, HIDFX2_SET_7SEGMENT_DISPLAY, SEGMENT_DISPLAY_4); - break; - case SWITCHPACK_SELECTION_FOR_MODE5: - pDevContext->driverMode = DM_LED_ONLY; - SendVendorCommand(hDevice, HIDFX2_SET_7SEGMENT_DISPLAY, SEGMENT_DISPLAY_5); - break; - default: - pDevContext->driverMode = DM_BUTTON; - SendVendorCommand(hDevice, HIDFX2_SET_7SEGMENT_DISPLAY, SEGMENT_DISPLAY_1); - break; - } - - pDevContext->bCurrentSwitchState = bSwitchState; - - // Start the target. This will start the continuous reader - status = WdfIoTargetStart(WdfUsbTargetPipeGetIoTarget(pDevContext->hInterruptPipe)); - if (NT_SUCCESS(status)) - { - pDevContext->fIsPowerUpSwitchState = TRUE; - } - } - else - { - TraceErr(DBG_PNP, "(%!FUNC!) Failed to get current switch state, status: %!STATUS!\n", status); - } - - TraceVerbose(DBG_PNP, "(%!FUNC!) Exit, status: %!STATUS!\n", status); - return status; -} - - - -/* -This routine undoes anything done in EvtDeviceD0Entry. It is called whenever the device leaves the D0 state, which happens when the device is -stopped, when it is removed, and when it is powered off. - -The device is still in D0 when this callback is invoked, which means that the driver can still touch hardware in this routine. - -EvtDeviceD0Exit event callback must perform any operations that are necessary before the specified device is moved out of the D0 state. -If the driver needs to save hardware state before the device is powered down, then that should be done here. - -This function runs at PASSIVE_LEVEL, though it is generally not paged. A driver can optionally make this function pageable if DO_POWER_PAGABLE is set. - -Even if DO_POWER_PAGABLE isn't set, this function still runs at PASSIVE_LEVEL. -In this case, though, the function absolutely must not do anything that will cause a page fault. -*/ -NTSTATUS HidFx2EvtDeviceD0Exit(_In_ WDFDEVICE hDevice, _In_ WDF_POWER_DEVICE_STATE targetState) -{ - PDEVICE_EXTENSION pDevContext; - - PAGED_CODE(); - - TraceVerbose(DBG_PNP, "(%!FUNC!) Enter- moving to %S\n", DbgDevicePowerString(targetState)); - - pDevContext = GetDeviceContext(hDevice); - - WdfIoTargetStop(WdfUsbTargetPipeGetIoTarget(pDevContext->hInterruptPipe), WdfIoTargetCancelSentIo); - - TraceVerbose(DBG_PNP, "(%!FUNC!) Exit\n"); - - return STATUS_SUCCESS; -} - - - -PCWSTR DbgDevicePowerString(_In_ WDF_POWER_DEVICE_STATE powerState) -{ - switch (powerState) - { - case WdfPowerDeviceInvalid: - return L"WdfPowerDeviceInvalid"; - case WdfPowerDeviceD0: - return L"WdfPowerDeviceD0"; - case PowerDeviceD1: - return L"WdfPowerDeviceD1"; - case WdfPowerDeviceD2: - return L"WdfPowerDeviceD2"; - case WdfPowerDeviceD3: - return L"WdfPowerDeviceD3"; - case WdfPowerDeviceD3Final: - return L"WdfPowerDeviceD3Final"; - case WdfPowerDevicePrepareForHibernation: - return L"WdfPowerDevicePrepareForHibernation"; - case WdfPowerDeviceMaximum: - return L"PowerDeviceMaximum"; - default: - return L"UnKnown Device Power State"; - } -} - diff --git a/network/radio/RadioManagerSample/RadioManagerSample.sln b/network/radio/RadioManagerSample/RadioManagerSample.sln index 8f24bfc5..ac5e9178 100644 --- a/network/radio/RadioManagerSample/RadioManagerSample.sln +++ b/network/radio/RadioManagerSample/RadioManagerSample.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleRM", "cpp\SampleRM.vc EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|Win32.Build.0 = Debug|Win32 - {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|Win32.ActiveCfg = Release|Win32 - {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|Win32.Build.0 = Release|Win32 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|ARM64.Build.0 = Debug|ARM64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|ARM64.ActiveCfg = Release|ARM64 + {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|ARM64.Build.0 = Release|ARM64 {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|x64.ActiveCfg = Debug|x64 {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Debug|x64.Build.0 = Debug|x64 {1138E033-EEBF-4BA3-B74F-D51443EF5EE0}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj index e6c3e212..02ce8236 100644 --- a/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj +++ b/network/radio/RadioManagerSample/cpp/SampleRM.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{1138E033-EEBF-4BA3-B74F-D51443EF5EE0}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{249F8230-A77D-4B97-A61C-30A168C1C626}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>SampleRM</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>SampleRM</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>SampleRM</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>SampleRM</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -92,17 +92,17 @@ <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> </ClCompile> @@ -112,17 +112,17 @@ <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> @@ -130,13 +130,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <UseOfAtl>Dynamic</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <UseOfAtl>Dynamic</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <UseOfAtl>Dynamic</UseOfAtl> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <UseOfAtl>Dynamic</UseOfAtl> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -150,7 +150,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ClCompile> @@ -161,7 +161,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ClCompile> @@ -172,7 +172,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32;UNICODE;_UNICODE;_NTSDK=1;WPP_USE_NTDLL_FUNCTIONS</PreprocessorDefinitions> </ClCompile> @@ -185,26 +185,22 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -224,7 +220,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -241,7 +237,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -258,7 +254,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> diff --git a/network/trans/WFPSampler/WFPSampler.sln b/network/trans/WFPSampler/WFPSampler.sln index d0bea94a..4f4851d9 100644 --- a/network/trans/WFPSampler/WFPSampler.sln +++ b/network/trans/WFPSampler/WFPSampler.sln @@ -1,7 +1,7 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34701.34 MinimumVisualStudioVersion = 12.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{7DD950F3-D068-438B-808A-EE9BE2D1F34D}" EndProject @@ -34,48 +34,48 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WFPSampler", "exe\WFPSample EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|Win32.ActiveCfg = Debug|Win32 - {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|Win32.Build.0 = Debug|Win32 - {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|Win32.ActiveCfg = Release|Win32 - {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|Win32.Build.0 = Release|Win32 + {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|ARM64.Build.0 = Debug|ARM64 + {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|ARM64.Build.0 = Debug|ARM64 + {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|ARM64.Build.0 = Debug|ARM64 + {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|ARM64.Build.0 = Debug|ARM64 + {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|ARM64.Build.0 = Debug|ARM64 + {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|ARM64.ActiveCfg = Release|ARM64 + {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|ARM64.Build.0 = Release|ARM64 + {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|ARM64.ActiveCfg = Release|ARM64 + {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|ARM64.Build.0 = Release|ARM64 + {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|ARM64.ActiveCfg = Release|ARM64 + {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|ARM64.Build.0 = Release|ARM64 + {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|ARM64.ActiveCfg = Release|ARM64 + {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|ARM64.Build.0 = Release|ARM64 + {778259E7-3481-41CC-891C-375F6FAE1F19}.Release|ARM64.ActiveCfg = Release|ARM64 + {778259E7-3481-41CC-891C-375F6FAE1F19}.Release|ARM64.Build.0 = Release|ARM64 {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|x64.ActiveCfg = Debug|x64 {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Debug|x64.Build.0 = Debug|x64 {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|x64.ActiveCfg = Release|x64 {26F918E9-6CA9-4AC8-BBCA-418F3165DCE1}.Release|x64.Build.0 = Release|x64 - {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|Win32.ActiveCfg = Debug|Win32 - {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|Win32.Build.0 = Debug|Win32 - {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|Win32.ActiveCfg = Release|Win32 - {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|Win32.Build.0 = Release|Win32 {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|x64.ActiveCfg = Debug|x64 {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Debug|x64.Build.0 = Debug|x64 {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|x64.ActiveCfg = Release|x64 {6F3E7DC1-C828-463C-BC9E-290B56D0F58C}.Release|x64.Build.0 = Release|x64 - {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|Win32.ActiveCfg = Debug|Win32 - {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|Win32.Build.0 = Debug|Win32 - {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|Win32.ActiveCfg = Release|Win32 - {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|Win32.Build.0 = Release|Win32 {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|x64.ActiveCfg = Debug|x64 {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Debug|x64.Build.0 = Debug|x64 {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|x64.ActiveCfg = Release|x64 {909C6B51-0D92-440A-9FEB-B7A2715D8EDE}.Release|x64.Build.0 = Release|x64 - {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|Win32.Build.0 = Debug|Win32 - {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|Win32.ActiveCfg = Release|Win32 - {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|Win32.Build.0 = Release|Win32 {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|x64.ActiveCfg = Debug|x64 {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Debug|x64.Build.0 = Debug|x64 {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|x64.ActiveCfg = Release|x64 {E5EAD883-D15D-42DA-BCF6-78484F91BEC2}.Release|x64.Build.0 = Release|x64 - {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|Win32.ActiveCfg = Debug|Win32 - {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|Win32.Build.0 = Debug|Win32 - {778259E7-3481-41CC-891C-375F6FAE1F19}.Release|Win32.ActiveCfg = Release|Win32 - {778259E7-3481-41CC-891C-375F6FAE1F19}.Release|Win32.Build.0 = Release|Win32 {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|x64.ActiveCfg = Debug|x64 {778259E7-3481-41CC-891C-375F6FAE1F19}.Debug|x64.Build.0 = Debug|x64 {778259E7-3481-41CC-891C-375F6FAE1F19}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/trans/WFPSampler/exe/WFPSampler.vcxproj b/network/trans/WFPSampler/exe/WFPSampler.vcxproj index 34c79187..3a80bd7c 100644 --- a/network/trans/WFPSampler/exe/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/exe/WFPSampler.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,41 +22,45 @@ <ProjectGuid>{778259E7-3481-41CC-891C-375F6FAE1F19}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{FB205303-28A2-4DC2-A648-6A009F5B5C23}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -65,26 +69,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -108,7 +112,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> @@ -129,7 +133,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> @@ -150,7 +154,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> diff --git a/network/trans/WFPSampler/exe/WFPSampler.vcxproj.Filters b/network/trans/WFPSampler/exe/WFPSampler.vcxproj.Filters index 53a436b8..490ff8d2 100644 --- a/network/trans/WFPSampler/exe/WFPSampler.vcxproj.Filters +++ b/network/trans/WFPSampler/exe/WFPSampler.vcxproj.Filters @@ -64,4 +64,57 @@ <Filter>Source Files</Filter> </ClCompile> </ItemGroup> + <ItemGroup> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp b/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp index 79a183c1..a0670d60 100644 --- a/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp +++ b/network/trans/WFPSampler/lib/HelperFunctions_Log.cpp @@ -84,9 +84,6 @@ VOID HlprLogError(_In_ PCWSTR pMessage, argumentList); if(status != NO_ERROR) { - wprintf(L"HlprLogError : StringCchVPrintf() [status: %#x]", - status); - HLPR_BAIL; } @@ -95,9 +92,6 @@ VOID HlprLogError(_In_ PCWSTR pMessage, &size); if(status != NO_ERROR) { - wprintf(L"HlprLogError : StringCchLength() [status: %#x]", - status); - HLPR_BAIL; } @@ -115,14 +109,9 @@ VOID HlprLogError(_In_ PCWSTR pMessage, pLogMessage); if(status != NO_ERROR) { - wprintf(L"HlprLogError : StringCchPrintf() [status: %#x]", - status); - HLPR_BAIL; } - wprintf(pActualMessage); - HLPR_BAIL_LABEL: va_end(argumentList); @@ -201,8 +190,6 @@ VOID HlprLogInfo(_In_ PCWSTR pMessage, HLPR_BAIL; } - wprintf(pActualMessage); - HLPR_BAIL_LABEL: va_end(argumentList); diff --git a/network/trans/WFPSampler/lib/WFPSampler.vcxproj b/network/trans/WFPSampler/lib/WFPSampler.vcxproj index 713e363f..a905e396 100644 --- a/network/trans/WFPSampler/lib/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/lib/WFPSampler.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -23,41 +23,45 @@ <RootNamespace>$(MSBuildProjectName)</RootNamespace> <SupportsPackaging>false</SupportsPackaging> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{266CA76A-7B80-446A-80F9-4322B0A18BC6}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -66,26 +70,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -105,11 +109,9 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\idl;$(SDK_INC_PATH);.\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> @@ -126,11 +128,9 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\idl;$(SDK_INC_PATH);.\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> @@ -147,11 +147,9 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\idl;$(SDK_INC_PATH);.\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> @@ -168,8 +166,6 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\idl;$(SDK_INC_PATH);.\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib;ws2_32.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemGroup> diff --git a/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp b/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp index e9ed9f4c..3a698bc0 100644 --- a/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp +++ b/network/trans/WFPSampler/svc/Scenarios_AppContainers.cpp @@ -585,7 +585,7 @@ UINT32 PrvScenarioAppContainerRegister() { UINT32 status = NO_ERROR; - status = NetworkIsolationRegisterForAppContainerChanges(0, + status = NetworkIsolationRegisterForAppContainerChanges(INET_FIREWALL_AC_NONE, PrvScenarioAppContainerActOnChange, 0, ®istrationHandle); diff --git a/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj b/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj index 94eb7ad7..1e3c0eac 100644 --- a/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj +++ b/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,41 +22,45 @@ <ProjectGuid>{E5EAD883-D15D-42DA-BCF6-78484F91BEC2}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{256D7B80-D376-4F69-B8B0-F835E2A36519}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -65,26 +69,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>WFPSamplerService</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>WFPSamplerService</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>WFPSamplerService</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>WFPSamplerService</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -94,6 +98,10 @@ <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <SDLCheck>true</SDLCheck> + <WholeProgramOptimization>true</WholeProgramOptimization> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> @@ -105,16 +113,18 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;api-ms-win-net-isolation-l1-1-0.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <SDLCheck>true</SDLCheck> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> @@ -126,16 +136,19 @@ </ResourceCompile> <Link> <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;api-ms-win-net-isolation-l1-1-0.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <RuntimeTypeInfo>false</RuntimeTypeInfo> + <SDLCheck>true</SDLCheck> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> @@ -146,17 +159,21 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;api-ms-win-net-isolation-l1-1-0.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalOptions>%(AdditionalOptions) /integritycheck /VERBOSE:LIB</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <IgnoreSpecificDefaultLibraries>libcmt.lib;msvcrt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <CallingConvention>StdCall</CallingConvention> + <SDLCheck>true</SDLCheck> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE</PreprocessorDefinitions> @@ -167,8 +184,9 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\lib;$(SDK_INC_PATH);.\$(IntDir);.\..\lib\$(IntDir)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalOptions>%(AdditionalOptions) /integritycheck</AdditionalOptions> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;api-ms-win-net-isolation-l1-1-0.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalOptions>%(AdditionalOptions) /integritycheck /VERBOSE:LIB</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <IgnoreSpecificDefaultLibraries>libcmt.lib;msvcrt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemGroup> diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp index 1df1f7b5..b71c77e0 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp @@ -99,7 +99,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_AdvancedPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_AdvancedPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if DBG diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp index 375dab93..69773e8a 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicActionCallouts.cpp @@ -52,7 +52,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_BasicActionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_BasicActionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PerformBasicAction" diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp index 64c0b401..cef0b6df 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp @@ -4199,7 +4199,7 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) break; } - case IpDiscardIPSNPIDrop: + case IpDiscardIpsnpiClientDrop: { pDiscardReason = "IPSNPI Drop"; diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp index 2409a64d..641cb8be 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketInjectionCallouts.cpp @@ -103,7 +103,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_BasicPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_BasicPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if DBG diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp index d6acb876..1a31999f 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketModificationCallouts.cpp @@ -106,7 +106,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_BasicPacketModificationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_BasicPacketModificationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN8) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp index 493fdace..7624c0f6 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicStreamInjectionCallouts.cpp @@ -54,7 +54,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_BasicStreamInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_BasicStreamInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PerformBasicPacketInjectionAtOutboundTransport" diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp index b7bf9fc9..0e99b61e 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastPacketInjectionCallouts.cpp @@ -46,7 +46,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_FastPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_FastPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp index 07822e88..a10b0d8a 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FastStreamInjectionCallouts.cpp @@ -42,7 +42,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_FastStreamInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_FastStreamInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp index 179a7ac0..f1c7f905 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_FlowAssociationCallouts.cpp @@ -39,7 +39,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_FlowAssociationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_FlowAssociationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ NTSTATUS PerformFlowAssociation(_In_ const FWPS_INCOMING_METADATA_VALUES* pMetadata, _In_ const PC_FLOW_ASSOCIATION_DATA* pFlowAssociationData) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp index f4f23eba..b3f3ba15 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendAuthorizationCallouts.cpp @@ -47,7 +47,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_PendAuthorizationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_PendAuthorizationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvCloneAuthorizedNBLAndInject" diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp index 315dde6c..d8d88721 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_PendEndpointClosureCallouts.cpp @@ -44,7 +44,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_PendEndpointClosureCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_PendEndpointClosureCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp index d6b2b4d4..f0cc853c 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_ProxyCallouts.cpp @@ -58,7 +58,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "ClassifyFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "ClassifyFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PerformProxyInjectionAtInboundNetwork" diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp index 7348cb8d..cccaf200 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_AdvancedPacketInjectionCallouts.cpp @@ -52,7 +52,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "CompletionFunctions_AdvancedPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "CompletionFunctions_AdvancedPacketInjectionCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if DBG diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp index ef51c44b..cd240d4e 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicPacketModificationCallouts.cpp @@ -54,7 +54,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "CompletionFunctions_BasicPacketModificationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "CompletionFunctions_BasicPacketModificationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="BasicPacketModificationCompletionDataDestroy" diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp index 34dcc81d..7b074c5c 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_BasicStreamInjectionCallouts.cpp @@ -138,8 +138,6 @@ VOID NTAPI CompleteBasicStreamInjection(_In_ VOID* pContext, NT_ASSERT(pContext); NT_ASSERT(pNetBufferList); - NT_ASSERT(NT_SUCCESS(pNetBufferList->Status) || - pNetBufferList->Status == STATUS_CONNECTION_ABORTED); if(pNetBufferList->Status != STATUS_SUCCESS) DbgPrintEx(DPFLTR_IHVNETWORK_ID, diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp index 8dec0b9a..9437f586 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_FastStreamInjectionCallouts.cpp @@ -60,8 +60,6 @@ VOID NTAPI CompleteFastStreamInjection(_In_ VOID* pContext, UNREFERENCED_PARAMETER(pContext); UNREFERENCED_PARAMETER(dispatchLevel); - NT_ASSERT(NT_SUCCESS(pNetBufferList->Status)); - FwpsFreeCloneNetBufferList(pNetBufferList, 0); diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp index e48a9ef8..7dd07b78 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_PendAuthorizationCallouts.cpp @@ -53,7 +53,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "CompletionFunctions_PendAuthorizationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "CompletionFunctions_PendAuthorizationCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PendAuthorizationCompletionDataDestroy" diff --git a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp index ec47380e..d7527901 100644 --- a/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/CompletionFunctions_ProxyCallouts.cpp @@ -53,7 +53,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "CompletionFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "CompletionFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="ProxyCompletionDataDestroy" diff --git a/network/trans/WFPSampler/sys/Framework_Events.cpp b/network/trans/WFPSampler/sys/Framework_Events.cpp index baf59cc8..8f8001cc 100644 --- a/network/trans/WFPSampler/sys/Framework_Events.cpp +++ b/network/trans/WFPSampler/sys/Framework_Events.cpp @@ -20,7 +20,7 @@ #include "Framework_WFPSamplerCalloutDriver.h" /// . #include "Framework_Include.h" /// . -#include "Framework_Events.tmh" /// $(OBJ_PATH)\$(O)\ +#include "Framework_Events.tmh" /// $(OBJ_PATH)\$(O)\ /** @framework_function="EventDriverUnload" diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp index 18c93824..badbe806 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_AdvancedCallouts.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_AdvancedCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_AdvancedCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvAdvancedNotificationWorkItemRoutine" diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp index 6b86daaf..3893d7d1 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_BasicCallouts.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_BasicCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_BasicCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvBasicNotificationWorkItemRoutine" diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp index 92011dfc..e7addba7 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FastCallouts.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_FastCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_FastCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvFastNotificationWorkItemRoutine" diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp index bf1506ce..ab320f62 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_FlowDelete.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_FlowDelete.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_FlowDelete.tmh" /// $(OBJ_PATH)\$(O)\ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp index e8b1fd63..1cc2913f 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_PendCallouts.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_PendCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_PendCallouts.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_function="PrvPendNotificationWorkItemRoutine" diff --git a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp index 5102b78d..b11d8569 100644 --- a/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp +++ b/network/trans/WFPSampler/sys/NotifyFunctions_ProxyCallouts.cpp @@ -35,7 +35,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "NotifyFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ +#include "NotifyFunctions_ProxyCallouts.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) diff --git a/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp b/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp index 8c141627..52e0b36b 100644 --- a/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp +++ b/network/trans/WFPSampler/sys/SubscriptionFunctions_BFEState.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "Framework_WFPSamplerCalloutDriver.h" /// . -#include "SubscriptionFunctions_BFEState.tmh" /// $(OBJ_PATH)\$(O)\ +#include "SubscriptionFunctions_BFEState.tmh" /// $(OBJ_PATH)\$(O)\ /** @notify_function="SubscriptionBFEStateChangeCallback" diff --git a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX Binary files differindex fdd4f950..c6aad050 100644 --- a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX +++ b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX diff --git a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj index 672d5a8f..af141891 100644 --- a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj +++ b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,9 +22,9 @@ <ProjectGuid>{909C6B51-0D92-440A-9FEB-B7A2715D8EDE}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> - <KMDF_VERSION_MINOR>11</KMDF_VERSION_MINOR> + <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{0AEE6AAB-0332-4F13-9D87-16C8FE0B32F8}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -36,23 +36,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -67,13 +67,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -108,13 +108,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>WFPSamplerCalloutDriver</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>WFPSamplerCalloutDriver</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>WFPSamplerCalloutDriver</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>WFPSamplerCalloutDriver</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -122,75 +122,75 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;$(SDK_LIB_PATH)\UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;$(SDK_LIB_PATH)\UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;$(SDK_LIB_PATH)\UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32_LEAN_AND_MEAN;UNICODE;_UNICODE;NDIS630</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.\..\syslib;$(DDK_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;$(SDK_LIB_PATH)\UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(DDK_LIB_PATH)\WDMSec.lib;UUID.lib;.\..\syslib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemGroup> @@ -204,8 +204,14 @@ <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> + <Link> + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> + </Link> + <Link> + <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling> </ExceptionHandling> @@ -213,8 +219,14 @@ <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> + <Link> + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> + </Link> + <Link> + <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling> </ExceptionHandling> @@ -222,8 +234,14 @@ <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> + <Link> + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> + </Link> + <Link> + <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling> </ExceptionHandling> @@ -231,6 +249,12 @@ <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> + <Link> + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> + </Link> + <Link> + <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + </Link> </ItemDefinitionGroup> <ItemGroup> <ResourceCompile Include="Framework_WFPSamplerCalloutDriver.rc" /> diff --git a/network/trans/WFPSampler/sys/Wfp_Annotations.h b/network/trans/WFPSampler/sys/Wfp_Annotations.h new file mode 100644 index 00000000..3bfd56c6 --- /dev/null +++ b/network/trans/WFPSampler/sys/Wfp_Annotations.h @@ -0,0 +1,213 @@ +#pragma once +/*****************************************************************************\ +* * +* DriverSpecs.h - markers for documenting the semantics of WFP callout driver * +* APIs * +* * +* Version 1.0.0 * +* * +* Copyright (c) Microsoft Corporation. All rights reserved. * +* * +\*****************************************************************************/ + +/*****************************************************************************\ +* NOTE * +* NOTE * +* NOTE * +* The macro bodies in this file are subject to change without notice. * +* Attempting to use the annotations in the macro bodies directly is not * +* supported. * +* NOTE * +* NOTE * +* NOTE * +\*****************************************************************************/ + +/*****************************************************************************\ +* The annotations described by wfp_annotations.h are used to annotate drivers. +* +* Wfp_annotations.h contains those annotations which are appropriate to userspace +* code, or which might appear in headers that are shared between user space +* and kernel space. +* +* Many annotations are context dependent. They only apply to certain versions +* of Windows, or only to certain classes of driver. These rules can be written +* using something like __drv_when(NTDDI_VERSION >= NTDDI_WINXP, ...) +* which causes the rule only to apply to Windows XP and later. Many of these +* symbols are already defined in various Windows headers. +* +* To facilitate using this sort of conditional rule, we collect here the +* various known symbols that are (or reasonably might) be used in such +* a conditional annotation. Some are speculative in that the symbol has +* not yet been defined because there are no known uses of it yet. +// @@BEGIN_DDKSPLIT +* It is expected that the first user of that symbol will add it to the +* appropriate system header AND update this comment to reflect that. +* Adding additional similar comments is encouraged. +// @@END_DDKSPLIT +* +* Where the symbol already exists its relevant header is +* noted below (excluding the "really well known" ones). +* +* Each symbol is listed with the currently known possible values. +* +* Some symbols are marked as #define symbols -- they are used with #ifdef +* operators only. To use them in __drv_when, use something like +* __drv_when(__drv_defined(NT), ...). +* +* WDK Version (copied for convenience from sdkddkver.h) +* NTDDI_VERSION: NTDDI_WIN2K NTDDI_WIN2KSP1 NTDDI_WIN2KSP2 NTDDI_WIN2KSP3 +* NTDDI_WIN2KSP4 NTDDI_WINXP NTDDI_WINXPSP1 NTDDI_WINXPSP2 +* NTDDI_WS03 NTDDI_WS03SP1 NTDDI_VISTA +* The WDK version is taken as the WDM version as well. +* +* OS Version: (copied for convenience from sdkddkver.h) +* _WIN32_WINNT: _WIN32_WINNT_NT4 _WIN32_WINNT_WIN2K _WIN32_WINNT_WINXP +* _WIN32_WINNT_WS03 _WIN32_WINNT_LONGHORN +* WINVER: 0x030B 0x0400 0x0500 0x0600 +* NT (#define symbol) +* (sdkddkver.h also defines symbols for IE versions should they be needed.) +* +* Compiler Version: +* _MSC_VER: too many to list. +* _MSC_FULL_VER: too many to list. +* +* KMDF Version: (Currently defined/used only in makefiles.) +* KMDF_VERSION: 1 +* +* UMDF Version: (Currently defined/used only in makefiles.) +* UMDF_VERSION: 1 +* +* Architecture kinds: +* __WIN64 (#define symbols) +* _X86_ +* _AMD64_ +* _IA64_ +* +* Machine Architectures: +* _M_IX86 +* _M_AMD64 +* _M_IA64 +* +* Driver Kind (NYI: "not yet implemented") +* Typically these will be defined in the most-common header for a +* particular driver (or in individual source files if appropriate). +* These are not intended to necessarily be orthogonal: more than one might +* apply to a particular driver. +* _DRIVER_TYPE_BUS: 1 // NYI +* _DRIVER_TYPE_FUNCTIONAL: 1 // NYI +* _DRIVER_TYPE_MINIPORT: 1 // NYI +* _DRIVER_TYPE_STORAGE: 1 // NYI +* _DRIVER_TYPE_DISPLAY: 1 // NYI +* _DRIVER_TYPE_FILESYSTEM: 1 +* _DRIVER_TYPE_FILESYSTEM_FILTER: 1 +* +* NDIS driver version: (see ndis.h for much more detail.) +* These can be used to both identify an NDIS driver and to check the version. +* NDIS40 NDIS50 NDIS51 NDIS60 (#defined symbols) +* NDIS_PROTOCOL_MAJOR_VERSION.NDIS_PROTOCOL_MINOR_VERSION: 4.0 5.0 5.1 6.0 +* And many others in ndis.h (including MINIPORT) +* +\*****************************************************************************/ + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define _Wfp_Annotation_ __declspec("_Wfp_Annotation_") +#define _Wfp_stream_injection_classify_ __declspec("_Wfp_stream_injection_classify_") +#define _Wfp_stream_inspection_classify_ __declspec("_Wfp_stream_inspection_classify_") +#define _Wfp_stream_inspection_notify_ __declspec("_Wfp_stream_inspection_notify_") +#define _Wfp_flow_inspection_notify_ __declspec("_Wfp_flow_inspection_notify_") +#define _Wfp_flow_inspection_classify_ __declspec("_Wfp_flow_inspection_classify_") +#define _Wfp_flow_injection_classify_ __declspec("_Wfp_flow_injection_classify_") +#define _Wfp_Transport_inspection_classify_ __declspec("_Wfp_Transport_inspection_classify_") +#define _Wfp_transport_injection_classify_ __declspec("_Wfp_transport_injection_classify_") +#define _Wfp_transport_injection_classify_inline_ __declspec("_Wfp_transport_injection_classify_inline_") +#define _Wfp_ale_inspection_notify_ __declspec("_Wfp_ale_inspection_notify_") +#define _Wfp_ale_inspection_classify_ __declspec("_Wfp_ale_inspection_classify_") +#define _Wfp_connect_redirect_inline_classify_ __declspec("_Wfp_connect_redirect_inline_classify_") +#define _Wfp_connect_redirect_classify_ __declspec("_Wfp_connect_redirect_classify_") +// +// +// +//#define __drv_declspec(x) __declspec(x) +//#define __$drv_group(annotes) \ +// __drv_declspec("SAL_begin") annotes __drv_declspec("SAL_end") +//#define __drv_nop(x) x +// +// /****************************************************************************\ +// Callout Classify Annotions +// /****************************************************************************/ +// +// //_Wfp_Annotation_ +// __ANNOTATION(SAL_wfpAnnotation(void);) +//#define _Wfp_Annotation_ \ +// _SAL2_Source_(_Wfp_Annotation_, (), _Post_ _SA_annotes0(SAL_wfpAnnotation)) +// +//// Stream Injection +// __ANNOTATION(SAL_wfpStreamInjection(void);) +//#define _Wfp_stream_injection_classify_ \ +// _SAL2_Source_(_Wfp_stream_injection_classify_, (), _Post_ _SA_annotes0(SAL_wfpStreamInjection)) +// +//// Stream Inspection +// __ANNOTATION(SAL_wfpStreamInspection(void);) +//#define _Wfp_stream_inspection_classify_ \ +// _SAL2_Source_(_Wfp_stream_inspection_classify_, (), _Post_ _SA_annotes0(SAL_wfpStreamInspection)) +// +//__ANNOTATION(SAL_wfpStreamInspectionNotify(void);) +//#define _Wfp_stream_inspection_notify_ \ +// _SAL2_Source_(_Wfp_stream_inspection_notify_, (), _Post_ _SA_annotes0(SAL_wfpStreamInspectionNotify)) +// +//// Flow Inspections +//__ANNOTATION(SAL_wfpFlowInspectionNotify(void);) +//#define _Wfp_flow_inspection_notify_ \ +// _SAL2_Source_(_Wfp_flow_inspection_notify_, (), _Post_ _SA_annotes0(SAL_wfpFlowInspectionNotify)) +// +//__ANNOTATION(SAL_wfpFlowInspectionClassify(void);) +//#define _Wfp_flow_inspection_classify_ \ +// _SAL2_Source_(_Wfp_flow_inspection_classify_, (), _Post_ _SA_annotes0(SAL_wfpFlowInspectionClassify)) +// +//__ANNOTATION(SAL_wfpFlowInjectionClassify(void);) +//#define _Wfp_flow_injection_classify_ \ +// _SAL2_Source_(_Wfp_flow_injection_classify_, (), _Post_ _SA_annotes0(SAL_wfpFlowInjectionClassify)) +// +//// Transport Injection/Inspection +// +//__ANNOTATION(SAL_wfpTransportInspection(void);) +//#define _Wfp_Transport_inspection_classify_ \ +// _SAL2_Source_(_Wfp_Transport_inspection_classify_, (), _Post_ _SA_annotes0(SAL_wfpTransportInspection)) \ +// +//__ANNOTATION(SAL_wfpTransportInjection(void);) +//#define _Wfp_transport_injection_classify_ \ +// _SAL2_Source_(_Wfp_transport_injection_classify_, (), _Post_ _SA_annotes0(SAL_wfpTransportInjection)) \ +// +//__ANNOTATION(SAL_wfpTransportInjectionInline(void);) +//#define _Wfp_transport_injection_classify_inline_ \ +// _SAL2_Source_(_Wfp_transport_injection_classify_inline_, (), _Post_ _SA_annotes0(SAL_wfpTransportInjectionInline)) \ +// +// +// +//// ALE Inspection Notify and Classify +//__ANNOTATION(SAL_wfpAleInspectionNotify(void);) +//#define _Wfp_ale_inspection_notify_ \ +// _SAL2_Source_(_Wfp_ale_inspection_notify_, (), _Post_ _SA_annotes0(SAL_wfpAleInspectionNotify)) \ +// +//__ANNOTATION(SAL_wfpAleInspectionClassify(void);) +//#define _Wfp_ale_inspection_classify_ \ +// _SAL2_Source_(_Wfp_ale_inspection_classify_, (), _Post_ _SA_annotes0(SAL_wfpAleInspectionClassify)) \ +// +//// Connection Redirection Classify +//__ANNOTATION(SAL_wfpConnectRedirectInlineClassify(void);) +//#define _Wfp_connect_redirect_inline_classify_ \ +// _SAL2_Source_(_Wfp_connect_redirect_inline_classify_, (), _Post_ _SA_annotes0(SAL_wfpConnectRedirectInlineClassify)) \ +// +//__ANNOTATION(SAL_wfpConnectRedirectClassify(void);) +//#define _Wfp_connect_redirect_classify_ \ +// _SAL2_Source_(_Wfp_connect_redirect_classify_, (), _Post_ _SA_annotes0(SAL_wfpConnectRedirectClassify)) \ + +#ifdef __cplusplus +} +#endif + diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp index fa2d4103..8ee9072c 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.cpp @@ -67,7 +67,7 @@ INT64 g_OutstandingNBLReferences = 0; _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData) +VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData) { #if DBG @@ -179,7 +179,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppClassifyData == 0) -inline VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData) +VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.h b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.h index 6aa6e838..64f0090c 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_ClassifyData.h @@ -44,7 +44,7 @@ typedef struct CLASSIFY_DATA_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData); +VOID KrnlHlprClassifyDataReleaseLocalCopy(_Inout_ CLASSIFY_DATA* pClassifyData); _At_(*ppClassifyData, _Pre_ _Notnull_) _At_(*ppClassifyData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -52,7 +52,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppClassifyData == 0) -inline VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData); +VOID KrnlHlprClassifyDataDestroyLocalCopy(_Inout_ CLASSIFY_DATA** ppClassifyData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp index 071c43f4..ad486000 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.cpp @@ -70,7 +70,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPurge(_Inout_ DPC_DATA* pDPCData) +VOID KrnlHlprDPCDataPurge(_Inout_ DPC_DATA* pDPCData) { #if DBG @@ -111,7 +111,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppDPCData == 0) -inline VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData) +VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData) { #if DBG @@ -155,7 +155,7 @@ inline VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_opt_ INJECTION_DATA* pInjectionData, /* 0 */ _In_opt_ VOID* pContext) /* 0 */ @@ -198,7 +198,7 @@ inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_ PEND_DATA* pPendData, _In_opt_ VOID* pContext) /* 0 */ @@ -243,7 +243,7 @@ inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_ REDIRECT_DATA* pRedirectData, _In_opt_ VOID* pContext) /* 0 */ @@ -287,7 +287,7 @@ inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ NOTIFY_DATA* pNotifyData, _In_opt_ VOID* pContext) /* 0 */ { @@ -328,7 +328,7 @@ inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ PEND_DATA* pPendData, _In_opt_ VOID* pContext) /* 0 */ { diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h index 4de525e9..0d334e09 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_DeferredProcedureCalls.h @@ -44,7 +44,7 @@ typedef struct DPC_DATA_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPurge(_Inout_ DPC_DATA* pDPCData); +VOID KrnlHlprDPCDataPurge(_Inout_ DPC_DATA* pDPCData); _At_(*ppDPCData, _Pre_ _Notnull_) _At_(*ppDPCData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -52,39 +52,39 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppDPCData == 0) -inline VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData); +VOID KrnlHlprDPCDataDestroy(_Inout_ DPC_DATA** ppDPCData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_opt_ INJECTION_DATA* pInjectionData = 0, _In_opt_ VOID* pContext = 0); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_ PEND_DATA* pPendData, _In_opt_ VOID* pContext = 0); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ CLASSIFY_DATA* pClassifyData, _In_ REDIRECT_DATA* pRedirectData, _In_opt_ VOID** pContext = 0); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ NOTIFY_DATA* pNotifyData, _In_opt_ VOID* pContext = 0); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, +VOID KrnlHlprDPCDataPopulate(_Inout_ DPC_DATA* pDPCData, _In_ PEND_DATA* pPendData, _In_opt_ VOID* pContext = 0); diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp index b6d561d6..e53a5e33 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.cpp @@ -42,7 +42,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_FlowContext.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_FlowContext.tmh" /// $(OBJ_PATH)\$(O)\ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -105,7 +105,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(return == STATUS_SUCCESS && *ppFlowContext == 0) -inline NTSTATUS KrnlHlprFlowContextDestroy(_Inout_ FLOW_CONTEXT** ppFlowContext) +NTSTATUS KrnlHlprFlowContextDestroy(_Inout_ FLOW_CONTEXT** ppFlowContext) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.h b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.h index 72689de5..6e180e7a 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FlowContext.h @@ -113,7 +113,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(return == STATUS_SUCCESS && *ppFlowContext == 0) -inline NTSTATUS KrnlHlprFlowContextDestroy(_Inout_ FLOW_CONTEXT** ppFlowContext); +NTSTATUS KrnlHlprFlowContextDestroy(_Inout_ FLOW_CONTEXT** ppFlowContext); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp index cc9a0646..0b753a57 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.cpp @@ -74,7 +74,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_FwpObjects.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_FwpObjects.tmh" /// $(OBJ_PATH)\$(O)\ HANDLE g_EngineHandle = 0; HANDLE g_pIPv4InboundMACInjectionHandles[2] = {0}; @@ -132,7 +132,7 @@ HANDLE g_pRedirectionHandles[2] = {0}; _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob) +VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob) { #if DBG @@ -173,7 +173,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppBlob == 0) -inline VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob) +VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob) { #if DBG @@ -352,7 +352,7 @@ FWP_BYTE_BLOB* KrnlHlprFwpByteBlobCreateLocalCopy(_In_ const FWP_BYTE_BLOB* pOri _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData) +VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData) { #if DBG @@ -396,7 +396,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppDisplayData == 0) -inline VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDisplayData) +VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDisplayData) { #if DBG @@ -630,7 +630,7 @@ FWPM_DISPLAY_DATA* KrnlHlprFwpmDisplayDataCreateLocalCopy(_In_ const FWPM_DISPLA _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOption) +VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOption) { #if DBG @@ -672,7 +672,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOption == 0) -inline VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** ppOption) +VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** ppOption) { #if DBG @@ -845,7 +845,7 @@ FWPM_CLASSIFY_OPTION* KrnlHlprFwpmClassifyOptionCreateLocalCopy(_In_ const FWPM_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pOptions) +VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pOptions) { #if DBG @@ -890,7 +890,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOptions == 0) -inline VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** ppOptions) +VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** ppOptions) { #if DBG @@ -1075,7 +1075,7 @@ FWPM_CLASSIFY_OPTIONS* KrnlHlprFwpmClassifyOptionsCreateLocalCopy(_In_ const FWP _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions) +VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions) { #if DBG @@ -1119,7 +1119,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOptions == 0) -inline VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOptions) +VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOptions) { #if DBG @@ -1311,7 +1311,7 @@ IPSEC_DOSP_OPTIONS* KrnlHlprIPsecDoSPOptionsCreateLocalCopy(_In_ const IPSEC_DOS _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pTokenInfo) +VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pTokenInfo) { #if DBG @@ -1371,7 +1371,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppTokenInfo == 0) -inline VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** ppTokenInfo) +VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** ppTokenInfo) { #if DBG @@ -4389,7 +4389,7 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue) +VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue) { #if DBG @@ -4516,7 +4516,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValue == 0) -inline VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue) +VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue) { #if DBG @@ -4849,7 +4849,7 @@ FWP_VALUE* KrnlHlprFwpValueCreateLocalCopy(_In_ const FWP_VALUE* pOriginalValue) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask) +VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask) { #if DBG @@ -4890,7 +4890,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppAddrMask == 0) -inline VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppAddrMask) +VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppAddrMask) { #if DBG @@ -5050,7 +5050,7 @@ FWP_V4_ADDR_AND_MASK* KrnlHlprFwpV4AddrAndMaskCreateLocalCopy(_In_ const FWP_V4_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask) +VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask) { #if DBG @@ -5091,7 +5091,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppAddrMask == 0) -inline VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask) +VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask) { #if DBG @@ -5254,7 +5254,7 @@ FWP_V6_ADDR_AND_MASK* KrnlHlprFwpV6AddrAndMaskCreateLocalCopy(_In_ const FWP_V6_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange) +VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange) { #if DBG @@ -5296,7 +5296,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppRange == 0) -inline VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange) +VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange) { #if DBG @@ -5471,7 +5471,7 @@ FWP_RANGE* KrnlHlprFwpRangeCreateLocalCopy(_In_ const FWP_RANGE* pOriginalRange) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue) +VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue) { #if DBG @@ -5624,7 +5624,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValue == 0) -inline VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppValue) +VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppValue) { #if DBG @@ -6040,7 +6040,7 @@ BOOLEAN KrnlHlprFwpsIncomingValueConditionFlagsAreSet(_In_ const FWPS_INCOMING_V _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pValues) +VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pValues) { #if DBG @@ -6088,7 +6088,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValues == 0) -inline VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** ppValues) +VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** ppValues) { #if DBG @@ -6269,7 +6269,7 @@ FWPS_INCOMING_VALUES* KrnlHlprFwpsIncomingValuesCreateLocalCopy(_In_ const FWPS_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata) +VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata) { #if DBG @@ -6331,7 +6331,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppMetadata == 0) -inline VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES** ppMetadata) +VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES** ppMetadata) { #if DBG @@ -6713,7 +6713,7 @@ FWPS_INCOMING_METADATA_VALUES* KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalClassifyOut) +VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalClassifyOut) { #if DBG @@ -6796,7 +6796,7 @@ VOID KrnlHlprFwpsClassifyOutDestroyLocalCopy(_Inout_ FWPS_CLASSIFY_OUT** ppClass _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsClassifyOutPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOriginalClassifyOut, +VOID KrnlHlprFwpsClassifyOutPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOriginalClassifyOut, _Inout_ FWPS_CLASSIFY_OUT* pClassifyOut) { #if DBG @@ -6902,7 +6902,7 @@ FWPS_CLASSIFY_OUT* KrnlHlprFwpsClassifyOutCreateLocalCopy(_In_ const FWPS_CLASSI _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData) +VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData) { #if DBG @@ -6956,7 +6956,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppStreamData == 0) -inline VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamData) +VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamData) { #if DBG @@ -7126,7 +7126,7 @@ FWPS_STREAM_DATA* KrnlHlprFwpsStreamDataCreateLocalCopy(_In_ const FWPS_STREAM_D _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket) +VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket) { #if DBG @@ -7169,7 +7169,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppIOPacket == 0) -inline VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET** ppIOPacket) +VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET** ppIOPacket) { #if DBG @@ -7341,7 +7341,7 @@ FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy( _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pContext) +VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pContext) { #if DBG @@ -7461,7 +7461,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppContext == 0) -inline VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** ppContext) +VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** ppContext) { #if DBG @@ -7721,7 +7721,7 @@ FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWP _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pCondition) +VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pCondition) { #if DBG @@ -7766,7 +7766,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppConditions == 0) -inline VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** ppConditions, +VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** ppConditions, _In_ UINT32 numConditions) /* 1 */ { #if DBG @@ -7949,7 +7949,7 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter) +VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter) { #if DBG @@ -7996,7 +7996,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppFilter == 0) -inline VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter) +VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h index 39f69f54..0e6f0eb8 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_FwpObjects.h @@ -75,7 +75,7 @@ extern HANDLE g_pRedirectionHandles[2]; _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob); +VOID KrnlHlprFwpByteBlobPurgeLocalCopy(_Inout_ FWP_BYTE_BLOB* pBlob); _At_(*ppBlob, _Pre_ _Notnull_) _At_(*ppBlob, _Post_ _Null_ __drv_freesMem(Pool)) @@ -83,7 +83,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppBlob == 0) -inline VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob); +VOID KrnlHlprFwpByteBlobDestroyLocalCopy(_Inout_ FWP_BYTE_BLOB** ppBlob); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -104,7 +104,7 @@ FWP_BYTE_BLOB* KrnlHlprFwpByteBlobCreateLocalCopy(_In_ const FWP_BYTE_BLOB* pOri _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData); +VOID KrnlHlprFwpmDisplayDataPurgeLocalCopy(_Inout_ FWPM_DISPLAY_DATA* pData); _At_(*ppDisplayData, _Pre_ _Notnull_) _At_(*ppDisplayData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -112,7 +112,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppDisplayData == 0) -inline VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDisplayData); +VOID KrnlHlprFwpmDisplayDataDestroyLocalCopy(_Inout_ FWPM_DISPLAY_DATA** ppDisplayData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -134,7 +134,7 @@ FWPM_DISPLAY_DATA* KrnlHlprFwpmDisplayDataCreateLocalCopy(_In_ const FWPM_DISPLA _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOption); +VOID KrnlHlprFwpmClassifyOptionPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION* pOption); _At_(*ppOption, _Pre_ _Notnull_) _At_(*ppOption, _Post_ _Null_ __drv_freesMem(Pool)) @@ -142,7 +142,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOption == 0) -inline VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** ppOption); +VOID KrnlHlprFwpmClassifyOptionDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTION** ppOption); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -163,7 +163,7 @@ FWPM_CLASSIFY_OPTION* KrnlHlprFwpmClassifyOptionCreateLocalCopy(_In_ const FWPM_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pOptions); +VOID KrnlHlprFwpmClassifyOptionsPurgeLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS* pOptions); _At_(*ppOptions, _Pre_ _Notnull_) _At_(*ppOptions, _Post_ _Null_ __drv_freesMem(Pool)) @@ -171,7 +171,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOptions == 0) -inline VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** ppOptions); +VOID KrnlHlprFwpmClassifyOptionsDestroyLocalCopy(_Inout_ FWPM_CLASSIFY_OPTIONS** ppOptions); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -194,7 +194,7 @@ FWPM_CLASSIFY_OPTIONS* KrnlHlprFwpmClassifyOptionsCreateLocalCopy(_In_ const FWP _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions); +VOID KrnlHlprIPsecDoSPOptionsPurgeLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS* pOptions); _At_(*ppOptions, _Pre_ _Notnull_) _At_(*ppOptions, _Post_ _Null_ __drv_freesMem(Pool)) @@ -202,7 +202,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppOptions == 0) -inline VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOptions); +VOID KrnlHlprIPsecDoSPOptionsDestroyLocalCopy(_Inout_ IPSEC_DOSP_OPTIONS** ppOptions); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -225,7 +225,7 @@ IPSEC_DOSP_OPTIONS* KrnlHlprIPsecDoSPOptionsCreateLocalCopy(_In_ const IPSEC_DOS _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pTokenInfo); +VOID KrnlHlprFwpTokenInformationPurgeLocalCopy(_Inout_ FWP_TOKEN_INFORMATION* pTokenInfo); _At_(*ppTokenInfo, _Pre_ _Notnull_) _At_(*ppTokenInfo, _Post_ _Null_ __drv_freesMem(Pool)) @@ -233,7 +233,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppTokenInfo == 0) -inline VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** ppTokenInfo); +VOID KrnlHlprFwpTokenInformationDestroyLocalCopy(_Inout_ FWP_TOKEN_INFORMATION** ppTokenInfo); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -270,7 +270,7 @@ FWP_VALUE* KrnlHlprFwpValueGetFromFwpsIncomingValues(_In_ const FWPS_INCOMING_VA _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue); +VOID KrnlHlprFwpValuePurgeLocalCopy(_Inout_ FWP_VALUE* pValue); _At_(*ppValue, _Pre_ _Notnull_) _At_(*ppValue, _Post_ _Null_ __drv_freesMem(Pool)) @@ -278,7 +278,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValue == 0) -inline VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue); +VOID KrnlHlprFwpValueDestroyLocalCopy(_Inout_ FWP_VALUE** ppValue); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -299,7 +299,7 @@ FWP_VALUE* KrnlHlprFwpValueCreateLocalCopy(_In_ const FWP_VALUE* pOriginalValue) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask); +VOID KrnlHlprFwpV4AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK* pAddrMask); _At_(*ppAddrMask, _Pre_ _Notnull_) _At_(*ppAddrMask, _Post_ _Null_ __drv_freesMem(Pool)) @@ -307,7 +307,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppAddrMask == 0) -inline VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppAddrMask); +VOID KrnlHlprFwpV4AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V4_ADDR_AND_MASK** ppAddrMask); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -328,7 +328,7 @@ FWP_V4_ADDR_AND_MASK* KrnlHlprFwpV4AddrAndMaskCreateLocalCopy(_In_ const FWP_V4_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask); +VOID KrnlHlprFwpV6AddrAndMaskPurgeLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK* pAddrMask); _At_(*ppAddrMask, _Pre_ _Notnull_) _At_(*ppAddrMask, _Post_ _Null_ __drv_freesMem(Pool)) @@ -336,7 +336,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppAddrMask == 0) -inline VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask); +VOID KrnlHlprFwpV6AddrAndMaskDestroyLocalCopy(_Inout_ FWP_V6_ADDR_AND_MASK** ppAddrMask); __drv_allocatesMem(Pool) _IRQL_requires_min_(PASSIVE_LEVEL) @@ -359,7 +359,7 @@ FWP_V6_ADDR_AND_MASK* KrnlHlprFwpV6AddrAndMaskCreateLocalCopy(_In_ const FWP_V6_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange); +VOID KrnlHlprFwpRangePurgeLocalCopy(_Inout_ FWP_RANGE* pRange); _At_(*ppRange, _Pre_ _Notnull_) _At_(*ppRange, _Post_ _Null_ __drv_freesMem(Pool)) @@ -367,7 +367,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppRange == 0) -inline VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange); +VOID KrnlHlprFwpRangeDestroyLocalCopy(_Inout_ FWP_RANGE** ppRange); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -388,7 +388,7 @@ FWP_RANGE* KrnlHlprFwpRangeCreateLocalCopy(_In_ const FWP_RANGE* pOriginalRange) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue); +VOID KrnlHlprFwpConditionValuePurgeLocalCopy(_Inout_ FWP_CONDITION_VALUE* pValue); _At_(*ppValue, _Pre_ _Notnull_) _At_(*ppValue, _Post_ _Null_ __drv_freesMem(Pool)) @@ -396,7 +396,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValue == 0) -inline VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppValue); +VOID KrnlHlprFwpConditionValueDestroyLocalCopy(_Inout_ FWP_CONDITION_VALUE** ppValue); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -424,7 +424,7 @@ BOOLEAN KrnlHlprFwpsIncomingValueConditionFlagsAreSet(_In_ const FWPS_INCOMING_V _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pOriginalValues); +VOID KrnlHlprFwpsIncomingValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_VALUES* pOriginalValues); _At_(*ppValues, _Pre_ _Notnull_) _At_(*ppValues, _Post_ _Null_ __drv_freesMem(Pool)) @@ -432,7 +432,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppValues == 0) -inline VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** ppValues); +VOID KrnlHlprFwpsIncomingValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_VALUES** ppValues); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -453,7 +453,7 @@ FWPS_INCOMING_VALUES* KrnlHlprFwpsIncomingValuesCreateLocalCopy(_In_ const FWPS_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata); +VOID KrnlHlprFwpsIncomingMetadataValuesPurgeLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES* pMetadata); _At_(*ppMetadata, _Pre_ _Notnull_) _At_(*ppMetadata, _Post_ _Null_ __drv_freesMem(Pool)) @@ -461,7 +461,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppMetadata == 0) -inline VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES** ppMetadata); +VOID KrnlHlprFwpsIncomingMetadataValuesDestroyLocalCopy(_Inout_ FWPS_INCOMING_METADATA_VALUES** ppMetadata); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -483,7 +483,7 @@ FWPS_INCOMING_METADATA_VALUES* KrnlHlprFwpsIncomingMetadataValuesCreateLocalCopy _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalClassifyOut); +VOID KrnlHlprFwpsClassifyOutPurgeLocalCopy(_Inout_ FWPS_CLASSIFY_OUT* pOriginalClassifyOut); _At_(*ppClassifyOut, _Pre_ _Notnull_) _At_(*ppClassifyOut, _Post_ _Null_ __drv_freesMem(Pool)) @@ -496,7 +496,7 @@ VOID KrnlHlprFwpsClassifyOutDestroyLocalCopy(_Inout_ FWPS_CLASSIFY_OUT** ppClass _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsIncomingValuesPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOriginalClassifyOut, +VOID KrnlHlprFwpsIncomingValuesPopulateLocalCopy(_In_ const FWPS_CLASSIFY_OUT* pOriginalClassifyOut, _Inout_ FWPS_CLASSIFY_OUT* pClassifyOut); __drv_allocatesMem(Pool) @@ -511,7 +511,7 @@ FWPS_CLASSIFY_OUT* KrnlHlprFwpsClassifyOutCreateLocalCopy(_In_ const FWPS_CLASSI _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData); +VOID KrnlHlprFwpsStreamDataPurgeLocalCopy(_Inout_ FWPS_STREAM_DATA* pStreamData); _At_(*ppStreamData, _Pre_ _Notnull_) _At_(*ppStreamData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -519,7 +519,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppStreamData == 0) -inline VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamData); +VOID KrnlHlprFwpsStreamDataDestroyLocalCopy(_Inout_ FWPS_STREAM_DATA** ppStreamData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -540,7 +540,7 @@ FWPS_STREAM_DATA* KrnlHlprFwpsStreamDataCreateLocalCopy(_In_ const FWPS_STREAM_D _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket); + VOID KrnlHlprFwpsStreamCalloutIOPacketPurgeLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET* pIOPacket); _At_(*ppIOPacket, _Pre_ _Notnull_) _At_(*ppIOPacket, _Post_ _Null_ __drv_freesMem(Pool)) @@ -548,7 +548,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppIOPacket == 0) -inline VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET** ppIOPacket); +VOID KrnlHlprFwpsStreamCalloutIOPacketDestroyLocalCopy(_Inout_ FWPS_STREAM_CALLOUT_IO_PACKET** ppIOPacket); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) @@ -569,7 +569,7 @@ FWPS_STREAM_CALLOUT_IO_PACKET* KrnlHlprFwpsStreamCalloutIOPacketCreateLocalCopy( _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pContext); +VOID KrnlHlprFwpmProviderContextPurgeLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT* pContext); _At_(*ppContext, _Pre_ _Notnull_) _At_(*ppContext, _Post_ _Null_ __drv_freesMem(Pool)) @@ -577,7 +577,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppContext == 0) -inline VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** ppContext); +VOID KrnlHlprFwpmProviderContextDestroyLocalCopy(_Inout_ FWPM_PROVIDER_CONTEXT** ppContext); __drv_allocatesMem(Pool) _IRQL_requires_min_(PASSIVE_LEVEL) @@ -599,7 +599,7 @@ FWPM_PROVIDER_CONTEXT* KrnlHlprFwpmProviderContextCreateLocalCopy(_In_ const FWP _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pCondition); +VOID KrnlHlprFwpsFilterConditionPurgeLocalCopy(_Inout_ FWPS_FILTER_CONDITION* pCondition); _At_(*ppConditions, _Pre_ _Notnull_) _At_(*ppConditions, _Post_ _Null_ __drv_freesMem(Pool)) @@ -607,7 +607,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppConditions == 0) -inline VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** ppConditions, +VOID KrnlHlprFwpsFilterConditionDestroyLocalCopy(_Inout_ FWPS_FILTER_CONDITION** ppConditions, _In_ UINT32 numConditions = 1); _IRQL_requires_min_(PASSIVE_LEVEL) @@ -630,7 +630,7 @@ FWPS_FILTER_CONDITION* KrnlHlprFwpsFilterConditionCreateLocalCopy(_In_reads_(num _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter); +VOID KrnlHlprFwpsFilterPurgeLocalCopy(_Inout_ FWPS_FILTER* pFilter); _At_(*ppFilter, _Pre_ _Notnull_) _At_(*ppFilter, _Post_ _Null_ __drv_freesMem(Pool)) @@ -638,7 +638,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppFilter == 0) -inline VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter); +VOID KrnlHlprFwpsFilterDestroyLocalCopy(_Inout_ FWPS_FILTER** ppFilter); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp index 3e400890..f5bb66e3 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_Headers.cpp @@ -84,7 +84,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_Headers.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_Headers.tmh" /// $(OBJ_PATH)\$(O)\ /** @private_kernel_helper_function="PrvKrnlHlprCopyBufferToMDL" diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp index 663f7c60..64de129d 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.cpp @@ -71,7 +71,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData) +VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData) { #if DBG @@ -118,7 +118,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppInjectionData == 0) -inline VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData) +VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h index d3d5d795..9967c1e7 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_InjectionData.h @@ -49,7 +49,7 @@ typedef struct INJECTION_HANDLE_DATA_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData); +VOID KrnlHlprInjectionDataPurge(_Inout_ INJECTION_DATA* pInjectionData); _At_(*ppInjectionData, _Pre_ _Notnull_) _At_(*ppInjectionData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -57,7 +57,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppInjectionData == 0) -inline VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData); +VOID KrnlHlprInjectionDataDestroy(_Inout_ INJECTION_DATA** ppInjectionData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp index 2d6bd3c9..4338d787 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_NetBuffer.cpp @@ -49,7 +49,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_NetBuffer.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_NetBuffer.tmh" /// $(OBJ_PATH)\$(O)\ /** diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp index 1ad4338f..d8db09ee 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.cpp @@ -49,7 +49,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_PendData.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_PendData.tmh" /// $(OBJ_PATH)\$(O)\ /** @kernel_helper_function="KrnlHlprPendDataPurge" @@ -142,7 +142,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppPendData == 0) -inline VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData) +VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h index 17174e32..12e06b41 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_PendData.h @@ -51,7 +51,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppPendData == 0) -inline VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData); +VOID KrnlHlprPendDataDestroy(_Inout_ PEND_DATA** ppPendData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp index 2671e276..92cca4ba 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_RedirectData.cpp @@ -48,7 +48,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_RedirectData.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_RedirectData.tmh" /// $(OBJ_PATH)\$(O)\ #if(NTDDI_VERSION >= NTDDI_WIN7) @@ -132,7 +132,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppRedirectData == 0) -inline VOID KrnlHlprRedirectDataDestroy(_Inout_ REDIRECT_DATA** ppRedirectData) +VOID KrnlHlprRedirectDataDestroy(_Inout_ REDIRECT_DATA** ppRedirectData) { #if DBG diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp index 23f4a6df..7e4f8c16 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp +++ b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.cpp @@ -54,7 +54,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// #include "HelperFunctions_Include.h" /// . -#include "HelperFunctions_WorkItems.tmh" /// $(OBJ_PATH)\$(O)\ +#include "HelperFunctions_WorkItems.tmh" /// $(OBJ_PATH)\$(O)\ /** @kernel_helper_function="KrnlHlprWorkItemDataPurge" @@ -68,7 +68,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData) +VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData) { #if DBG @@ -112,7 +112,7 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppWorkItemData == 0) -inline VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData) +VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData) { #if DBG @@ -156,7 +156,7 @@ inline VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData) _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, +VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_opt_ INJECTION_DATA* pInjectionData, /* 0 */ _In_opt_ PIO_WORKITEM pIOWorkItem, /* 0 */ @@ -202,7 +202,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, +VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_ PEND_DATA* pPendData, _In_opt_ PIO_WORKITEM pIOWorkItem, /* 0 */ @@ -249,7 +249,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, +VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_ REDIRECT_DATA* pRedirectData, _In_opt_ PIO_WORKITEM pIOWorkItem, /* 0 */ @@ -296,7 +296,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, +VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ NOTIFY_DATA* pNotifyData, _In_opt_ PIO_WORKITEM pIOWorkItem, /* 0 */ _In_opt_ VOID* pContext) /* 0 */ @@ -340,7 +340,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, +VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ PEND_DATA* pPendData, _In_opt_ PIO_WORKITEM pIOWorkItem, /* 0 */ _In_opt_ VOID* pContext) /* 0 */ diff --git a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h index cbbc77bc..4d78844f 100644 --- a/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h +++ b/network/trans/WFPSampler/syslib/HelperFunctions_WorkItems.h @@ -44,7 +44,7 @@ typedef struct WORKITEM_DATA_ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData); + VOID KrnlHlprWorkItemDataPurge(_Inout_ WORKITEM_DATA* pWorkItemData); _At_(*ppWorkItemData, _Pre_ _Notnull_) _At_(*ppWorkItemData, _Post_ _Null_ __drv_freesMem(Pool)) @@ -52,12 +52,12 @@ _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ _Success_(*ppWorkItemData == 0) -inline VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData); +VOID KrnlHlprWorkItemDataDestroy(_Inout_ WORKITEM_DATA** ppWorkItemData); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, + VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_opt_ INJECTION_DATA* pInjectionData = 0, _In_opt_ PIO_WORKITEM pIOWorkItem = 0, @@ -65,7 +65,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, + VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_ PEND_DATA* pPendData, _In_opt_ PIO_WORKITEM pIOWorkItem = 0, @@ -73,7 +73,7 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, + VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ CLASSIFY_DATA* pClassifyData, _In_ REDIRECT_DATA* pRedirectData, _In_opt_ PIO_WORKITEM pIOWorkItem = 0, @@ -81,14 +81,14 @@ inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, + VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ NOTIFY_DATA* pNotifyData, _In_opt_ PIO_WORKITEM pIOWorkItem = 0, _In_opt_ VOID* pContext = 0); _IRQL_requires_min_(PASSIVE_LEVEL) _IRQL_requires_max_(DISPATCH_LEVEL) _IRQL_requires_same_ -inline VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, + VOID KrnlHlprWorkItemDataPopulate(_Inout_ WORKITEM_DATA* pWorkItemData, _In_ PEND_DATA* pPendData, _In_opt_ PIO_WORKITEM pIOWorkItem = 0, _In_opt_ VOID* pContext = 0); diff --git a/network/trans/WFPSampler/syslib/WFPSampler.vcxproj b/network/trans/WFPSampler/syslib/WFPSampler.vcxproj index dd6c1a42..cc19afc6 100644 --- a/network/trans/WFPSampler/syslib/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/syslib/WFPSampler.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,44 +22,48 @@ <ProjectGuid>{6F3E7DC1-C828-463C-BC9E-290B56D0F58C}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> - <KMDF_VERSION_MINOR>11</KMDF_VERSION_MINOR> + <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> <SupportsPackaging>false</SupportsPackaging> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{702C5BD2-236E-422B-83F1-B830DC4B94F0}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>False</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -68,13 +72,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -92,13 +96,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>WFPSampler</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -119,13 +123,12 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;$(DDK_INC_PATH);$(IFSKIT_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(SDK_LIB_PATH)\UUID.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -143,13 +146,12 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;$(DDK_INC_PATH);$(IFSKIT_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(SDK_LIB_PATH)\UUID.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -167,13 +169,12 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;$(DDK_INC_PATH);$(IFSKIT_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(SDK_LIB_PATH)\UUID.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -191,7 +192,6 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;$(DDK_INC_PATH);$(IFSKIT_INC_PATH)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\NTOSKrnl.lib;$(DDK_LIB_PATH)\FwpKClnt.lib;$(DDK_LIB_PATH)\NetIO.lib;$(DDK_LIB_PATH)\NDIS.lib;$(SDK_LIB_PATH)\UUID.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/trans/ddproxy/ddproxy.sln b/network/trans/ddproxy/ddproxy.sln index f5f56da8..1e9b096c 100644 --- a/network/trans/ddproxy/ddproxy.sln +++ b/network/trans/ddproxy/ddproxy.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ddproxy", "sys\ddproxy.vcxp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|Win32.Build.0 = Debug|Win32 - {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Release|Win32.ActiveCfg = Release|Win32 - {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Release|Win32.Build.0 = Release|Win32 + {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|ARM64.Build.0 = Debug|ARM64 + {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Release|ARM64.ActiveCfg = Release|ARM64 + {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Release|ARM64.Build.0 = Release|ARM64 {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|x64.ActiveCfg = Debug|x64 {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Debug|x64.Build.0 = Debug|x64 {FEABD37B-18D6-4A7B-9AD2-F5A65A904A57}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/trans/ddproxy/sys/DD_proxy.c b/network/trans/ddproxy/sys/DD_proxy.c index aa41f060..089c273c 100644 --- a/network/trans/ddproxy/sys/DD_proxy.c +++ b/network/trans/ddproxy/sys/DD_proxy.c @@ -103,8 +103,8 @@ DDProxyFlowEstablishedClassify( #endif /// (NTDDI_VERSION >= NTDDI_WIN7) UNREFERENCED_PARAMETER(flowContext); - flowContextLocal = ExAllocatePoolZero( - NonPagedPool, + flowContextLocal = ExAllocatePool2( + POOL_FLAG_NON_PAGED, sizeof(DD_PROXY_FLOW_CONTEXT), DD_PROXY_FLOW_CONTEXT_POOL_TAG ); @@ -333,8 +333,8 @@ DDProxyClassify( goto Exit; } - packet = ExAllocatePoolZero( - NonPagedPool, + packet = ExAllocatePool2( + POOL_FLAG_NON_PAGED, sizeof(DD_PROXY_PENDED_PACKET), DD_PROXY_PENDED_PACKET_POOL_TAG ); @@ -410,8 +410,8 @@ DDProxyClassify( { NT_ASSERT(inMetaValues->controlDataLength > 0); - packet->controlData = ExAllocatePoolZero( - NonPagedPool, + packet->controlData = ExAllocatePool2( + POOL_FLAG_NON_PAGED, inMetaValues->controlDataLength, DD_PROXY_CONTROL_DATA_POOL_TAG ); diff --git a/network/trans/ddproxy/sys/ddproxy.inf b/network/trans/ddproxy/sys/ddproxy.inf Binary files differindex 44c5d13e..be09889a 100644 --- a/network/trans/ddproxy/sys/ddproxy.inf +++ b/network/trans/ddproxy/sys/ddproxy.inf diff --git a/network/trans/ddproxy/sys/ddproxy.vcxproj b/network/trans/ddproxy/sys/ddproxy.vcxproj index db813981..235c74d1 100644 --- a/network/trans/ddproxy/sys/ddproxy.vcxproj +++ b/network/trans/ddproxy/sys/ddproxy.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -23,7 +23,7 @@ <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{6462DC10-B4DC-441C-8A08-D8E436A4566C}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -35,26 +35,26 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <UseDebugLibraries>True</UseDebugLibraries> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Universal</DriverTargetPlatform> + <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -66,26 +66,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>ddproxy</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>ddproxy</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>ddproxy</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>ddproxy</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -104,35 +104,35 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> @@ -148,29 +148,29 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/trans/inspect/inspect.sln b/network/trans/inspect/inspect.sln index 3f3ae438..ab24034f 100644 --- a/network/trans/inspect/inspect.sln +++ b/network/trans/inspect/inspect.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30114.105 @@ -7,18 +7,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inspect", "sys\inspect.vcxp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|Win32.ActiveCfg = Debug|x64 - {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|Win32.Build.0 = Debug|x64 + {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|ARM64.Build.0 = Debug|ARM64 + {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|ARM64.ActiveCfg = Release|ARM64 + {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|ARM64.Build.0 = Release|ARM64 {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|x64.ActiveCfg = Debug|x64 {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Debug|x64.Build.0 = Debug|x64 - {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|Win32.ActiveCfg = Release|Win32 - {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|Win32.Build.0 = Release|Win32 {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|x64.ActiveCfg = Release|x64 {5CF7CFC1-02B4-4938-AC5F-47D743D82E8A}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/network/trans/inspect/sys/inspect.inf b/network/trans/inspect/sys/inspect.inf Binary files differindex 644c4eee..1a1aa466 100644 --- a/network/trans/inspect/sys/inspect.inf +++ b/network/trans/inspect/sys/inspect.inf diff --git a/network/trans/inspect/sys/inspect.vcxproj b/network/trans/inspect/sys/inspect.vcxproj index bd73f3d7..bf65fa59 100644 --- a/network/trans/inspect/sys/inspect.vcxproj +++ b/network/trans/inspect/sys/inspect.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -35,23 +35,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -66,13 +66,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -82,13 +82,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>inspect</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>inspect</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>inspect</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>inspect</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -107,35 +107,35 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> @@ -151,29 +151,29 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/trans/inspect/sys/utils.c b/network/trans/inspect/sys/utils.c index f474704f..c1b85ae8 100644 --- a/network/trans/inspect/sys/utils.c +++ b/network/trans/inspect/sys/utils.c @@ -291,8 +291,8 @@ AllocateAndInitializePendedPacket( { TL_INSPECT_PENDED_PACKET* pendedPacket; - pendedPacket = ExAllocatePoolZero( - NonPagedPool, + pendedPacket = ExAllocatePool2( + POOL_FLAG_NON_PAGED, sizeof(TL_INSPECT_PENDED_PACKET), TL_INSPECT_PENDED_PACKET_POOL_TAG ); @@ -344,8 +344,8 @@ AllocateAndInitializePendedPacket( { NT_ASSERT(inMetaValues->controlDataLength > 0); - pendedPacket->controlData = ExAllocatePoolZero( - NonPagedPool, + pendedPacket->controlData = ExAllocatePool2( + POOL_FLAG_NON_PAGED, inMetaValues->controlDataLength, TL_INSPECT_CONTROL_DATA_POOL_TAG ); diff --git a/network/trans/msnmntr/exe/monitor.vcxproj b/network/trans/msnmntr/exe/monitor.vcxproj index 242045dd..a8b0bc45 100644 --- a/network/trans/msnmntr/exe/monitor.vcxproj +++ b/network/trans/msnmntr/exe/monitor.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{A775BC8D-48D4-4332-B731-6135FDD0C94A}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{2142A4F7-2EDA-43A2-AA9B-237435A8B04E}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Desktop</DriverTargetPlatform> @@ -65,26 +65,26 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>monitor</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>monitor</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>monitor</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>monitor</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -99,7 +99,7 @@ <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32</PreprocessorDefinitions> </ClCompile> @@ -111,7 +111,7 @@ <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32</PreprocessorDefinitions> </ClCompile> @@ -123,7 +123,7 @@ <AdditionalOptions>%(AdditionalOptions) -N</AdditionalOptions> </ResourceCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);WIN32</PreprocessorDefinitions> </ClCompile> @@ -141,19 +141,19 @@ <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> </ClCompile> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <ExceptionHandling>Sync</ExceptionHandling> <RuntimeTypeInfo>true</RuntimeTypeInfo> @@ -163,15 +163,15 @@ <UseOfAtl>Static</UseOfAtl> <NTDDI_VERSION>NTDDI_WIN7</NTDDI_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <UseOfAtl>Static</UseOfAtl> <NTDDI_VERSION>NTDDI_WIN7</NTDDI_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <UseOfAtl>Static</UseOfAtl> <NTDDI_VERSION>NTDDI_WIN7</NTDDI_VERSION> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <UseOfAtl>Static</UseOfAtl> <NTDDI_VERSION>NTDDI_WIN7</NTDDI_VERSION> </PropertyGroup> @@ -189,7 +189,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> </ResourceCompile> @@ -203,7 +203,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> </ResourceCompile> @@ -217,7 +217,7 @@ <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;comctl32.lib;kernel32.lib;netapi32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;ntdll.lib;kernel32.lib;setupapi.lib;rpcrt4.lib;fwpuclnt.lib</AdditionalDependencies> </Link> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> </ResourceCompile> diff --git a/network/trans/msnmntr/msnmntr.sln b/network/trans/msnmntr/msnmntr.sln index 364b4268..169fc9d4 100644 --- a/network/trans/msnmntr/msnmntr.sln +++ b/network/trans/msnmntr/msnmntr.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -13,24 +13,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msnmntr", "sys\msnmntr.vcxp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|Win32.ActiveCfg = Debug|Win32 - {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|Win32.Build.0 = Debug|Win32 - {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|Win32.ActiveCfg = Release|Win32 - {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|Win32.Build.0 = Release|Win32 + {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|ARM64.Build.0 = Debug|ARM64 + {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|ARM64.Build.0 = Debug|ARM64 + {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|ARM64.ActiveCfg = Release|ARM64 + {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|ARM64.Build.0 = Release|ARM64 + {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Release|ARM64.ActiveCfg = Release|ARM64 + {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Release|ARM64.Build.0 = Release|ARM64 {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|x64.ActiveCfg = Debug|x64 {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Debug|x64.Build.0 = Debug|x64 {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|x64.ActiveCfg = Release|x64 {A775BC8D-48D4-4332-B731-6135FDD0C94A}.Release|x64.Build.0 = Release|x64 - {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|Win32.ActiveCfg = Debug|Win32 - {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|Win32.Build.0 = Debug|Win32 - {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Release|Win32.ActiveCfg = Release|Win32 - {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Release|Win32.Build.0 = Release|Win32 {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|x64.ActiveCfg = Debug|x64 {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Debug|x64.Build.0 = Debug|x64 {0334D910-32A8-48D1-945A-A58B9F2FAD22}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/trans/msnmntr/sys/msnmntr.inf b/network/trans/msnmntr/sys/msnmntr.inf Binary files differindex 79fa3be0..e3ec3563 100644 --- a/network/trans/msnmntr/sys/msnmntr.inf +++ b/network/trans/msnmntr/sys/msnmntr.inf diff --git a/network/trans/msnmntr/sys/msnmntr.vcxproj b/network/trans/msnmntr/sys/msnmntr.vcxproj index 8c4da9ab..17a5433a 100644 --- a/network/trans/msnmntr/sys/msnmntr.vcxproj +++ b/network/trans/msnmntr/sys/msnmntr.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -23,7 +23,7 @@ <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{E5A95292-DFAE-41E4-A0B2-62D97EC6575F}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -35,23 +35,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> @@ -66,13 +66,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -84,13 +84,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>msnmntr</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>msnmntr</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>msnmntr</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>msnmntr</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -111,37 +111,37 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -159,31 +159,31 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> </ClCompile> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;NDIS_SUPPORT_NDIS630POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/trans/stmedit/stmedit.sln b/network/trans/stmedit/stmedit.sln index e6b3f49a..38117f6f 100644 --- a/network/trans/stmedit/stmedit.sln +++ b/network/trans/stmedit/stmedit.sln @@ -1,29 +1,32 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 MinimumVisualStudioVersion = 12.0 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stmedit", "sys\stmedit.vcxproj", "{9CE912A5-6210-4EF8-B22D-611D13254D4C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|Win32.ActiveCfg = Debug|Win32 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|Win32.Build.0 = Debug|Win32 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.ActiveCfg = Release|x64 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.Build.0 = Release|x64 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.Deploy.0 = Release|x64 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|Win32.ActiveCfg = Release|Win32 - {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|Win32.Build.0 = Release|Win32 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|ARM64.Build.0 = Debug|ARM64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|ARM64.ActiveCfg = Release|ARM64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|ARM64.Build.0 = Release|ARM64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.ActiveCfg = Debug|x64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.Build.0 = Debug|x64 + {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Debug|x64.Deploy.0 = Debug|x64 {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|x64.ActiveCfg = Release|x64 {9CE912A5-6210-4EF8-B22D-611D13254D4C}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6157DAF8-6877-4D1D-8FEE-19CF8DA146F0} + EndGlobalSection EndGlobal diff --git a/network/trans/stmedit/sys/InlineEdit.c b/network/trans/stmedit/sys/InlineEdit.c index 74b5bd25..2586072e 100644 --- a/network/trans/stmedit/sys/InlineEdit.c +++ b/network/trans/stmedit/sys/InlineEdit.c @@ -55,7 +55,7 @@ InlineEditFlushData( if (DataLength == 0) break; - Buffer = ExAllocatePoolZero(NonPagedPool, DataLength, STMEDIT_TAG_MDL_DATA); + Buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, DataLength, STMEDIT_TAG_MDL_DATA); if (Buffer == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; @@ -316,8 +316,8 @@ InlineEditClassify( // If a FIN/RST has been classified, flush any data and permit the FIN/RST. // if ((!FlowContext->bFlowActive) || - (streamData->flags & FWPS_STREAM_FLAG_SEND_DISCONNECT) || - (streamData->flags & FWPS_STREAM_FLAG_RECEIVE_DISCONNECT)) + (streamData->flags & FWPS_STREAM_FLAG_SEND_DISCONNECT) || // must also handle FWPS_STREAM_FLAG_SEND_ABORT + (streamData->flags & FWPS_STREAM_FLAG_RECEIVE_DISCONNECT)) // must also handle FWPS_STREAM_FLAG_RECEIVE_ABORT { DoTraceLevelMessage(TRACE_LEVEL_INFORMATION, CO_GENERAL, "FlowCtx %p, FIN/RST classified (Flow Active %d)!", FlowContext, FlowContext->bFlowActive); diff --git a/network/trans/stmedit/sys/LwQueue.c b/network/trans/stmedit/sys/LwQueue.c index 2d46585d..27154d70 100644 --- a/network/trans/stmedit/sys/LwQueue.c +++ b/network/trans/stmedit/sys/LwQueue.c @@ -37,8 +37,8 @@ LwInitializeQueue( KeInitializeSpinLock(&Queue->Lock); Queue->WorkItem = - ExAllocatePoolZero( - NonPagedPool, IoSizeofWorkItem(), STMEDIT_TAG_LQWI); + ExAllocatePool2( + POOL_FLAG_NON_PAGED, IoSizeofWorkItem(), STMEDIT_TAG_LQWI); if (Queue->WorkItem == NULL) { diff --git a/network/trans/stmedit/sys/OobEdit.c b/network/trans/stmedit/sys/OobEdit.c index 0b24e1bc..285dff9f 100644 --- a/network/trans/stmedit/sys/OobEdit.c +++ b/network/trans/stmedit/sys/OobEdit.c @@ -379,8 +379,8 @@ StreamOobReinjectData( do { - DataCopy = ExAllocatePoolZero( - NonPagedPool, + DataCopy = ExAllocatePool2( + POOL_FLAG_NON_PAGED, Length, STMEDIT_TAG_MDL_DATA ); diff --git a/network/trans/stmedit/sys/StreamEdit.c b/network/trans/stmedit/sys/StreamEdit.c index 512fb159..e4f91c61 100644 --- a/network/trans/stmedit/sys/StreamEdit.c +++ b/network/trans/stmedit/sys/StreamEdit.c @@ -464,9 +464,7 @@ StreamEditFlowEstablishedClassify( do { - StreamFlowContext = ExAllocatePoolZero(NonPagedPoolNx, - sizeof(STREAM_FLOW_CONTEXT), - STMEDIT_TAG_FLOWCTX); + StreamFlowContext = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(STREAM_FLOW_CONTEXT), STMEDIT_TAG_FLOWCTX); if (StreamFlowContext == NULL) { @@ -1560,8 +1558,8 @@ _In_ SIZE_T BytesToCopy { size_t NewBufferSize = BytesToCopy + ExistingDataLength; - PVOID NewBuffer = ExAllocatePoolZero( - NonPagedPool, + PVOID NewBuffer = ExAllocatePool2( + POOL_FLAG_NON_PAGED, (NewBufferSize + (NewBufferSize >> 1) ), // 1.5 times the needed size. STMEDIT_TAG_FLAT_BUFFER); @@ -1570,7 +1568,7 @@ _In_ SIZE_T BytesToCopy // We are not able to allocate a much bigger buffer ... lets try an exact fit. // - NewBuffer = ExAllocatePoolZero(NonPagedPool, NewBufferSize, STMEDIT_TAG_FLAT_BUFFER); + NewBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, NewBufferSize, STMEDIT_TAG_FLAT_BUFFER); } if (NewBuffer != NULL) diff --git a/network/trans/stmedit/sys/stmedit.inf b/network/trans/stmedit/sys/stmedit.inf Binary files differindex 04734b1a..3615ce6b 100644 --- a/network/trans/stmedit/sys/stmedit.inf +++ b/network/trans/stmedit/sys/stmedit.inf diff --git a/network/trans/stmedit/sys/stmedit.vcxproj b/network/trans/stmedit/sys/stmedit.vcxproj index 2b81aee6..acd6c422 100644 --- a/network/trans/stmedit/sys/stmedit.vcxproj +++ b/network/trans/stmedit/sys/stmedit.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,8 +22,9 @@ <ProjectGuid>{9CE912A5-6210-4EF8-B22D-611D13254D4C}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR> + <KMDF_VERSION_MINOR>15</KMDF_VERSION_MINOR> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{8FEDC4BC-EFA4-4BF4-91B6-E33FA555EB15}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -35,30 +36,32 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> - <SupportsPackaging>false</SupportsPackaging> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> + <SupportsPackaging>false</SupportsPackaging> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> + <SupportsPackaging>false</SupportsPackaging> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -67,62 +70,63 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>stmedit</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>stmedit</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>stmedit</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>stmedit</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> <WppTraceFunction>DoTraceLevelMessage(LEVEL,FLAGS,MSG,...)</WppTraceFunction> <WppModuleName>StmEdit</WppModuleName> <WppScanConfigurationData>Trace.h</WppScanConfigurationData> + <Optimization>MaxSpeed</Optimization> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> @@ -132,49 +136,49 @@ </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;NDIS60;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> - <WppTraceFunction>DoTraceLevelMessage(LEVEL,FLAGS,MSG,...)</WppTraceFunction> <WppEnabled>true</WppEnabled> + <WppTraceFunction>DoTraceLevelMessage(LEVEL,FLAGS,MSG,...)</WppTraceFunction> <WppModuleName>StmEdit</WppModuleName> <WppScanConfigurationData>Trace.h</WppScanConfigurationData> </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </ResourceCompile> <ClCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> @@ -184,10 +188,10 @@ </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;NDIS_SUPPORT_NDIS6;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions)NT;UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\wdmsec.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/trans/stmedit/sys/stmedit.vcxproj.Filters b/network/trans/stmedit/sys/stmedit.vcxproj.Filters index 662fe098..8286c235 100644 --- a/network/trans/stmedit/sys/stmedit.vcxproj.Filters +++ b/network/trans/stmedit/sys/stmedit.vcxproj.Filters @@ -33,16 +33,18 @@ </ClCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="LwQueue.h"> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="StreamEdit.h" /> - <ClInclude Include="Trace.h" /> - <ClInclude Include="LwQueue.h"> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="StreamEdit.h" /> - <ClInclude Include="Trace.h" /> <ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd"> <Filter>Header Files</Filter> </ClInclude> diff --git a/network/wlan/WDI/COMMON/common.vcxproj b/network/wlan/WDI/COMMON/common.vcxproj index 3de209fa..2842595d 100644 --- a/network/wlan/WDI/COMMON/common.vcxproj +++ b/network/wlan/WDI/COMMON/common.vcxproj @@ -1,28 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Win10 Debug|Arm"> - <Configuration>Win10 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|Win32"> - <Configuration>Win10 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|x64"> - <Configuration>Win10 Debug</Configuration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Arm"> - <Configuration>Win10 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Win32"> - <Configuration>Win10 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|x64"> - <Configuration>Win10 Release</Configuration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> @@ -31,14 +15,13 @@ <ConfigurationType>StaticLibrary</ConfigurationType> <DriverType>KMDF</DriverType> <TARGETNAME>$(ProjectName)</TARGETNAME> - <Configuration>Win10 Debug</Configuration> + <Configuration>Debug</Configuration> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Label="PropertySheets"> <ConversionToolVersion>1.0</ConversionToolVersion> <BUILD_ALT_DIR>$(Configuration.Replace(' ',''))</BUILD_ALT_DIR> - <IntDir Condition="'$(Platform)'!='Win32'">$(BUILD_ALT_DIR)\$(Platform)\</IntDir> - <IntDir Condition="'$(Platform)'=='Win32'">$(BUILD_ALT_DIR)\</IntDir> + <IntDir>$(BUILD_ALT_DIR)\$(Platform)\</IntDir> <OutDir>$(SolutionDir)COMMON\$(Configuration)\$(Platform)\</OutDir> </PropertyGroup> <ImportGroup Label="PreConfiguration"> @@ -47,39 +30,12 @@ <PropertyGroup Label="Globals"> <ProjectGuid>{956B060D-1055-4584-9CF4-9FE14C428545}</ProjectGuid> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - <SupportsPackaging> - </SupportsPackaging> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="Configuration"> - <TargetVersion> - </TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -88,42 +44,7 @@ <DebuggerFlavor Condition="'$(IsKernelModeToolset)'=='true'">DbgengKernelDebugger</DebuggerFlavor> <DebuggerFlavor Condition="'$(IsUserModeToolset)'=='true'">DbgengRemoteDebugger</DebuggerFlavor> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ExecutablePath> - </ExecutablePath> - <ReferencePath>$(VC_ReferencesPath_x86);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - <ExtensionsToDeleteOnClean>*.cdf;*.cache;*.obj;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi</ExtensionsToDeleteOnClean> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_x86);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_Arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_Arm);$(WindowsSDK_LibraryPath_Arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_Arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_Arm);$(WindowsSDK_LibraryPath_Arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> @@ -131,7 +52,7 @@ <SourcePath>$(VC_SourcePath);</SourcePath> <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> @@ -139,208 +60,7 @@ <SourcePath>$(VC_SourcePath);</SourcePath> <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>_X86_;DBG;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling> - </ExceptionHandling> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <SuppressStartupBanner>true</SuppressStartupBanner> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Lib> - <AdditionalDependencies> - </AdditionalDependencies> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <ClCompile> - <SuppressStartupBanner>true</SuppressStartupBanner> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_X86_;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <WppEnabled>true</WppEnabled> - <DebugInformationFormat>None</DebugInformationFormat> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Lib> - <Lib> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <ClCompile> - <DebugInformationFormat>None</DebugInformationFormat> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <ClCompile> - <SuppressStartupBanner>true</SuppressStartupBanner> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;DBG;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> <SuppressStartupBanner>true</SuppressStartupBanner> @@ -388,7 +108,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WppEnabled>true</WppEnabled> <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;</AdditionalIncludeDirectories> diff --git a/network/wlan/WDI/HAL/HALSOURCE/hal.vcxproj b/network/wlan/WDI/HAL/HALSOURCE/hal.vcxproj index 7fe68165..a4044511 100644 --- a/network/wlan/WDI/HAL/HALSOURCE/hal.vcxproj +++ b/network/wlan/WDI/HAL/HALSOURCE/hal.vcxproj @@ -1,78 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Win10 Debug|Arm"> - <Configuration>Win10 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|Win32"> - <Configuration>Win10 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|x64"> - <Configuration>Win10 Debug</Configuration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Arm"> - <Configuration>Win10 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Win32"> - <Configuration>Win10 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|x64"> - <Configuration>Win10 Release</Configuration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Arm"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Arm"> - <Configuration>Win8 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Arm"> - <Configuration>WinBlue Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Arm"> - <Configuration>Win8 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Win32"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Win32"> - <Configuration>Win8 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Debug|Win32"> - <Configuration>Win7 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Debug|Win32"> - <Configuration>Vista Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Win32"> - <Configuration>WinBlue Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Win32"> - <Configuration>Win8 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Release|Win32"> - <Configuration>Win7 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Release|Win32"> - <Configuration>Vista Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="WinBlue Debug|x64"> <Configuration>WinBlue Debug</Configuration> <Platform>x64</Platform> @@ -118,8 +54,7 @@ <PropertyGroup Label="PropertySheets"> <ConversionToolVersion>1.0</ConversionToolVersion> <BUILD_ALT_DIR>$(Configuration.Replace(' ',''))</BUILD_ALT_DIR> - <IntDir Condition="'$(Platform)'!='Win32'">$(BUILD_ALT_DIR)\$(Platform)\</IntDir> - <IntDir Condition="'$(Platform)'=='Win32'">$(BUILD_ALT_DIR)\x86\</IntDir> + <IntDir>$(BUILD_ALT_DIR)\$(Platform)\</IntDir> <OutDir>$(IntDir)</OutDir> </PropertyGroup> <ImportGroup Label="PreConfiguration"> @@ -128,77 +63,11 @@ <PropertyGroup Label="Globals"> <ProjectGuid>{316BB9D3-0947-4431-BC09-1C71C7201001}</ProjectGuid> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Mobile</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Mobile</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|x64'"> <TargetVersion>WindowsV6.3</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> </PropertyGroup> @@ -218,7 +87,7 @@ <TargetVersion>WindowsV6.3</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> </PropertyGroup> diff --git a/network/wlan/WDI/HEADER/PlatformDef.h b/network/wlan/WDI/HEADER/PlatformDef.h index cad6fb7a..a8f4fb55 100644 --- a/network/wlan/WDI/HEADER/PlatformDef.h +++ b/network/wlan/WDI/HEADER/PlatformDef.h @@ -813,42 +813,42 @@ PlatformRequestPreAuthentication( RT_STATUS PlatformReadFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT pu1Byte pBufOfLines, - IN s4Byte nMaxNumLine, - IN s4Byte nMaxByteCntLine, - OUT ps4Byte pnNumLines + IN PVOID Adapter, + IN UNICODE_STRING* fileName, + IN OUT pu1Byte pBufOfLines, + IN s4Byte nMaxNumLine, + IN s4Byte nMaxByteCntLine, + OUT ps4Byte pnNumLinesRead ); RT_STATUS PlatformOpenFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT PRT_FILE_HANDLER pFileHandler + IN UNICODE_STRING* fileName, + IN OUT HANDLE* fileHandle ); RT_STATUS PlatformMapFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT HANDLE* fileHandle, + OUT u1Byte* contentBuffer, + OUT s4Byte* contentBufferLength ); VOID PlatformUnMapFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT u1Byte* contentBuffer ); VOID PlatformCloseFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT HANDLE* fileHandle ); RT_STATUS PlatformReadAndMapFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT pu1Byte pOutFile, - IN OUT pu4Byte UNALIGNED pFileSize + IN UNICODE_STRING* fileName, + OUT u1Byte* outFileBuffer, + OUT u4Byte* outFileBufferLength ); BOOLEAN diff --git a/network/wlan/WDI/LIB/Arm/hal.lib b/network/wlan/WDI/LIB/Arm/hal.lib Binary files differdeleted file mode 100644 index 794359a7..00000000 --- a/network/wlan/WDI/LIB/Arm/hal.lib +++ /dev/null diff --git a/network/wlan/WDI/LIB/Arm/rtklibcom.lib b/network/wlan/WDI/LIB/Arm/rtklibcom.lib Binary files differdeleted file mode 100644 index 356e3860..00000000 --- a/network/wlan/WDI/LIB/Arm/rtklibcom.lib +++ /dev/null diff --git a/network/wlan/WDI/LIB/x86/hal.lib b/network/wlan/WDI/LIB/x86/hal.lib Binary files differdeleted file mode 100644 index 41be4e25..00000000 --- a/network/wlan/WDI/LIB/x86/hal.lib +++ /dev/null diff --git a/network/wlan/WDI/LIB/x86/rtklibcom.lib b/network/wlan/WDI/LIB/x86/rtklibcom.lib Binary files differdeleted file mode 100644 index b18054af..00000000 --- a/network/wlan/WDI/LIB/x86/rtklibcom.lib +++ /dev/null diff --git a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c index d122f0c0..a8eb835d 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c +++ b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c @@ -207,85 +207,105 @@ ParseFileBufToLines( // which is a 2-dimention array, for example, // u1Byte pBufOfLines[nMaxNumLine][nMaxByteCntLine]. // -// Note: -// In NDIS5, the file to open shall be placed at the directory the same as -// driver binary. -// RT_STATUS PlatformReadFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT pu1Byte pBufOfLines, - IN s4Byte nMaxNumLine, - IN s4Byte nMaxByteCntLine, - OUT ps4Byte pnNumLinesRead + IN PVOID Adapter, + IN UNICODE_STRING* fileName, + IN OUT pu1Byte pBufOfLines, + IN s4Byte nMaxNumLine, + IN s4Byte nMaxByteCntLine, + OUT ps4Byte pnNumLinesRead ) { - RT_STATUS rtStatus = RT_STATUS_FAILURE; - NDIS_STRING NdisStrFileName; - NDIS_PHYSICAL_ADDRESS ndisPhyAddr; - NDIS_STATUS ndisStatus; - NDIS_HANDLE hFileHandle; - UINT ulFileLength; - pu1Byte pMappedFile = NULL; + RT_STATUS rtStatus = RT_STATUS_FAILURE; + OBJECT_ATTRIBUTES objectAttributes; + HANDLE fileHandle; + IO_STATUS_BLOCK iostatBlock; + NTSTATUS ntStatus; - // Check input parameters. - if(szFileName == NULL) - { - RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadFile(): szFileName should not be NULL!\n")); - return rtStatus; - } + // Check Input parameters. if(pBufOfLines == NULL) { RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadFile(): pBufOfLines should not be NULL!\n")); return rtStatus; } - // Convert szFileName to NDIS_STRING. - NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName); - if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0) - { - // Open the file specified. - ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1; - NdisOpenFile(&ndisStatus, - &hFileHandle, - &ulFileLength, - &NdisStrFileName, - ndisPhyAddr); - if(ndisStatus == NDIS_STATUS_SUCCESS) - { - // Map the file into memory. - NdisMapFile(&ndisStatus, (PVOID *)(&pMappedFile), hFileHandle); - if(ndisStatus == NDIS_STATUS_SUCCESS) - { - // Read the file into pBufOfLines. - ParseFileBufToLines(Adapter, pMappedFile, ulFileLength, pBufOfLines, nMaxNumLine, nMaxByteCntLine, pnNumLinesRead); - - // Return Success only when Config Success - rtStatus = RT_STATUS_SUCCESS; - - // Relase the memory for mapping the file. - NdisUnmapFile(hFileHandle); + // Initialize the object attributes of the file we want to open + InitializeObjectAttributes( + &objectAttributes, + fileName, + OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, + NULL, // RootDirectory + NULL // Default Security + ); + + // Open the file using the object attributes to get a Handle + ntStatus = ZwOpenFile( + &fileHandle, + GENERIC_READ, + &objectAttributes, + &iostatBlock, + 0, // Do not share the file + FILE_NON_DIRECTORY_FILE + ); + + if (NT_SUCCESS(ntStatus)) { + FILE_STANDARD_INFORMATION fileInformation = { 0 }; + + // Get the file information to know the size we need to alloc + ntStatus = ZwQueryInformationFile( + fileHandle, + &iostatBlock, + &fileInformation, + sizeof(fileInformation), + FileStandardInformation + ); + + if (NT_SUCCESS(ntStatus)) { + u1Byte* buffer = NULL; + s4Byte bufferLength = (s4Byte)fileInformation.EndOfFile.QuadPart; + + // Try to allocate space to read the file + buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferLength, 'frP'); + if (buffer) { + + // If alloc was successful, then read the file + ntStatus = ZwReadFile( + fileHandle, + NULL, + NULL, + NULL, + &iostatBlock, + buffer, + bufferLength, + 0, // No offset + NULL + ); + + if (NT_SUCCESS(ntStatus)) { + // Read the buffer into pBufOfLines. + ParseFileBufToLines(Adapter, buffer, bufferLength, pBufOfLines, nMaxNumLine, nMaxByteCntLine, pnNumLinesRead); + rtStatus = RT_STATUS_SUCCESS; + } + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file, ntStatus: %#X\n", ntStatus)); + } + + ExFreePool(buffer); + } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to map the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus)); + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to allocate space for file!\n")); } - - // Close the file. - NdisCloseFile(hFileHandle); } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus)); + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file attributes!, ntStatus: %#X\n", ntStatus)); } - - // Release the NDIS_STRING allocated via NdisInitializeString(). - NdisFreeString(NdisStrFileName); + + ZwClose(fileHandle); } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName)); + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file!, ntStatus: %#X\n", ntStatus)); } return rtStatus; @@ -293,51 +313,39 @@ PlatformReadFile( RT_STATUS PlatformOpenFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT PRT_FILE_HANDLER pFileHandler + IN UNICODE_STRING* fileName, + IN OUT HANDLE* fileHandle ) { - RT_STATUS rtStatus = RT_STATUS_FAILURE; - NDIS_STRING NdisStrFileName; - NDIS_PHYSICAL_ADDRESS ndisPhyAddr; - NDIS_STATUS ndisStatus; - pu1Byte pMappedFile = NULL; + RT_STATUS rtStatus = RT_STATUS_FAILURE; + OBJECT_ATTRIBUTES objectAttributes; + IO_STATUS_BLOCK iostatBlock; + NTSTATUS ntStatus; - - // Check input parameters. - if(szFileName == NULL) - { - RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): szFileName should not be NULL!\n")); - return rtStatus; - } + // Initialize the object attributes of the file we want to open + InitializeObjectAttributes( + &objectAttributes, + fileName, + OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE, + NULL, // RootDirectory + NULL // Default Security + ); - // Convert szFileName to NDIS_STRING. - NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName); - if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0) - { - // Open the file specified. - ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1; - NdisOpenFile(&ndisStatus, - &(pFileHandler->FileHandler), - &(pFileHandler->FileLength), - &NdisStrFileName, - ndisPhyAddr); - - NdisFreeString(NdisStrFileName); - if(ndisStatus == NDIS_STATUS_SUCCESS) - { - rtStatus = RT_STATUS_SUCCESS; - } - else - { - RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus)); - } - + // Open the file using the object attributes to get a Handle + ntStatus = ZwOpenFile( + fileHandle, + GENERIC_READ, + &objectAttributes, + &iostatBlock, + 0, // Do not share the file + FILE_NON_DIRECTORY_FILE + ); + + if (NT_SUCCESS(ntStatus)) { + rtStatus = RT_STATUS_SUCCESS; } - else - { - RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName)); + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file!, ntStatus: %#X, fileName: %wZ\n", ntStatus, fileName)); } return rtStatus; @@ -345,20 +353,66 @@ PlatformOpenFile( RT_STATUS PlatformMapFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT HANDLE* fileHandle, + OUT u1Byte* contentBuffer, + OUT s4Byte* contentBufferLength ) { - RT_STATUS rtStatus = RT_STATUS_FAILURE; - NDIS_STATUS ndisStatus; - - // Map the file into memory. - NdisMapFile(&ndisStatus, (PVOID *)(&(pFileHandler->MappedFile)), pFileHandler->FileHandler); - if(ndisStatus == NDIS_STATUS_SUCCESS) { - rtStatus = RT_STATUS_SUCCESS; + RT_STATUS rtStatus = RT_STATUS_FAILURE; + OBJECT_ATTRIBUTES objectAttributes; + IO_STATUS_BLOCK iostatBlock; + NTSTATUS ntStatus; + + + FILE_STANDARD_INFORMATION fileInformation = { 0 }; + + // Get the file information to know the size we need to alloc + ntStatus = ZwQueryInformationFile( + *fileHandle, + &iostatBlock, + &fileInformation, + sizeof(fileInformation), + FileStandardInformation + ); + + if (NT_SUCCESS(ntStatus)) { + u1Byte* buffer = NULL; + s4Byte bufferLength = (s4Byte)fileInformation.EndOfFile.QuadPart; + + // Try to allocate space to read the file + buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferLength, 'frP'); + if (buffer) { + + // If alloc was successful, then read the file + ntStatus = ZwReadFile( + fileHandle, + NULL, + NULL, + NULL, + &iostatBlock, + buffer, + bufferLength, + 0, // No offset + NULL + ); + + if (NT_SUCCESS(ntStatus)) { + contentBuffer = buffer; + *contentBufferLength = bufferLength; + rtStatus = RT_STATUS_SUCCESS; + } + else { + ExFreePool(buffer); + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file, ntStatus: %#X\n", ntStatus)); + } + } + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to allocate space for file!\n")); + } } else { - RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformMapFile(): failed to map the file!, ndisStatus: %#X\n", ndisStatus)); + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file attributes!, ntStatus: %#X\n", ntStatus)); } return rtStatus; @@ -366,22 +420,65 @@ PlatformMapFile( VOID PlatformUnMapFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT u1Byte* contentBuffer ) { // Relase the memory for mapping the file. - NdisUnmapFile(pFileHandler->FileHandler); + ExFreePool(contentBuffer); } + VOID PlatformCloseFile( - IN OUT PRT_FILE_HANDLER pFileHandler + IN OUT HANDLE* fileHandle ) { // Relase the memory for mapping the file. - NdisCloseFile(pFileHandler->FileHandler); + ZwClose(fileHandle); +} + +// +// Description: +// Open the file specifed and copy the file into an byte buffer, +// +RT_STATUS +PlatformReadAndMapFile( + IN UNICODE_STRING* fileName, + OUT u1Byte* outFileBuffer, + OUT u4Byte* outFileBufferLength +) +{ + RT_STATUS rtStatus = RT_STATUS_FAILURE; + HANDLE fileHandle; + RT_STATUS callStatus; + + callStatus = PlatformOpenFile(fileName, &fileHandle); + + if (callStatus == RT_STATUS_SUCCESS) { + u1Byte* fileBuffer = NULL; + u4Byte* fileBufferLength = NULL; + + callStatus = PlatformMapFile(&fileHandle, fileBuffer, fileBufferLength); + + if (callStatus == RT_STATUS_SUCCESS) { + outFileBuffer = fileBuffer; + outFileBufferLength = fileBufferLength; + rtStatus = RT_STATUS_SUCCESS; + } + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to map file!, rtStatus: %#X\n", callStatus)); + } + + PlatformCloseFile(fileHandle); + } + else { + RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to open the file!, rtStatus: %#X\n", callStatus)); + } + + return rtStatus; } + // // Description: // Indication for PHY power state changed. @@ -2722,85 +2819,6 @@ N6InitializeNative80211MIBs( Adapter->pNdisCommon->PrivacyExemptionEntrieNum = 0; } -// -// Description: -// Open the file specifed and copy the file into an array, -// -RT_STATUS -PlatformReadAndMapFile( - IN PVOID Adapter, - IN ps1Byte szFileName, - IN OUT pu1Byte pOutFile, - IN OUT pu4Byte UNALIGNED pFileSize - ) -{ - RT_STATUS rtStatus = RT_STATUS_FAILURE; - NDIS_STRING NdisStrFileName; - NDIS_PHYSICAL_ADDRESS ndisPhyAddr; - NDIS_STATUS ndisStatus; - NDIS_HANDLE hFileHandle; - UINT ulFileLength; - pu1Byte pMappedFile = NULL; - - // Check input parameters. - if(szFileName == NULL) - { - RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadAndMapFile(): szFileName should not be NULL!\n")); - return rtStatus; - } - - - // Convert szFileName to NDIS_STRING. - NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName); - if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0) - { - // Open the file specified. - ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1; - NdisOpenFile(&ndisStatus, - &hFileHandle, - &ulFileLength, - &NdisStrFileName, - ndisPhyAddr); - if(ndisStatus == NDIS_STATUS_SUCCESS) - { - // Map the file into memory. - NdisMapFile(&ndisStatus, (PVOID *)(&pMappedFile), hFileHandle); - if(ndisStatus == NDIS_STATUS_SUCCESS) - { - // Copy File into array - PlatformMoveMemory(pOutFile, pMappedFile, ulFileLength); - *pFileSize = ulFileLength; - - // Return Success only when Config Success - rtStatus = RT_STATUS_SUCCESS; - - // Relase the memory for mapping the file. - NdisUnmapFile(hFileHandle); - } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to map the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus)); - } - - // Close the file. - NdisCloseFile(hFileHandle); - } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus)); - } - - // Release the NDIS_STRING allocated via NdisInitializeString(). - NdisFreeString(NdisStrFileName); - } - else - { - RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName)); - } - - return rtStatus; -} - // // Description: diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props index 95559b3c..48fb4917 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/n6c_sdio.inc.props @@ -17,7 +17,7 @@ <KMDF_VERSION_MINOR Condition="'$(TargetVersion)'=='Win8'">11</KMDF_VERSION_MINOR> <!-- WinBlue now only supports v11. It will be 13 later --> <KMDF_VERSION_MINOR Condition="'$(TargetVersion)'=='WindowsV6.3'">11</KMDF_VERSION_MINOR> - <KMDF_VERSION_MINOR Condition="'$(TargetVersion)'=='Windows10'">13</KMDF_VERSION_MINOR> + <KMDF_VERSION_MINOR Condition="'$(TargetVersion)'=='Windows10'">15</KMDF_VERSION_MINOR> <C_DEFINES Condition="'$(TargetVersion)'=='Vista'"> -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1</C_DEFINES> <C_DEFINES Condition="'$(TargetVersion)'=='Win7'"> -DNDIS_MINIPORT_DRIVER -DNDIS60_MINIPORT=1 -DNDIS61_MINIPORT=1 -DNDIS620_MINIPORT=1 -DBINARY_COMPATIBLE=0 -DUSE_KLOCKS=1</C_DEFINES> diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj index 057df090..cfc0e2fa 100644 --- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj +++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj @@ -1,108 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Win10 Debug|Arm"> - <Configuration>Win10 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Arm"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Arm"> - <Configuration>Win8 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Arm"> - <Configuration>Win10 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Arm"> - <Configuration>WinBlue Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Arm"> - <Configuration>Win8 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|Win32"> - <Configuration>Win10 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Win32"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Win32"> - <Configuration>Win8 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Debug|Win32"> - <Configuration>Win7 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Debug|Win32"> - <Configuration>Vista Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Win32"> - <Configuration>Win10 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Win32"> - <Configuration>WinBlue Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Win32"> - <Configuration>Win8 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Release|Win32"> - <Configuration>Win7 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Release|Win32"> - <Configuration>Vista Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|x64"> - <Configuration>Win10 Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|x64"> - <Configuration>WinBlue Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|x64"> - <Configuration>Win8 Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Debug|x64"> - <Configuration>Win7 Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Debug|x64"> - <Configuration>Vista Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|x64"> - <Configuration>Win10 Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|x64"> - <Configuration>WinBlue Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|x64"> - <Configuration>Win8 Release</Configuration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Release|x64"> - <Configuration>Win7 Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Release|x64"> - <Configuration>Vista Release</Configuration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> @@ -118,8 +22,6 @@ <ConversionToolVersion>1.0</ConversionToolVersion> <BUILD_ALT_DIR>$(Configuration.Replace(' ',''))</BUILD_ALT_DIR> <IntDir Condition="'$(Platform)'!='Win32'">$(BUILD_ALT_DIR)\$(Platform)\</IntDir> - <IntDir Condition="'$(Platform)'=='Win32'"> - </IntDir> <OutDir>$(SolutionDir)\DrvBin\$(Configuration)\$(Platform)</OutDir> </PropertyGroup> <ImportGroup Label="PreConfiguration"> @@ -128,186 +30,23 @@ <PropertyGroup Label="Globals"> <ProjectGuid>{105EA485-B9B6-48AE-B8B0-96BBEA575973}</ProjectGuid> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <TargetVersion> - </TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - <SupportsPackaging>true</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <TargetVersion> - </TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - <SupportsPackaging> - </SupportsPackaging> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - <SupportsPackaging> - </SupportsPackaging> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <SupportsPackaging>true</SupportsPackaging> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - <SupportsPackaging>true</SupportsPackaging> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|x64'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <SupportsPackaging>true</SupportsPackaging> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|x64'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> <PropertyGroup> <DebuggerFlavor Condition="'$(IsKernelModeToolset)'=='true'">DbgengKernelDebugger</DebuggerFlavor> <DebuggerFlavor Condition="'$(IsUserModeToolset)'=='true'">DbgengRemoteDebugger</DebuggerFlavor> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <TargetExt>.sys</TargetExt> - <ReferencePath>$(VC_ReferencesPath_x86);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - <EnableInf2cat>true</EnableInf2cat> - <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> - <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> - <Inf2CatVerbose>true</Inf2CatVerbose> - <Inf2CatNoCatalog>false</Inf2CatNoCatalog> - <Inf2CatWindowsVersionList>10_x86;$(Inf2CatWindowsVersionList)</Inf2CatWindowsVersionList> - <ApiValidator_Enable>true</ApiValidator_Enable> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencesPath_x86);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - <EnableInf2cat>true</EnableInf2cat> - <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> - <TargetExt>.sys</TargetExt> - <Inf2CatWindowsVersionList>10_X86;$(Inf2CatWindowsVersionList)</Inf2CatWindowsVersionList> - <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <TargetExt>.sys</TargetExt> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencesPath_arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_arm);$(WindowsSDK_LibraryPath_arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - <EnableInf2cat>false</EnableInf2cat> - <Inf2CatWindowsVersionList>6_3_ARM;$(Inf2CatWindowsVersionList)</Inf2CatWindowsVersionList> - <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> - <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <TargetExt>.sys</TargetExt> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencesPath_arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_arm);$(WindowsSDK_LibraryPath_arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - <EnableInf2cat>false</EnableInf2cat> - <Inf2CatWindowsVersionList>6_3_Arm;$(Inf2CatWindowsVersionList)</Inf2CatWindowsVersionList> - <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> - <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> <EnableInf2cat>true</EnableInf2cat> <Inf2CatWindowsVersionList>10_x64;$(Inf2CatWindowsVersionList)</Inf2CatWindowsVersionList> @@ -320,7 +59,7 @@ <SourcePath>$(VC_SourcePath);</SourcePath> <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetExt>.sys</TargetExt> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath> @@ -333,233 +72,7 @@ <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> <TimeStampServer>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampServer> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <Link> - <AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\NdisComm.lib;$(SolutionDir)\LIB\x86\hal.lib;$(SolutionDir)\LIB\x86\rtklibcom.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ndis.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x86)km\x86\sdbus.lib;$(WindowsSDK_LibraryPath_x86)km\x86\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies> - <!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' --> - <AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Link> - <ClCompile> - <PreprocessorDefinitions>_X86_;DBG;NDIS60_MINIPORT;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling> - </ExceptionHandling> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - <WppMinimalRebuildFromTracking>true</WppMinimalRebuildFromTracking> - </ClCompile> - <ProjectReference> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_X86_;NDIS60_MINIPORT;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - <DebugInformationFormat>None</DebugInformationFormat> - </ClCompile> - <Link> - <!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' --> - <AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\NdisComm.lib;$(SolutionDir)\LIB\x86\hal.lib;$(SolutionDir)\LIB\x86\rtklibcom.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ndis.lib;$(WindowsSDK_LibraryPath_x86)km\x86\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x86)km\x86\sdbus.lib;$(WindowsSDK_LibraryPath_x86)km\x86\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies> - <GenerateDebugInformation> - </GenerateDebugInformation> - <GenerateMapFile> - </GenerateMapFile> - <AssemblyDebug> - </AssemblyDebug> - </Link> - <ProjectReference> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - </ProjectReference> - <ProjectReference> - <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;NDIS60_MINIPORT;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Link> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\$(Platform)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\$(Platform)\NdisComm.lib;$(SolutionDir)\LIB\Arm\hal.lib;$(SolutionDir)\LIB\Arm\rtklibcom.lib;$(WindowsSDK_LibraryPath_arm)km\arm\ndis.lib;$(WindowsSDK_LibraryPath_arm)km\arm\ntoskrnl.lib;$(WindowsSDK_LibraryPath_arm)km\arm\sdbus.lib;$(WindowsSDK_LibraryPath_arm)km\arm\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies> - </Link> - <ProjectReference> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - </ProjectReference> - <ProjectReference> - <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;DBG;NDIS60_MINIPORT;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Link> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\NdisComm.lib;$(SolutionDir)\LIB\Arm\hal.lib;$(SolutionDir)\LIB\Arm\rtklibcom.lib;$(WindowsSDK_LibraryPath_arm)km\arm\ndis.lib;$(WindowsSDK_LibraryPath_arm)km\arm\ntoskrnl.lib;$(WindowsSDK_LibraryPath_arm)km\arm\sdbus.lib;$(WindowsSDK_LibraryPath_arm)km\arm\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies> - </Link> - <ProjectReference> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - </ProjectReference> - <ProjectReference> - <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <WppEnabled>true</WppEnabled> <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> @@ -612,7 +125,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <AdditionalIncludeDirectories>$(WindowsSdkDir)Include\km\;$(WindowsSdkDir)Include\shared\;$(WindowsSdkDir)Include\wdf\kmdf\1.15\;$(WindowsSdkDir)Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)PLATFORM\NDIS6\SDIO;$(SolutionDir)COMMON\;$(SolutionDir)PLATFORM\NDIS6;</AdditionalIncludeDirectories> <DebugInformationFormat>None</DebugInformationFormat> @@ -665,159 +178,25 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> <!-- Needed by any VcxProj --> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup Label="UserMacros" /> <!-- The WrappedTaskItems label is used by the conversion tool to identify the location where items associated with wrapped tasks will reside.--> <ItemGroup Label="WrappedTaskItems"> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x64\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x64\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <PackagePath Include="$(OutDir)" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - </PackagePath> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <PackageRelativeDirectory> - </PackageRelativeDirectory> - </FilesToPackage> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\arm\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> + <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x64\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x86\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> + <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x64\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x86\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> + <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> - <FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x86\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> + <FilesToPackage Include="$(OutDir)$(TargetName)$(TargetExt)" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PackageRelativeDirectory> </PackageRelativeDirectory> </FilesToPackage> diff --git a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.vcxproj b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.vcxproj index ec170811..a7bdea25 100644 --- a/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.vcxproj +++ b/network/wlan/WDI/PLATFORM/NdisComm/NdisComm.vcxproj @@ -1,108 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Win10 Debug|Arm"> - <Configuration>Win10 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|Win32"> - <Configuration>Win10 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Debug|x64"> - <Configuration>Win10 Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Arm"> - <Configuration>Win10 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|Win32"> - <Configuration>Win10 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win10 Release|x64"> - <Configuration>Win10 Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Arm"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Arm"> - <Configuration>Win8 Debug</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Arm"> - <Configuration>WinBlue Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Arm"> - <Configuration>Win8 Release</Configuration> - <Platform>Arm</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|Win32"> - <Configuration>WinBlue Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|Win32"> - <Configuration>Win8 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Debug|Win32"> - <Configuration>Win7 Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Debug|Win32"> - <Configuration>Vista Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|Win32"> - <Configuration>WinBlue Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|Win32"> - <Configuration>Win8 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Release|Win32"> - <Configuration>Win7 Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Release|Win32"> - <Configuration>Vista Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Debug|x64"> - <Configuration>WinBlue Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Debug|x64"> - <Configuration>Win8 Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Debug|x64"> - <Configuration>Win7 Debug</Configuration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Vista Debug|x64"> - <Configuration>Vista Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="WinBlue Release|x64"> - <Configuration>WinBlue Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win8 Release|x64"> - <Configuration>Win8 Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Win7 Release|x64"> - <Configuration>Win7 Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Vista Release|x64"> - <Configuration>Vista Release</Configuration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> @@ -119,7 +23,6 @@ <ConversionToolVersion>1.0</ConversionToolVersion> <BUILD_ALT_DIR>$(Configuration.Replace(' ',''))</BUILD_ALT_DIR> <IntDir Condition="'$(Platform)'!='Win32'">$(BUILD_ALT_DIR)\$(Platform)\</IntDir> - <IntDir Condition="'$(Platform)'=='Win32'">$(BUILD_ALT_DIR)\</IntDir> <OutDir>$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\$(Platform)\</OutDir> </PropertyGroup> <ImportGroup Label="PreConfiguration"> @@ -128,153 +31,21 @@ <PropertyGroup Label="Globals"> <ProjectGuid>{C0A51792-1338-4294-ADAA-EDC4EE30CF05}</ProjectGuid> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Arm'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Arm'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Win32'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'" Label="Configuration"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|x64'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|x64'"> - <TargetVersion>WindowsV6.3</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> - <TargetVersion>Win8</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> - <TargetVersion>Win7</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'"> - <TargetVersion>Vista</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - </PropertyGroup> <PropertyGroup> <DebuggerFlavor Condition="'$(IsKernelModeToolset)'=='true'">DbgengKernelDebugger</DebuggerFlavor> <DebuggerFlavor Condition="'$(IsUserModeToolset)'=='true'">DbgengRemoteDebugger</DebuggerFlavor> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencesPath_x86);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_x86);</ReferencePath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_arm);$(WindowsSDK_LibraryPath_arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> - <ReferencePath>$(VC_ReferencePath_arm);</ReferencePath> - <LibraryPath>$(VC_LibraryPath_arm);$(WindowsSDK_LibraryPath_arm);$(NETFXKitsDir)Lib\um\arm</LibraryPath> - <LibraryWPath>$(WindowsSDK_MetadataPath);</LibraryWPath> - <SourcePath>$(VC_SourcePath);</SourcePath> - <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_arm);</ExcludePath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> @@ -282,7 +53,7 @@ <SourcePath>$(VC_SourcePath);</SourcePath> <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath> <ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath> <LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath> @@ -290,220 +61,7 @@ <SourcePath>$(VC_SourcePath);</SourcePath> <ExcludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath> </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>_X86_;DBG;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <MinimalRebuild>true</MinimalRebuild> - <ExceptionHandling> - </ExceptionHandling> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <ExpandAttributedSource>false</ExpandAttributedSource> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <Lib> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Win32'"> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <ClCompile> - <SuppressStartupBanner>true</SuppressStartupBanner> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <TreatWarningAsError>true</TreatWarningAsError> - <PreprocessorDefinitions>_X86_;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <WppEnabled>true</WppEnabled> - </ClCompile> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|Arm'"> - <ClCompile> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - <WppEnabled>true</WppEnabled> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|Arm'"> - <ClCompile> - <WppEnabled>true</WppEnabled> - <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> - <DebugInformationFormat>None</DebugInformationFormat> - <SuppressStartupBanner>true</SuppressStartupBanner> - <TreatWarningAsError>true</TreatWarningAsError> - <Optimization>Disabled</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <IntrinsicFunctions>false</IntrinsicFunctions> - <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> - <OmitFramePointers>false</OmitFramePointers> - <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> - <WholeProgramOptimization>false</WholeProgramOptimization> - <PreprocessorDefinitions>_ARM_;DBG;USE_KLOCKS=1;BINARY_COMPATIBLE=0;NDIS650_MINIPORT=1;NDIS640_MINIPORT=1;NDIS630_MINIPORT=1;NDIS620_MINIPORT=1;NDIS61_MINIPORT=1;NDIS_MINIPORT_DRIVER;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions> - <IgnoreStandardIncludePath>false</IgnoreStandardIncludePath> - <PreprocessToFile>false</PreprocessToFile> - <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers> - <PreprocessKeepComments>false</PreprocessKeepComments> - <MinimalRebuild>true</MinimalRebuild> - <SmallerTypeCheck>false</SmallerTypeCheck> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> - <StructMemberAlignment>Default</StructMemberAlignment> - <DisableLanguageExtensions>false</DisableLanguageExtensions> - <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> - <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> - <RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - <CallingConvention>Cdecl</CallingConvention> - <CompileAs>Default</CompileAs> - <ShowIncludes>false</ShowIncludes> - <UseFullPaths>false</UseFullPaths> - <OmitDefaultLibName>false</OmitDefaultLibName> - <ErrorReporting>Prompt</ErrorReporting> - </ClCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <ProjectReference> - <LinkLibraryDependencies>false</LinkLibraryDependencies> - </ProjectReference> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <WppEnabled>true</WppEnabled> <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> @@ -553,7 +111,7 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WppEnabled>true</WppEnabled> <AdditionalIncludeDirectories>$(WindowsSdkDir)\Include\km\;$(WindowsSdkDir)\Include\shared\;$(WindowsSdkDir)\Include\wdf\kmdf\1.15\;$(WindowsSdkDir)\Include\km\crt\;$(SolutionDir)HEADER;$(SolutionDir)PLATFORM\NDIS6\;$(SolutionDir)PLATFORM\NdisComm\;$(SolutionDir)PLATFORM\NDIS6\SDIO\;$(SolutionDir)HAL\;$(SolutionDir)HAL\phydm\;$(SolutionDir)HAL\rtl8723B\;$(SolutionDir)HAL\rtl8723B\rtl8723bs\;$(SolutionDir)HAL\phydm\rtl8723b\;$(SolutionDir)COMMON\;</AdditionalIncludeDirectories> @@ -603,106 +161,6 @@ <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Arm'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|Win32'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Debug|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='WinBlue Release|x64'"> - <DriverSign> - <FileDigestAlgorithm>sha256</FileDigestAlgorithm> - </DriverSign> - </ItemDefinitionGroup> <!-- Needed by any VcxProj --> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup Label="UserMacros" /> diff --git a/network/wlan/WDI/PLATFORM/WinInf/SDIO/arm/netrtwlans.inf b/network/wlan/WDI/PLATFORM/WinInf/SDIO/arm/netrtwlans.inf Binary files differdeleted file mode 100644 index 7de18adb..00000000 --- a/network/wlan/WDI/PLATFORM/WinInf/SDIO/arm/netrtwlans.inf +++ /dev/null diff --git a/network/wlan/WDI/PLATFORM/WinInf/SDIO/netrtwlans.inf b/network/wlan/WDI/PLATFORM/WinInf/SDIO/netrtwlans.inf Binary files differdeleted file mode 100644 index 71d52227..00000000 --- a/network/wlan/WDI/PLATFORM/WinInf/SDIO/netrtwlans.inf +++ /dev/null diff --git a/network/wlan/WDI/PLATFORM/WinInf/SDIO/x64/netrtwlans.inf b/network/wlan/WDI/PLATFORM/WinInf/SDIO/x64/netrtwlans.inf Binary files differindex e7753ef3..4640bc85 100644 --- a/network/wlan/WDI/PLATFORM/WinInf/SDIO/x64/netrtwlans.inf +++ b/network/wlan/WDI/PLATFORM/WinInf/SDIO/x64/netrtwlans.inf diff --git a/network/wlan/WDI/PLATFORM/WinInf/SDIO/x86/netrtwlans.inf b/network/wlan/WDI/PLATFORM/WinInf/SDIO/x86/netrtwlans.inf Binary files differdeleted file mode 100644 index 00079d29..00000000 --- a/network/wlan/WDI/PLATFORM/WinInf/SDIO/x86/netrtwlans.inf +++ /dev/null diff --git a/network/wlan/WDI/windows.msbuild.rtwssample.sln b/network/wlan/WDI/windows.msbuild.rtwssample.sln index 0d8732a8..291992f1 100644 --- a/network/wlan/WDI/windows.msbuild.rtwssample.sln +++ b/network/wlan/WDI/windows.msbuild.rtwssample.sln @@ -1,7 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdio", "PLATFORM\NDIS6\SDIO\sdio.vcxproj", "{105EA485-B9B6-48AE-B8B0-96BBEA575973}" ProjectSection(ProjectDependencies) = postProject @@ -15,68 +15,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NdisComm", "PLATFORM\NdisCo EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Win10 Debug|Arm = Win10 Debug|Arm - Win10 Debug|Win32 = Win10 Debug|Win32 - Win10 Debug|x64 = Win10 Debug|x64 - Win10 Release|Arm = Win10 Release|Arm - Win10 Release|Win32 = Win10 Release|Win32 - Win10 Release|x64 = Win10 Release|x64 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Arm.ActiveCfg = Win10 Debug|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Arm.Build.0 = Win10 Debug|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Arm.Deploy.0 = Win10 Debug|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Win32.ActiveCfg = Win10 Debug|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Win32.Build.0 = Win10 Debug|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|Win32.Deploy.0 = Win10 Debug|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|x64.ActiveCfg = Win10 Debug|x64 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|x64.Build.0 = Win10 Debug|x64 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Debug|x64.Deploy.0 = Win10 Debug|x64 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Arm.ActiveCfg = Win10 Release|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Arm.Build.0 = Win10 Release|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Arm.Deploy.0 = Win10 Release|Arm - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Win32.ActiveCfg = Win10 Release|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Win32.Build.0 = Win10 Release|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|Win32.Deploy.0 = Win10 Release|Win32 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|x64.ActiveCfg = Win10 Release|x64 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|x64.Build.0 = Win10 Release|x64 - {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Win10 Release|x64.Deploy.0 = Win10 Release|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Arm.ActiveCfg = Win10 Debug|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Arm.Build.0 = Win10 Debug|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Arm.Deploy.0 = Win10 Debug|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Win32.ActiveCfg = Win10 Debug|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Win32.Build.0 = Win10 Debug|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|Win32.Deploy.0 = Win10 Debug|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|x64.ActiveCfg = Win10 Debug|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|x64.Build.0 = Win10 Debug|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Debug|x64.Deploy.0 = Win10 Debug|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Arm.ActiveCfg = Win10 Release|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Arm.Build.0 = Win10 Release|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Arm.Deploy.0 = Win10 Release|Arm - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Win32.ActiveCfg = Win10 Release|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Win32.Build.0 = Win10 Release|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|Win32.Deploy.0 = Win10 Release|Win32 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|x64.ActiveCfg = Win10 Release|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|x64.Build.0 = Win10 Release|x64 - {956B060D-1055-4584-9CF4-9FE14C428545}.Win10 Release|x64.Deploy.0 = Win10 Release|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Arm.ActiveCfg = Win10 Debug|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Arm.Build.0 = Win10 Debug|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Arm.Deploy.0 = Win10 Debug|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Win32.ActiveCfg = Win10 Debug|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Win32.Build.0 = Win10 Debug|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|Win32.Deploy.0 = Win10 Debug|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|x64.ActiveCfg = Win10 Debug|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|x64.Build.0 = Win10 Debug|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Debug|x64.Deploy.0 = Win10 Debug|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Arm.ActiveCfg = Win10 Release|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Arm.Build.0 = Win10 Release|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Arm.Deploy.0 = Win10 Release|Arm - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Win32.ActiveCfg = Win10 Release|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Win32.Build.0 = Win10 Release|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|Win32.Deploy.0 = Win10 Release|Win32 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|x64.ActiveCfg = Win10 Release|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|x64.Build.0 = Win10 Release|x64 - {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Win10 Release|x64.Deploy.0 = Win10 Release|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Debug|x64.ActiveCfg = Debug|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Debug|x64.Build.0 = Debug|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Debug|x64.Deploy.0 = Debug|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Release|x64.ActiveCfg = Release|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Release|x64.Build.0 = Release|x64 + {105EA485-B9B6-48AE-B8B0-96BBEA575973}.Release|x64.Deploy.0 = Release|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Debug|x64.ActiveCfg = Debug|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Debug|x64.Build.0 = Debug|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Debug|x64.Deploy.0 = Debug|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Release|x64.ActiveCfg = Release|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Release|x64.Build.0 = Release|x64 + {956B060D-1055-4584-9CF4-9FE14C428545}.Release|x64.Deploy.0 = Release|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Debug|x64.ActiveCfg = Debug|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Debug|x64.Build.0 = Debug|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Debug|x64.Deploy.0 = Debug|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Release|x64.ActiveCfg = Release|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Release|x64.Build.0 = Release|x64 + {C0A51792-1338-4294-ADAA-EDC4EE30CF05}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/network/wlan/ihvsampleui/IHVSampleUI.vcxproj b/network/wlan/ihvsampleui/IHVSampleUI.vcxproj index 36ff1126..09f3dad7 100644 --- a/network/wlan/ihvsampleui/IHVSampleUI.vcxproj +++ b/network/wlan/ihvsampleui/IHVSampleUI.vcxproj @@ -1,14 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> @@ -22,7 +14,7 @@ <ProjectGuid>{1EE6DF41-8C0B-4C74-98D2-FCDF020E7128}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{C7745B6F-E931-4E1C-A12B-5BF1C854C635}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -42,22 +34,6 @@ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> <OutDir>$(IntDir)</OutDir> @@ -68,12 +44,6 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> <ItemGroup Label="WrappedTaskItems" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>IHVSampleUI</TargetName> @@ -81,12 +51,6 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>IHVSampleUI</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>IHVSampleUI</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>IHVSampleUI</TargetName> - </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> @@ -98,8 +62,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -113,38 +76,7 @@ <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> </ResourceCompile> <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;WIN32</PreprocessorDefinitions> - </ResourceCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> + <EntryPointSymbol>_DllMainCRTStartup</EntryPointSymbol> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -187,46 +119,6 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> </Midl> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <AdditionalOptions>%(AdditionalOptions) /EHa</AdditionalOptions> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);ole32.lib;oleaut32.lib;user32.lib;uuid.lib;Kernel32.lib;Advapi32.lib;comctl32.lib</AdditionalDependencies> - <ModuleDefinitionFile>IHVSampleUI.def</ModuleDefinitionFile> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <AdditionalOptions>%(AdditionalOptions) /EHa</AdditionalOptions> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <ExceptionHandling> - </ExceptionHandling> - </ClCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);ole32.lib;oleaut32.lib;user32.lib;uuid.lib;Kernel32.lib;Advapi32.lib;comctl32.lib</AdditionalDependencies> - <ModuleDefinitionFile>IHVSampleUI.def</ModuleDefinitionFile> - </Link> - <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="IHVClassFactory.cpp" /> <ClCompile Include="IHVRegistryHelper.cpp" /> diff --git a/network/wsk/echosrv/echosrv.sln b/network/wsk/echosrv/echosrv.sln index d2a3e511..5c634e37 100644 --- a/network/wsk/echosrv/echosrv.sln +++ b/network/wsk/echosrv/echosrv.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0 @@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echosrv", "echosrv.vcxproj" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 Debug|x64 = Debug|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|Win32.ActiveCfg = Debug|Win32 - {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|Win32.Build.0 = Debug|Win32 - {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Release|Win32.ActiveCfg = Release|Win32 - {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Release|Win32.Build.0 = Release|Win32 + {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|ARM64.Build.0 = Debug|ARM64 + {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Release|ARM64.ActiveCfg = Release|ARM64 + {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Release|ARM64.Build.0 = Release|ARM64 {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|x64.ActiveCfg = Debug|x64 {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Debug|x64.Build.0 = Debug|x64 {9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}.Release|x64.ActiveCfg = Release|x64 diff --git a/network/wsk/echosrv/echosrv.vcxproj b/network/wsk/echosrv/echosrv.vcxproj index d511133d..3a6c1d9d 100644 --- a/network/wsk/echosrv/echosrv.vcxproj +++ b/network/wsk/echosrv/echosrv.vcxproj @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> + <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> + <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> - <Platform>Win32</Platform> + <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> @@ -22,7 +22,7 @@ <ProjectGuid>{9436F43A-8E46-4A73-ADB4-2B3F332A9DF4}</ProjectGuid> <RootNamespace>$(MSBuildProjectName)</RootNamespace> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == ''">x64</Platform> <SampleGuid>{5F420AD1-C9CA-461D-AD6D-B290B68DD4F6}</SampleGuid> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> @@ -34,23 +34,23 @@ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> + <UseDebugLibraries>False</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> + <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> <DriverType>WDM</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> @@ -65,13 +65,13 @@ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> </ImportGroup> <ItemGroup Label="WrappedTaskItems"> @@ -87,13 +87,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetName>echosrv</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <TargetName>echosrv</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetName>echosrv</TargetName> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetName>echosrv</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> @@ -111,13 +111,13 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -132,13 +132,13 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -153,13 +153,13 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> </DriverSign> </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> @@ -174,7 +174,7 @@ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </Midl> <Link> - <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;$(SDK_LIB_PATH)\uuid.lib</AdditionalDependencies> + <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\netio.lib;uuid.lib</AdditionalDependencies> </Link> <DriverSign> <FileDigestAlgorithm>sha256</FileDigestAlgorithm> diff --git a/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.inf b/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.inf Binary files differindex 48f893c6..496e5c6a 100644 --- a/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.inf +++ b/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.inf diff --git a/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.vcxproj b/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.vcxproj index 9d7d5b16..8057b531 100644 --- a/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.vcxproj +++ b/network/wwan/cxwmbclass/cxwmbclass/cxwmbclass.vcxproj @@ -71,22 +71,22 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <IncludePath>$(SolutionDir)\inc;$(IncludePath)</IncludePath> - <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath)</ExternalIncludePath> + <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath);$(KIT_SHARED_INC_PATH)\netcx\shared\1.0</ExternalIncludePath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <IncludePath>$(SolutionDir)\inc;$(IncludePath)</IncludePath> - <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath)</ExternalIncludePath> + <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath);$(KIT_SHARED_INC_PATH)\netcx\shared\1.0</ExternalIncludePath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <IncludePath>$(SolutionDir)\inc;$(IncludePath)</IncludePath> - <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath)</ExternalIncludePath> + <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath);$(KIT_SHARED_INC_PATH)\netcx\shared\1.0</ExternalIncludePath> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <IncludePath>$(SolutionDir)\inc;$(IncludePath)</IncludePath> - <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath)</ExternalIncludePath> + <ExternalIncludePath>$(KIT_SHARED_INC_PATH_WDK)\netcx\shared\1.0;$(KM_IncludePath)\mbbcx\1.0;$(KIT_SHARED_INC_PATH_WDK);$(KM_IncludePath)\netcx\kmdf\adapter\2.3;$(ExternalIncludePath);$(KIT_SHARED_INC_PATH)\netcx\shared\1.0</ExternalIncludePath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <DriverSign> diff --git a/network/wwan/cxwmbclass/datapipe.cpp b/network/wwan/cxwmbclass/datapipe.cpp index 4452b761..b753a9e9 100644 --- a/network/wwan/cxwmbclass/datapipe.cpp +++ b/network/wwan/cxwmbclass/datapipe.cpp @@ -428,6 +428,7 @@ MbbBusWriteData(__in MBB_BUS_HANDLE BusHandle, __in MBB_REQUEST_HANDLE RequestHa WDFMEMORY BufferMemoryObject = NULL; WDFREQUEST WriteRequestZLP = NULL; PUSB_WRITE_REQ_CONTEXT writeContextZLP = NULL; + NTSTATUS ZlpStatus; usbDeviceContext = GetUsbDeviceContext(BusObject->WdfUsbDevice); @@ -641,7 +642,7 @@ MbbBusWriteData(__in MBB_BUS_HANDLE BusHandle, __in MBB_REQUEST_HANDLE RequestHa if (WriteRequestZLP != NULL) { - NTSTATUS ZlpStatus; + Status = WdfUsbTargetPipeFormatRequestForWrite(usbDeviceContext->BulkOutputPipe, WriteRequestZLP, NULL, NULL); if (!NT_SUCCESS(Status)) @@ -696,6 +697,7 @@ Cleanup: if (WriteRequestZLP != NULL) { + Status = ZlpStatus; FreeWriteRequest(BusObject->WdfUsbDevice, WriteRequestZLP); WriteRequestZLP = NULL; } diff --git a/network/wwan/cxwmbclass/inc/util.h b/network/wwan/cxwmbclass/inc/util.h index 12d166b4..e55c07e0 100644 --- a/network/wwan/cxwmbclass/inc/util.h +++ b/network/wwan/cxwmbclass/inc/util.h @@ -2,14 +2,12 @@ // Copyright (C) Microsoft. All rights reserved. // #pragma once -typedef enum -{ - MbbPoolTagDefault = '0CBM', - MbbPoolTagNtbSend = '1CBM', - MbbPoolTagNblSend = '2CBM', - MbbPoolTagNbSend = '3CBM', - MbbPoolTagMdlReceive = '6CBM' -} MBB_POOL_TAG; + +#define MbbPoolTagDefault '0CBM' +#define MbbPoolTagNtbSend '1CBM' +#define MbbPoolTagNblSend '2CBM' +#define MbbPoolTagNbSend '3CBM' +#define MbbPoolTagMdlReceive '6CBM' #define ALLOCATE_PAGED_POOL(_y) ExAllocatePool2(POOL_FLAG_PAGED, _y, MbbPoolTagDefault) #define ALLOCATE_NONPAGED_POOL(_y) ExAllocatePool2(POOL_FLAG_NON_PAGED, _y, MbbPoolTagDefault) diff --git a/network/wwan/cxwmbclass/sources.inc b/network/wwan/cxwmbclass/sources.inc deleted file mode 100644 index 7b1e526c..00000000 --- a/network/wwan/cxwmbclass/sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -MBBCX_MAJOR_VERSION=1 -MBBCX_MINOR_VERSION=0 - -MBBCX_VERSION=$(MBBCX_MAJOR_VERSION).$(MBBCX_MINOR_VERSION) - -MBBCX_DDK_INC_PATH=$(ONECORE_EXTERNAL_DDK_INC_PATH)\mbbcx\$(MBBCX_VERSION) -MBBCX_DDK_LIB_PATH=$(ONECORE_EXTERNAL_DDK_LIB_PATH)\mbbcx\$(MBBCX_VERSION) - -KMDF_VERSION_MAJOR=1 -KMDF_VERSION_MINOR=31 -KMDF_VERSION=$(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR) -KMDF_DDK_INC_PATH=$(ONECORE_INTERNAL_DDK_INC_PATH)\wdf\kmdf\$(KMDF_VERSION); diff --git a/network/wwan/cxwmbclass/utils.cpp b/network/wwan/cxwmbclass/utils.cpp index ec791ab4..bc74100d 100644 --- a/network/wwan/cxwmbclass/utils.cpp +++ b/network/wwan/cxwmbclass/utils.cpp @@ -248,7 +248,7 @@ MbbBusGetStat(__in MBB_BUS_HANDLE BusHandle, __in USHORT StatIndex, __out ULONGL if (NT_SUCCESS(Status)) { - if (BytesTransfered < sizeof(Value)) + if (BytesTransfered < sizeof(*Value)) { Status = STATUS_INFO_LENGTH_MISMATCH; } |
