diff options
| author | Jakob Lichtenberg (170957) <[email protected]> | 2024-06-28 11:39:18 -0700 |
|---|---|---|
| committer | Jakob Lichtenberg (170957) <[email protected]> | 2024-06-28 11:39:18 -0700 |
| commit | 1971c7bfc27f90764155ef96df64db4b4cfb93df (patch) | |
| tree | 9193a001a463219d073ce9ea5f1e3408a0ba3d56 /network | |
| parent | 3c4d58d08b74cf2925ec632ed1fe81e0d81df8a1 (diff) | |
| parent | b3af8c8f9bd508f54075da2f2516b31d05cd52c8 (diff) | |
Merge branch 'main' into user/jakobl/nuget_packagereference_instead_of_packages_configuser/jakobl/nuget_packagereference_instead_of_packages_config
Diffstat (limited to 'network')
| -rw-r--r-- | network/trans/WFPSampler/WFPSampler.sln | 4 | ||||
| -rw-r--r-- | network/trans/WFPSampler/exe/WFPSampler.vcxproj | 12 | ||||
| -rw-r--r-- | network/trans/WFPSampler/lib/WFPSampler.vcxproj | 16 | ||||
| -rw-r--r-- | network/trans/WFPSampler/svc/WFPSamplerService.vcxproj | 12 | ||||
| -rw-r--r-- | network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp | 6 | ||||
| -rw-r--r-- | network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX | 20 | ||||
| -rw-r--r-- | network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj | 8 | ||||
| -rw-r--r-- | network/trans/WFPSampler/syslib/WFPSampler.vcxproj | 12 | ||||
| -rw-r--r-- | network/trans/stmedit/sys/InlineEdit.c | 4 | ||||
| -rw-r--r-- | network/trans/stmedit/sys/stmedit.vcxproj | 39 | ||||
| -rw-r--r-- | network/trans/stmedit/sys/stmedit.vcxproj.Filters | 14 | ||||
| -rw-r--r-- | network/wlan/WDI/HEADER/PlatformDef.h | 32 | ||||
| -rw-r--r-- | network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c | 408 | ||||
| -rw-r--r-- | network/wwan/cxwmbclass/sources.inc | 12 |
14 files changed, 312 insertions, 287 deletions
diff --git a/network/trans/WFPSampler/WFPSampler.sln b/network/trans/WFPSampler/WFPSampler.sln index 1e71e3d1..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 diff --git a/network/trans/WFPSampler/exe/WFPSampler.vcxproj b/network/trans/WFPSampler/exe/WFPSampler.vcxproj index 86fae1b7..3a80bd7c 100644 --- a/network/trans/WFPSampler/exe/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/exe/WFPSampler.vcxproj @@ -29,18 +29,20 @@ <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)'=='Release|ARM64'"> <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'"> <TargetVersion>Windows10</TargetVersion> @@ -49,6 +51,7 @@ <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> @@ -57,6 +60,7 @@ <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>Application</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -106,7 +110,6 @@ <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;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> @@ -128,7 +131,6 @@ <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;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -150,7 +152,6 @@ <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;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> @@ -172,7 +173,6 @@ <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;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemGroup> diff --git a/network/trans/WFPSampler/lib/WFPSampler.vcxproj b/network/trans/WFPSampler/lib/WFPSampler.vcxproj index d7889fb8..a905e396 100644 --- a/network/trans/WFPSampler/lib/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/lib/WFPSampler.vcxproj @@ -30,18 +30,20 @@ <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)'=='Release|ARM64'"> <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'"> <TargetVersion>Windows10</TargetVersion> @@ -50,6 +52,7 @@ <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> @@ -58,6 +61,7 @@ <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -105,8 +109,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> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> @@ -126,8 +128,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> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -147,8 +147,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> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> @@ -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/WFPSamplerService.vcxproj b/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj index af6f39f6..1e3c0eac 100644 --- a/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj +++ b/network/trans/WFPSampler/svc/WFPSamplerService.vcxproj @@ -99,6 +99,9 @@ <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> @@ -111,7 +114,6 @@ <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;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>libcmt.lib;libcmtd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> @@ -122,6 +124,7 @@ <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> @@ -134,7 +137,6 @@ <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;setupapi.lib;rpcrt4.lib;rpcns4.lib;fwpuclnt.lib;ws2_32.lib;oneCoreUap.lib;.\..\lib\$(IntDir)\WFPSampler.lib</AdditionalDependencies> - <IgnoreSpecificDefaultLibraries>libcmt.lib;libcmtd.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -145,6 +147,8 @@ <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> @@ -157,7 +161,6 @@ <Link> <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> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreSpecificDefaultLibraries>libcmt.lib;msvcrt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> @@ -169,6 +172,8 @@ <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> @@ -181,7 +186,6 @@ <Link> <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> - <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreSpecificDefaultLibraries>libcmt.lib;msvcrt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> </Link> </ItemDefinitionGroup> diff --git a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp index 0c42a94e..cef0b6df 100644 --- a/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp +++ b/network/trans/WFPSampler/sys/ClassifyFunctions_BasicPacketExaminationCallouts.cpp @@ -4199,6 +4199,12 @@ VOID PerformBasicPacketExaminationAtDiscard(_In_ CLASSIFY_DATA* pClassifyData) break; } + case IpDiscardIpsnpiClientDrop: + { + pDiscardReason = "IPSNPI Drop"; + + break; + } } break; diff --git a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX index bb55b7ad..c6aad050 100644 --- a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX +++ b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.InX @@ -37,15 +37,24 @@ AddReg = WFPCalloutsClassReg [DestinationDirs] - WFPSamplerCalloutDriver.DriverFiles = 13 ;/// %WinDir%\System32\Drivers + WFPSamplerCalloutDriver.CopyFiles = 12 ;/// %WinDir%\System32\Drivers + WFPSamplerCalloutDriver.DelFiles = 12 ;/// %WinDir%\System32\Drivers [DefaultInstall.nt$ARCH$] OptionDesc = %WFPSamplerCalloutDriverDescription% - CopyFiles = WFPSamplerCalloutDriver.DriverFiles + CopyFiles = WFPSamplerCalloutDriver.CopyFiles [DefaultInstall.nt$ARCH$.Services] AddService = %WFPSamplerCalloutDriverServiceName%,,WFPSamplerCalloutDriver.Service +[DefaultUninstall.nt$ARCH$] + LegacyUninstall = 1 + DelFiles = WFPSamplerCalloutDriver.DelFiles + DelReg = WFPCalloutsClassReg + +[DefaultUninstall.nt$ARCH$.Services] + DelService = %WFPSamplerCalloutDriverServiceName%,0x200 ;/// SPSVCINST_STOPSERVICE + [WFPCalloutsClassReg] HKR,,,0 HKR,,Icon,, @@ -53,16 +62,19 @@ HKR,,DeviceCharacteristics,0x10001,0x100 ;/// FLG_ADDREG_BINVALUETYPE | FLG_ADDREG_TYPE_MULTI_SZ, FILE_DEVICE_SECURE_OPEN HKR,,Security,, ;/// Permit Generic All access to SYstem, Built-in Admin, and Local System. -[WFPSamplerCalloutDriver.DriverFiles] +[WFPSamplerCalloutDriver.CopyFiles] WFPSamplerCalloutDriver.sys,,,0x00000040 ;/// COPYFLG_OVERWRITE_OLDER_ONLY +[WFPSamplerCalloutDriver.DelFiles] + WFPSamplerCalloutDriver.sys + [WFPSamplerCalloutDriver.Service] DisplayName = %WFPSamplerCalloutDriverServiceName% Description = %WFPSamplerCalloutDriverServiceDescription% ServiceType = 1 ;/// SERVICE_KERNEL_DRIVER StartType = 0 ;/// SERVICE_BOOT_START ErrorControl = 1 ;/// SERVICE_ERROR_NORMAL - ServiceBinary = %13%\WFPSamplerCalloutDriver.sys ;/// %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.sys + ServiceBinary = %12%\WFPSamplerCalloutDriver.sys ;/// %WinDir%\System32\Drivers\WFPSamplerCalloutDriver.sys LoadOrderGroup = NDIS ;/// Load immediately after TCPIP.sys Dependencies = TCPIP diff --git a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj index 09bfdeba..af141891 100644 --- a/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj +++ b/network/trans/WFPSampler/sys/WFPSamplerCalloutDriver.vcxproj @@ -47,7 +47,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -55,7 +55,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Windows Driver</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -171,7 +171,7 @@ <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;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|ARM64'"> @@ -190,7 +190,7 @@ <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;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> diff --git a/network/trans/WFPSampler/syslib/WFPSampler.vcxproj b/network/trans/WFPSampler/syslib/WFPSampler.vcxproj index 9ec9b254..cc19afc6 100644 --- a/network/trans/WFPSampler/syslib/WFPSampler.vcxproj +++ b/network/trans/WFPSampler/syslib/WFPSampler.vcxproj @@ -32,18 +32,20 @@ <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)'=='Release|ARM64'"> <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'"> <TargetVersion>Windows10</TargetVersion> @@ -52,6 +54,7 @@ <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <TargetVersion>Windows10</TargetVersion> @@ -60,6 +63,7 @@ <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>StaticLibrary</ConfigurationType> + <Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <PropertyGroup> @@ -119,7 +123,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> @@ -143,7 +146,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> @@ -167,7 +169,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> @@ -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/stmedit/sys/InlineEdit.c b/network/trans/stmedit/sys/InlineEdit.c index b21cc429..2586072e 100644 --- a/network/trans/stmedit/sys/InlineEdit.c +++ b/network/trans/stmedit/sys/InlineEdit.c @@ -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/stmedit.vcxproj b/network/trans/stmedit/sys/stmedit.vcxproj index aeb8cca6..acd6c422 100644 --- a/network/trans/stmedit/sys/stmedit.vcxproj +++ b/network/trans/stmedit/sys/stmedit.vcxproj @@ -22,6 +22,7 @@ <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)' == ''">x64</Platform> <SampleGuid>{8FEDC4BC-EFA4-4BF4-91B6-E33FA555EB15}</SampleGuid> @@ -44,22 +45,19 @@ <ConfigurationType>Driver</ConfigurationType> </PropertyGroup> <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetVersion> - </TargetVersion> + <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform> - </DriverTargetPlatform> + <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|ARM64'"> - <TargetVersion> - </TargetVersion> + <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform> - </DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -97,21 +95,22 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;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;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;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;uuid.lib</AdditionalDependencies> @@ -123,11 +122,11 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;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;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> @@ -137,7 +136,7 @@ </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;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;uuid.lib</AdditionalDependencies> @@ -149,11 +148,11 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;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;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;NDIS60;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> @@ -163,7 +162,7 @@ </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;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;uuid.lib</AdditionalDependencies> @@ -175,11 +174,11 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ResourceCompile> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;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;NDIS630;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions> + <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE;NDIS630;POOL_NX_OPTIN</PreprocessorDefinitions> <ExceptionHandling> </ExceptionHandling> <WppEnabled>true</WppEnabled> @@ -189,7 +188,7 @@ </ClCompile> <Midl> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS630;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;uuid.lib</AdditionalDependencies> 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/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/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/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); |
