Update directory structure (#134)
Fixes #124 Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
This commit is contained in:
Родитель
90d0f6971f
Коммит
927b2081e3
|
@ -14,85 +14,85 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "user", "user", "{69CDB6A1-4
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "kernel", "kernel", "{7C2E30D9-E07F-4913-BD8A-345B38F18A81}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubpf_kernel", "src\ebpf\libs\ubpf\kernel\ubpf_kernel.vcxproj", "{675B59F8-089E-40B5-8388-56254447CFA3}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubpf_kernel", "libs\ubpf\kernel\ubpf_kernel.vcxproj", "{675B59F8-089E-40B5-8388-56254447CFA3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "execution_context_kernel", "src\ebpf\libs\execution_context\kernel\execution_context_kernel.vcxproj", "{26E7ED0B-C128-4D7C-A90E-C246DEF40AD3}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "execution_context_kernel", "libs\execution_context\kernel\execution_context_kernel.vcxproj", "{26E7ED0B-C128-4D7C-A90E-C246DEF40AD3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "execution_context_user", "src\ebpf\libs\execution_context\user\execution_context_user.vcxproj", "{18127B0D-8381-4AFE-9A3A-CF53241992D3}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "execution_context_user", "libs\execution_context\user\execution_context_user.vcxproj", "{18127B0D-8381-4AFE-9A3A-CF53241992D3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubpf_user", "src\ebpf\libs\ubpf\user\ubpf_user.vcxproj", "{245F0EC7-1EBC-4D68-8B1F-F758EA9196AE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ubpf_user", "libs\ubpf\user\ubpf_user.vcxproj", "{245F0EC7-1EBC-4D68-8B1F-F758EA9196AE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "api", "src\ebpf\libs\api\api.vcxproj", "{C8BF60C3-40A9-43AD-891A-8AA34F1C3A68}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "api", "libs\api\api.vcxproj", "{C8BF60C3-40A9-43AD-891A-8AA34F1C3A68}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "driver", "driver", "{97D3096A-20FB-4ACB-A038-88E652FE61E3}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "drivers", "drivers", "{97D3096A-20FB-4ACB-A038-88E652FE61E3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dlls", "dlls", "{6129CA61-41A8-49B8-9694-B953C38570BD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EbpfApi", "src\ebpf\dll\ebpfapi.vcxproj", "{75FE223A-3E45-4B0E-A2E8-04285E52E440}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EbpfApi", "ebpfapi\ebpfapi.vcxproj", "{75FE223A-3E45-4B0E-A2E8-04285E52E440}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ebpfnetsh", "src\tools\netsh\ebpfnetsh.vcxproj", "{74803F80-A8BD-4A03-862B-FA96648A9BF6}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ebpfnetsh", "tools\netsh\ebpfnetsh.vcxproj", "{74803F80-A8BD-4A03-862B-FA96648A9BF6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{B09749EC-3D14-414B-BA9B-CD20E218DC84}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnsflood", "src\tools\dnsflood\dnsflood.vcxproj", "{21236F4F-341C-454F-B55B-C653897AB3E8}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnsflood", "tools\dnsflood\dnsflood.vcxproj", "{21236F4F-341C-454F-B55B-C653897AB3E8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{492C9B22-9237-4996-9E33-CA14D3533616}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{492C9B22-9237-4996-9E33-CA14D3533616}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "src\test\sample\sample.vcxproj", "{B4AD72E3-754E-40CA-9CEA-D3F2C9170E51}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "tests\sample\sample.vcxproj", "{B4AD72E3-754E-40CA-9CEA-D3F2C9170E51}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end_to_end", "src\test\end_to_end\end_to_end.vcxproj", "{43B63487-B277-4912-BDA8-C805347B4BA8}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end_to_end", "tests\end_to_end\end_to_end.vcxproj", "{43B63487-B277-4912-BDA8-C805347B4BA8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "setup_build", "scripts\setup_build\setup_build.vcxproj", "{231EE32B-EBA4-4FE5-A55B-DB18F539D403}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "port_quota", "src\tools\port_quota\port_quota.vcxproj", "{DDADF35D-C02C-40BB-9F95-5BF8BFDB51CE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "port_quota", "tools\port_quota\port_quota.vcxproj", "{DDADF35D-C02C-40BB-9F95-5BF8BFDB51CE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "port_leak", "src\tools\port_leak\port_leak.vcxproj", "{DB2AF239-5251-43F1-BABF-11E707DC5523}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "port_leak", "tools\port_leak\port_leak.vcxproj", "{DB2AF239-5251-43F1-BABF-11E707DC5523}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "platform_user", "src\ebpf\libs\platform\user\platform_user.vcxproj", "{C26CB6A9-158C-4A9E-A243-755DDD98E5FE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "platform_user", "libs\platform\user\platform_user.vcxproj", "{C26CB6A9-158C-4A9E-A243-755DDD98E5FE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "platform_kernel", "src\ebpf\libs\platform\kernel\platform_kernel.vcxproj", "{FC3F9998-4085-4767-8386-5453F07C3AAD}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "platform_kernel", "libs\platform\kernel\platform_kernel.vcxproj", "{FC3F9998-4085-4767-8386-5453F07C3AAD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maps_user", "src\ebpf\libs\maps\user\maps_user.vcxproj", "{EBC4B40C-2319-4F7E-9531-8232EF8B87F4}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maps_user", "libs\maps\user\maps_user.vcxproj", "{EBC4B40C-2319-4F7E-9531-8232EF8B87F4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maps_kernel", "src\ebpf\libs\maps\kernel\maps_kernel.vcxproj", "{08B41A2E-3AA3-49C4-A525-D45B902D9DB0}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "maps_kernel", "libs\maps\kernel\maps_kernel.vcxproj", "{08B41A2E-3AA3-49C4-A525-D45B902D9DB0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "epoch_user", "src\ebpf\libs\epoch\user\epoch_user.vcxproj", "{A7E21439-B561-43F0-9DDD-237425F42BCD}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "epoch_user", "libs\epoch\user\epoch_user.vcxproj", "{A7E21439-B561-43F0-9DDD-237425F42BCD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "epoch_kernel", "src\ebpf\libs\epoch\kernel\epoch_kernel.vcxproj", "{FB2680FB-13CF-400C-8A5D-042C0AC20A3F}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "epoch_kernel", "libs\epoch\kernel\epoch_kernel.vcxproj", "{FB2680FB-13CF-400C-8A5D-042C0AC20A3F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EbpfCore", "src\ebpf\sys\core\EbpfCore.vcxproj", "{97E52ABB-2F1E-4AD2-AEFD-6EB7FDC0A41D}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EbpfCore", "ebpfcore\EbpfCore.vcxproj", "{97E52ABB-2F1E-4AD2-AEFD-6EB7FDC0A41D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetEbpfExt", "src\ebpf\sys\netext\netebpfext.vcxproj", "{55499E36-37D4-4F86-B694-9F2990315758}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetEbpfExt", "netebpfext\netebpfext.vcxproj", "{55499E36-37D4-4F86-B694-9F2990315758}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<PreprocessorDefinitions>NDEBUG;EBPFAPI_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
|
@ -125,7 +125,7 @@
|
|||
<None Include="Source.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\external\ebpf-verifier\build\ebpfverifier.vcxproj">
|
||||
<ProjectReference Include="..\external\ebpf-verifier\build\ebpfverifier.vcxproj">
|
||||
<Project>{7d5b4e68-c0fa-3f86-9405-f6400219b440}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\libs\api\api.vcxproj">
|
||||
|
@ -138,4 +138,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -87,7 +87,7 @@
|
|||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\kernel</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)include;$(SolutionDir)include\kernel</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\kernel</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)include;$(SolutionDir)include\kernel</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -131,23 +131,23 @@
|
|||
<FilesToPackage Include="$(TargetPath)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\libs\epoch\kernel\epoch_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\epoch\kernel\epoch_kernel.vcxproj">
|
||||
<Project>{fb2680fb-13cf-400c-8a5d-042c0ac20a3f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\execution_context\kernel\execution_context_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\execution_context\kernel\execution_context_kernel.vcxproj">
|
||||
<Project>{26e7ed0b-c128-4d7c-a90e-c246def40ad3}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\maps\kernel\maps_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\maps\kernel\maps_kernel.vcxproj">
|
||||
<Project>{08b41a2e-3aa3-49c4-a525-d45b902d9db0}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\platform\kernel\platform_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\platform\kernel\platform_kernel.vcxproj">
|
||||
<Project>{fc3f9998-4085-4767-8386-5453f07c3aad}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libs\ubpf\kernel\ubpf_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\ubpf\kernel\ubpf_kernel.vcxproj">
|
||||
<Project>{675b59f8-089e-40b5-8388-56254447cfa3}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -28,7 +28,7 @@
|
|||
<ProjectGuid>{c8bf60c3-40a9-43ad-891a-8aa34f1c3a68}</ProjectGuid>
|
||||
<RootNamespace>ebpfapi</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<PrevailDir>$(ProjectDir)../../../../external/ebpf-verifier/</PrevailDir>
|
||||
<PrevailDir>$(ProjectDir)../../external/ebpf-verifier/</PrevailDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
@ -131,7 +131,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
|
@ -152,7 +152,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)external\ebpf-verifier\external;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
|
@ -190,12 +190,12 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\..\..\..\packages\boost.1.75.0.0\build\boost.targets" Condition="Exists('..\..\..\..\packages\boost.1.75.0.0\build\boost.targets')" />
|
||||
<Import Project="..\..\packages\boost.1.75.0.0\build\boost.targets" Condition="Exists('..\..\packages\boost.1.75.0.0\build\boost.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\boost.1.75.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\boost.1.75.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('..\..\packages\boost.1.75.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\boost.1.75.0.0\build\boost.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
|
@ -141,13 +141,13 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
|
@ -175,4 +175,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -134,7 +134,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -167,4 +167,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -93,18 +93,18 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\src\ebpf\libs\execution_context\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)libs\execution_context\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4201;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\src\ebpf\libs\execution_context\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)libs\execution_context\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4201;4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -81,7 +81,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\src\ebpf\libs\execution_context\user;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)libs\execution_context\user;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\src\ebpf\libs\execution_context\user;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)\external\ubpf\vm\inc;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)libs\execution_context\user;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -134,4 +134,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -140,13 +140,13 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
|
@ -174,4 +174,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -134,7 +134,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -167,4 +167,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -146,13 +146,13 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
|
@ -180,4 +180,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -143,7 +143,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -162,7 +162,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -176,4 +176,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -15,8 +15,8 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ebpf.h" />
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_int.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ebpf.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_int.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ubpf_kernel.c" />
|
||||
|
@ -64,7 +64,7 @@
|
|||
<ClCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP;WINAPI_PARTITION_DESKTOP=1;WINAPI_PARTITION_SYSTEM=1;WINAPI_PARTITION_APP=1;WINAPI_PARTITION_PC_APP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\kernel;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\kernel;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
|
@ -80,4 +80,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -19,10 +19,10 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ebpf.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ebpf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_int.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_int.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
@ -31,4 +31,4 @@
|
|||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -23,10 +23,10 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ebpf.h" />
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\platform.h" />
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_int.h" />
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_jit_x86_64.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ebpf.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\platform.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_int.h" />
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_jit_x86_64.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ubpf_user.c" />
|
||||
|
@ -37,7 +37,7 @@
|
|||
<ProjectGuid>{245f0ec7-1ebc-4d68-8b1f-f758ea9196ae}</ProjectGuid>
|
||||
<RootNamespace>EbpfJitterDemoLib</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<UbpfDir>$(ProjectDir)../../../../external/ubpf/vm</UbpfDir>
|
||||
<UbpfDir>$(ProjectDir)../../external/ubpf/vm</UbpfDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
|
@ -85,7 +85,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\src\ebpf\include;$(SolutionDir)\src\ebpf\include\user;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)\external\ubpf\vm;$(SolutionDir)\external\ubpf\vm\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -117,4 +117,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -19,16 +19,16 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ebpf.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ebpf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\platform.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\platform.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_int.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_int.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\..\external\ubpf\vm\ubpf_jit_x86_64.h">
|
||||
<ClInclude Include="..\..\..\external\ubpf\vm\ubpf_jit_x86_64.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
|
@ -0,0 +1,771 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Abstract:
|
||||
|
||||
This file implements the classifyFn, notifiFn, and flowDeleteFn callouts
|
||||
functions for:
|
||||
Layer 2 network receive
|
||||
Resource Acquire
|
||||
Resource Release
|
||||
Bind redirect
|
||||
|
||||
Environment:
|
||||
|
||||
Kernel mode
|
||||
|
||||
--*/
|
||||
#define INITGUID
|
||||
|
||||
#include "net_ebpf_ext.h"
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4201) // unnamed struct/union
|
||||
#include <fwpsk.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <fwpmk.h>
|
||||
#include <guiddef.h>
|
||||
#include <netiodef.h>
|
||||
#include <ntddk.h>
|
||||
|
||||
#include "ebpf_platform.h"
|
||||
#include "ebpf_windows.h"
|
||||
|
||||
// XDP like hook
|
||||
typedef struct _xdp_md
|
||||
{
|
||||
uint64_t data; /* 0 8 */
|
||||
uint64_t data_end; /* 8 8 */
|
||||
uint64_t data_meta; /* 16 8 */
|
||||
|
||||
/* size: 12, cachelines: 1, members: 3 */
|
||||
/* last cacheline: 12 bytes */
|
||||
} xdp_md_t;
|
||||
|
||||
typedef enum _xdp_action
|
||||
{
|
||||
XDP_PASS = 1,
|
||||
XDP_DROP = 2
|
||||
} xdp_action_t;
|
||||
|
||||
// BIND hook
|
||||
typedef struct _bind_md
|
||||
{
|
||||
uint64_t app_id_start; // 0,8
|
||||
uint64_t app_id_end; // 8,8
|
||||
uint64_t process_id; // 16,8
|
||||
uint8_t socket_address[16]; // 24,16
|
||||
uint8_t socket_address_length; // 40,1
|
||||
uint8_t operation; // 41,1
|
||||
uint8_t protocol; // 42,1
|
||||
} bind_md_t;
|
||||
|
||||
typedef enum _bind_operation
|
||||
{
|
||||
BIND_OPERATION_BIND, // Entry to bind
|
||||
BIND_OPERATION_POST_BIND, // After port allocation
|
||||
BIND_OPERATION_UNBIND, // Release port
|
||||
} bind_operation_t;
|
||||
|
||||
typedef enum _bind_action
|
||||
{
|
||||
BIND_PERMIT,
|
||||
BIND_DENY,
|
||||
BIND_REDIRECT,
|
||||
} bind_action_t;
|
||||
|
||||
typedef DWORD(__stdcall* bind_hook_function)(PVOID);
|
||||
|
||||
typedef struct _net_ebpf_ext_hook_provider_registration
|
||||
{
|
||||
ebpf_extension_data_t* provider_data;
|
||||
ebpf_extension_provider_t* provider;
|
||||
GUID client_id;
|
||||
void* client_binding_context;
|
||||
const ebpf_extension_data_t* client_data;
|
||||
const ebpf_error_code_t (*invoke_hook)(void* bind_context, void* context, uint32_t* result);
|
||||
} net_ebpf_ext_hook_provider_registration_t;
|
||||
|
||||
static net_ebpf_ext_hook_provider_registration_t _ebpf_xdp_hook_provider_registration = {0};
|
||||
static net_ebpf_ext_hook_provider_registration_t _ebpf_bind_hook_provider_registration = {0};
|
||||
static ebpf_extension_provider_t* _ebpf_xdp_program_information_provider = NULL;
|
||||
static ebpf_extension_provider_t* _ebpf_bind_program_information_provider = NULL;
|
||||
static ebpf_extension_data_t _ebpf_xdp_program_information_provider_data = {0, 0};
|
||||
static ebpf_extension_data_t _ebpf_bind_program_information_provider_data = {0, 0};
|
||||
|
||||
#define RTL_COUNT_OF(arr) (sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
// Callout and sublayer GUIDs
|
||||
|
||||
// 7c7b3fb9-3331-436a-98e1-b901df457fff
|
||||
DEFINE_GUID(EBPF_HOOK_SUBLAYER, 0x7c7b3fb9, 0x3331, 0x436a, 0x98, 0xe1, 0xb9, 0x01, 0xdf, 0x45, 0x7f, 0xff);
|
||||
|
||||
// 5a5614e5-6b64-4738-8367-33c6ca07bf8f
|
||||
DEFINE_GUID(EBPF_HOOK_L2_CALLOUT, 0x5a5614e5, 0x6b64, 0x4738, 0x83, 0x67, 0x33, 0xc6, 0xca, 0x07, 0xbf, 0x8f);
|
||||
|
||||
// c69f4de0-3d80-457d-9aea-75faef42ec12
|
||||
DEFINE_GUID(
|
||||
EBPF_HOOK_ALE_BIND_REDIRECT_CALLOUT, 0xc69f4de0, 0x3d80, 0x457d, 0x9a, 0xea, 0x75, 0xfa, 0xef, 0x42, 0xec, 0x12);
|
||||
|
||||
// 732acf94-7319-4fed-97d0-41d3a18f3fa1
|
||||
DEFINE_GUID(
|
||||
EBPF_HOOK_ALE_RESOURCE_ALLOCATION_CALLOUT,
|
||||
0x732acf94,
|
||||
0x7319,
|
||||
0x4fed,
|
||||
0x97,
|
||||
0xd0,
|
||||
0x41,
|
||||
0xd3,
|
||||
0xa1,
|
||||
0x8f,
|
||||
0x3f,
|
||||
0xa1);
|
||||
|
||||
// d5792949-2d91-4023-9993-3f3dd9d54b2b
|
||||
DEFINE_GUID(
|
||||
EBPF_HOOK_ALE_RESOURCE_RELEASE_CALLOUT, 0xd5792949, 0x2d91, 0x4023, 0x99, 0x93, 0x3f, 0x3d, 0xd9, 0xd5, 0x4b, 0x2b);
|
||||
|
||||
// 85e0d8ef-579e-4931-b072-8ee226bb2e9d
|
||||
DEFINE_GUID(EBPF_ATTACH_TYPE_XDP, 0x85e0d8ef, 0x579e, 0x4931, 0xb0, 0x72, 0x8e, 0xe2, 0x26, 0xbb, 0x2e, 0x9d);
|
||||
|
||||
// b9707e04-8127-4c72-833e-05b1fb439496
|
||||
DEFINE_GUID(EBPF_ATTACH_TYPE_BIND, 0xb9707e04, 0x8127, 0x4c72, 0x83, 0x3e, 0x05, 0xb1, 0xfb, 0x43, 0x94, 0x96);
|
||||
|
||||
DEFINE_GUID(EBPF_PROGRAM_TYPE_XDP, 0xf1832a85, 0x85d5, 0x45b0, 0x98, 0xa0, 0x70, 0x69, 0xd6, 0x30, 0x13, 0xb0);
|
||||
|
||||
DEFINE_GUID(EBPF_PROGRAM_TYPE_BIND, 0x608c517c, 0x6c52, 0x4a26, 0xb6, 0x77, 0xbb, 0x1c, 0x34, 0x42, 0x5a, 0xdf);
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_layer_2_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output);
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_resource_allocation_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output);
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_resource_release_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output);
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_no_op_flow_delete(uint16_t layer_id, uint32_t fwpm_callout_id, uint64_t flow_context);
|
||||
|
||||
static NTSTATUS
|
||||
_net_ebpf_ext_no_op_notify(
|
||||
FWPS_CALLOUT_NOTIFY_TYPE callout_notification_type, _In_ const GUID* filter_key, _Inout_ const FWPS_FILTER* filter);
|
||||
|
||||
typedef struct _net_ebpf_ext_wfp_callout_state
|
||||
{
|
||||
const GUID* callout_guid;
|
||||
const GUID* layer_guid;
|
||||
FWPS_CALLOUT_CLASSIFY_FN3 classify_fn;
|
||||
FWPS_CALLOUT_NOTIFY_FN3 notify_fn;
|
||||
FWPS_CALLOUT_FLOW_DELETE_NOTIFY_FN0 delete_fn;
|
||||
wchar_t* name;
|
||||
wchar_t* description;
|
||||
FWP_ACTION_TYPE filter_action_type;
|
||||
uint32_t assigned_callout_id;
|
||||
} net_ebpf_ext_wfp_callout_state_t;
|
||||
|
||||
static net_ebpf_ext_wfp_callout_state_t _net_ebpf_ext_wfp_callout_state[] = {
|
||||
{
|
||||
&EBPF_HOOK_L2_CALLOUT,
|
||||
&FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET,
|
||||
_net_ebpf_ext_layer_2_classify,
|
||||
_net_ebpf_ext_no_op_notify,
|
||||
_net_ebpf_ext_no_op_flow_delete,
|
||||
L"L2 XDP Callout",
|
||||
L"L2 callout driver for eBPF at XDP-like layer",
|
||||
FWP_ACTION_CALLOUT_TERMINATING,
|
||||
},
|
||||
{
|
||||
&EBPF_HOOK_ALE_RESOURCE_ALLOCATION_CALLOUT,
|
||||
&FWPM_LAYER_ALE_RESOURCE_ASSIGNMENT_V4,
|
||||
_net_ebpf_ext_resource_allocation_classify,
|
||||
_net_ebpf_ext_no_op_notify,
|
||||
_net_ebpf_ext_no_op_flow_delete,
|
||||
L"Resource Allocation eBPF Callout",
|
||||
L"Resource Allocation callout driver for eBPF",
|
||||
FWP_ACTION_CALLOUT_TERMINATING,
|
||||
},
|
||||
{
|
||||
&EBPF_HOOK_ALE_RESOURCE_RELEASE_CALLOUT,
|
||||
&FWPM_LAYER_ALE_RESOURCE_RELEASE_V4,
|
||||
_net_ebpf_ext_resource_release_classify,
|
||||
_net_ebpf_ext_no_op_notify,
|
||||
_net_ebpf_ext_no_op_flow_delete,
|
||||
L"Resource Release eBPF Callout",
|
||||
L"Resource Release callout driver for eBPF",
|
||||
FWP_ACTION_CALLOUT_TERMINATING,
|
||||
},
|
||||
};
|
||||
|
||||
// Callout globals
|
||||
static HANDLE _fwp_engine_handle;
|
||||
|
||||
static NTSTATUS
|
||||
_net_ebpf_ext_register_wfp_callout(_Inout_ net_ebpf_ext_wfp_callout_state_t* callout_state, _Inout_ void* device_object)
|
||||
/* ++
|
||||
|
||||
This function registers callouts and filters.
|
||||
|
||||
-- */
|
||||
{
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
|
||||
FWPS_CALLOUT callout_register_state = {0};
|
||||
FWPM_CALLOUT callout_add_state = {0};
|
||||
|
||||
FWPM_DISPLAY_DATA display_data = {0};
|
||||
FWPM_FILTER filter = {0};
|
||||
|
||||
BOOLEAN was_callout_registered = FALSE;
|
||||
|
||||
callout_register_state.calloutKey = *callout_state->callout_guid;
|
||||
callout_register_state.classifyFn = callout_state->classify_fn;
|
||||
callout_register_state.notifyFn = callout_state->notify_fn;
|
||||
callout_register_state.flowDeleteFn = callout_state->delete_fn;
|
||||
callout_register_state.flags = 0;
|
||||
|
||||
status = FwpsCalloutRegister(device_object, &callout_register_state, &callout_state->assigned_callout_id);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: FwpsCalloutRegister for %S failed with error %.2X\n",
|
||||
callout_state->name,
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
was_callout_registered = TRUE;
|
||||
|
||||
display_data.name = callout_state->name;
|
||||
display_data.description = callout_state->description;
|
||||
|
||||
callout_add_state.calloutKey = *callout_state->callout_guid;
|
||||
callout_add_state.displayData = display_data;
|
||||
callout_add_state.applicableLayer = *callout_state->layer_guid;
|
||||
|
||||
status = FwpmCalloutAdd(_fwp_engine_handle, &callout_add_state, NULL, NULL);
|
||||
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: FwpmCalloutAdd for %S failed with error %.2X\n",
|
||||
callout_state->name,
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
filter.layerKey = *callout_state->layer_guid;
|
||||
filter.displayData.name = callout_state->name;
|
||||
filter.displayData.description = callout_state->description;
|
||||
filter.action.type = callout_state->filter_action_type;
|
||||
filter.action.calloutKey = *callout_state->callout_guid;
|
||||
filter.filterCondition = NULL;
|
||||
filter.numFilterConditions = 0;
|
||||
filter.subLayerKey = EBPF_HOOK_SUBLAYER;
|
||||
filter.weight.type = FWP_EMPTY; // auto-weight.
|
||||
|
||||
status = FwpmFilterAdd(_fwp_engine_handle, &filter, NULL, NULL);
|
||||
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: FwpmFilterAdd for %S failed with error %.2X\n",
|
||||
callout_state->name,
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Exit:
|
||||
|
||||
if (!NT_SUCCESS(status)) {
|
||||
if (was_callout_registered) {
|
||||
FwpsCalloutUnregisterById(callout_state->assigned_callout_id);
|
||||
callout_state->assigned_callout_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
net_ebpf_ext_register_callouts(_Inout_ void* device_object)
|
||||
/* ++
|
||||
|
||||
This function registers dynamic callouts and filters that
|
||||
FWPM_LAYER_INBOUND_MAC_FRAME_ETHERNET layer.
|
||||
|
||||
Callouts and filters will be removed during DriverUnload.
|
||||
|
||||
-- */
|
||||
{
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
FWPM_SUBLAYER ebpf_hook_sub_layer;
|
||||
|
||||
BOOLEAN is_engined_opened = FALSE;
|
||||
BOOLEAN is_in_transaction = FALSE;
|
||||
|
||||
FWPM_SESSION session = {0};
|
||||
|
||||
size_t index;
|
||||
|
||||
if (_fwp_engine_handle != NULL) {
|
||||
// already registered
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
session.flags = FWPM_SESSION_FLAG_DYNAMIC;
|
||||
|
||||
status = FwpmEngineOpen(NULL, RPC_C_AUTHN_WINNT, NULL, &session, &_fwp_engine_handle);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "NetEbpfExt: FwpmEngineOpen failed with error %.2X\n", status));
|
||||
goto Exit;
|
||||
}
|
||||
is_engined_opened = TRUE;
|
||||
|
||||
status = FwpmTransactionBegin(_fwp_engine_handle, 0);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: FwpmTransactionBegin failed with error %.2X\n",
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
is_in_transaction = TRUE;
|
||||
|
||||
RtlZeroMemory(&ebpf_hook_sub_layer, sizeof(FWPM_SUBLAYER));
|
||||
|
||||
ebpf_hook_sub_layer.subLayerKey = EBPF_HOOK_SUBLAYER;
|
||||
ebpf_hook_sub_layer.displayData.name = L"EBPF hook Sub-Layer";
|
||||
ebpf_hook_sub_layer.displayData.description = L"Sub-Layer for use by EBPF callouts";
|
||||
ebpf_hook_sub_layer.flags = 0;
|
||||
ebpf_hook_sub_layer.weight = FWP_EMPTY; // auto-weight.;
|
||||
|
||||
status = FwpmSubLayerAdd(_fwp_engine_handle, &ebpf_hook_sub_layer, NULL);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "NetEbpfExt: FwpmSubLayerAdd failed with error %.2X\n", status));
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
for (index = 0; index < RTL_COUNT_OF(_net_ebpf_ext_wfp_callout_state); index++) {
|
||||
status = _net_ebpf_ext_register_wfp_callout(&_net_ebpf_ext_wfp_callout_state[index], device_object);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: _net_ebpf_ext_register_wfp_callout failed for %S with "
|
||||
"error %.2X\n",
|
||||
_net_ebpf_ext_wfp_callout_state[index].name,
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
||||
status = FwpmTransactionCommit(_fwp_engine_handle);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
KdPrintEx(
|
||||
(DPFLTR_IHVDRIVER_ID,
|
||||
DPFLTR_INFO_LEVEL,
|
||||
"NetEbpfExt: FwpmTransactionCommit failed with error %.2X\n",
|
||||
status));
|
||||
goto Exit;
|
||||
}
|
||||
is_in_transaction = FALSE;
|
||||
|
||||
Exit:
|
||||
|
||||
if (!NT_SUCCESS(status)) {
|
||||
if (is_in_transaction) {
|
||||
FwpmTransactionAbort(_fwp_engine_handle);
|
||||
_Analysis_assume_lock_not_held_(_fwp_engine_handle); // Potential leak if "FwpmTransactionAbort" fails
|
||||
}
|
||||
if (is_engined_opened) {
|
||||
FwpmEngineClose(_fwp_engine_handle);
|
||||
_fwp_engine_handle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
net_ebpf_ext_unregister_callouts(void)
|
||||
{
|
||||
size_t index;
|
||||
if (_fwp_engine_handle != NULL) {
|
||||
FwpmEngineClose(_fwp_engine_handle);
|
||||
_fwp_engine_handle = NULL;
|
||||
|
||||
for (index = 0; index < RTL_COUNT_OF(_net_ebpf_ext_wfp_callout_state); index++) {
|
||||
FwpsCalloutUnregisterById(_net_ebpf_ext_wfp_callout_state[index].assigned_callout_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_layer_2_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output)
|
||||
/* ++
|
||||
|
||||
A simple classify function at the WFP L2 MAC layer.
|
||||
|
||||
-- */
|
||||
{
|
||||
FWP_ACTION_TYPE action = FWP_ACTION_PERMIT;
|
||||
UNREFERENCED_PARAMETER(incoming_fixed_values);
|
||||
UNREFERENCED_PARAMETER(incoming_metadata_values);
|
||||
UNREFERENCED_PARAMETER(classify_context);
|
||||
UNREFERENCED_PARAMETER(filter);
|
||||
UNREFERENCED_PARAMETER(flow_context);
|
||||
NET_BUFFER_LIST* nbl = (NET_BUFFER_LIST*)layer_data;
|
||||
NET_BUFFER* net_buffer = NULL;
|
||||
uint8_t* packet_buffer;
|
||||
uint32_t result = 0;
|
||||
|
||||
if (!_ebpf_xdp_hook_provider_registration.invoke_hook)
|
||||
goto done;
|
||||
|
||||
if (nbl == NULL) {
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "Null nbl \n"));
|
||||
goto done;
|
||||
}
|
||||
|
||||
net_buffer = NET_BUFFER_LIST_FIRST_NB(nbl);
|
||||
if (net_buffer == NULL) {
|
||||
KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "net_buffer not present\n"));
|
||||
// nothing to do
|
||||
goto done;
|
||||
}
|
||||
|
||||
packet_buffer = NdisGetDataBuffer(net_buffer, net_buffer->DataLength, NULL, sizeof(uint16_t), 0);
|
||||
|
||||
xdp_md_t ctx = {(uint64_t)packet_buffer, (uint64_t)packet_buffer + net_buffer->DataLength};
|
||||
|
||||
if (_ebpf_xdp_hook_provider_registration.invoke_hook(
|
||||
_ebpf_xdp_hook_provider_registration.client_binding_context, &ctx, &result) == EBPF_ERROR_SUCCESS) {
|
||||
switch (result) {
|
||||
case XDP_PASS:
|
||||
action = FWP_ACTION_PERMIT;
|
||||
break;
|
||||
case XDP_DROP:
|
||||
action = FWP_ACTION_BLOCK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
done:
|
||||
classify_output->actionType = action;
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_resource_truncate_appid(bind_md_t* ctx)
|
||||
{
|
||||
wchar_t* last_separator = (wchar_t*)ctx->app_id_start;
|
||||
for (wchar_t* position = (wchar_t*)ctx->app_id_start; position < (wchar_t*)ctx->app_id_end; position++) {
|
||||
if (*position == '\\') {
|
||||
last_separator = position;
|
||||
}
|
||||
}
|
||||
if (*last_separator == '\\') {
|
||||
last_separator++;
|
||||
}
|
||||
ctx->app_id_start = (uint64_t)last_separator;
|
||||
}
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_resource_allocation_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output)
|
||||
/* ++
|
||||
|
||||
A simple classify function at the WFP Resource Allocation layer.
|
||||
|
||||
-- */
|
||||
{
|
||||
SOCKADDR_IN addr = {AF_INET};
|
||||
uint32_t result;
|
||||
bind_md_t ctx;
|
||||
|
||||
UNREFERENCED_PARAMETER(layer_data);
|
||||
UNREFERENCED_PARAMETER(classify_context);
|
||||
UNREFERENCED_PARAMETER(filter);
|
||||
UNREFERENCED_PARAMETER(flow_context);
|
||||
|
||||
if (!_ebpf_bind_hook_provider_registration.invoke_hook) {
|
||||
classify_output->actionType = FWP_ACTION_PERMIT;
|
||||
return;
|
||||
}
|
||||
|
||||
addr.sin_port =
|
||||
incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_IP_LOCAL_PORT].value.uint16;
|
||||
addr.sin_addr.S_un.S_addr =
|
||||
incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_IP_LOCAL_ADDRESS].value.uint32;
|
||||
|
||||
ctx.process_id = incoming_metadata_values->processId;
|
||||
memcpy(&ctx.socket_address, &addr, sizeof(addr));
|
||||
ctx.operation = BIND_OPERATION_BIND;
|
||||
ctx.protocol = incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_IP_PROTOCOL].value.uint8;
|
||||
|
||||
ctx.app_id_start = (uint64_t)incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_ALE_APP_ID]
|
||||
.value.byteBlob->data;
|
||||
ctx.app_id_end =
|
||||
ctx.app_id_start +
|
||||
incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_ASSIGNMENT_V4_ALE_APP_ID].value.byteBlob->size;
|
||||
|
||||
_net_ebpf_ext_resource_truncate_appid(&ctx);
|
||||
if (_ebpf_bind_hook_provider_registration.invoke_hook(
|
||||
_ebpf_bind_hook_provider_registration.client_binding_context, &ctx, &result) == EBPF_ERROR_SUCCESS) {
|
||||
switch (result) {
|
||||
case BIND_PERMIT:
|
||||
case BIND_REDIRECT:
|
||||
classify_output->actionType = FWP_ACTION_PERMIT;
|
||||
break;
|
||||
case BIND_DENY:
|
||||
classify_output->actionType = FWP_ACTION_BLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_resource_release_classify(
|
||||
_In_ const FWPS_INCOMING_VALUES* incoming_fixed_values,
|
||||
_In_ const FWPS_INCOMING_METADATA_VALUES* incoming_metadata_values,
|
||||
_Inout_opt_ void* layer_data,
|
||||
_In_opt_ const void* classify_context,
|
||||
_In_ const FWPS_FILTER* filter,
|
||||
uint64_t flow_context,
|
||||
_Inout_ FWPS_CLASSIFY_OUT* classify_output)
|
||||
/* ++
|
||||
|
||||
A simple classify function at the WFP Resource Release layer.
|
||||
|
||||
-- */
|
||||
{
|
||||
SOCKADDR_IN addr = {AF_INET};
|
||||
uint32_t result;
|
||||
bind_md_t ctx;
|
||||
|
||||
UNREFERENCED_PARAMETER(layer_data);
|
||||
UNREFERENCED_PARAMETER(classify_context);
|
||||
UNREFERENCED_PARAMETER(filter);
|
||||
UNREFERENCED_PARAMETER(flow_context);
|
||||
|
||||
if (!_ebpf_bind_hook_provider_registration.invoke_hook) {
|
||||
classify_output->actionType = FWP_ACTION_PERMIT;
|
||||
return;
|
||||
}
|
||||
|
||||
addr.sin_port = incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_IP_LOCAL_PORT].value.uint16;
|
||||
addr.sin_addr.S_un.S_addr =
|
||||
incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_IP_LOCAL_ADDRESS].value.uint32;
|
||||
|
||||
ctx.process_id = incoming_metadata_values->processId;
|
||||
memcpy(&ctx.socket_address, &addr, sizeof(addr));
|
||||
ctx.operation = BIND_OPERATION_UNBIND;
|
||||
ctx.protocol = incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_IP_PROTOCOL].value.uint8;
|
||||
|
||||
ctx.app_id_start = (uint64_t)incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_ALE_APP_ID]
|
||||
.value.byteBlob->data;
|
||||
ctx.app_id_end =
|
||||
ctx.app_id_start +
|
||||
incoming_fixed_values->incomingValue[FWPS_FIELD_ALE_RESOURCE_RELEASE_V4_ALE_APP_ID].value.byteBlob->size;
|
||||
|
||||
_net_ebpf_ext_resource_truncate_appid(&ctx);
|
||||
_ebpf_bind_hook_provider_registration.invoke_hook(
|
||||
_ebpf_bind_hook_provider_registration.client_binding_context, &ctx, &result);
|
||||
|
||||
classify_output->actionType = FWP_ACTION_PERMIT;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
_net_ebpf_ext_no_op_notify(
|
||||
FWPS_CALLOUT_NOTIFY_TYPE callout_notification_type, _In_ const GUID* filter_key, _Inout_ const FWPS_FILTER* filter)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(callout_notification_type);
|
||||
UNREFERENCED_PARAMETER(filter_key);
|
||||
UNREFERENCED_PARAMETER(filter);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
_net_ebpf_ext_no_op_flow_delete(uint16_t layer_id, uint32_t fwpm_callout_id, uint64_t flow_context)
|
||||
/* ++
|
||||
|
||||
This is the flowDeleteFn function of the L2 callout.
|
||||
|
||||
-- */
|
||||
{
|
||||
UNREFERENCED_PARAMETER(layer_id);
|
||||
UNREFERENCED_PARAMETER(fwpm_callout_id);
|
||||
UNREFERENCED_PARAMETER(flow_context);
|
||||
return;
|
||||
}
|
||||
|
||||
ebpf_error_code_t
|
||||
_net_ebpf_ext_provider_client_attach_callback(
|
||||
void* context,
|
||||
const GUID* client_id,
|
||||
void* client_binding_context,
|
||||
const ebpf_extension_data_t* client_data,
|
||||
const ebpf_extension_dispatch_table_t* client_dispatch_table)
|
||||
{
|
||||
net_ebpf_ext_hook_provider_registration_t* hook_registration = (net_ebpf_ext_hook_provider_registration_t*)context;
|
||||
if (hook_registration->client_binding_context)
|
||||
return EBPF_ERROR_EXTENSION_FAILED_TO_LOAD;
|
||||
|
||||
hook_registration->client_binding_context = client_binding_context;
|
||||
hook_registration->client_id = *client_id;
|
||||
hook_registration->client_data = client_data;
|
||||
hook_registration->invoke_hook =
|
||||
(const ebpf_error_code_t(__cdecl*)(void*, void*, UINT32*))client_dispatch_table->function[0];
|
||||
|
||||
return EBPF_ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
ebpf_error_code_t
|
||||
_net_ebpf_ext_provider_client_detach_callback(void* context, const GUID* client_id)
|
||||
{
|
||||
net_ebpf_ext_hook_provider_registration_t* hook_registration = (net_ebpf_ext_hook_provider_registration_t*)context;
|
||||
UNREFERENCED_PARAMETER(client_id);
|
||||
hook_registration->client_binding_context = NULL;
|
||||
hook_registration->client_data = NULL;
|
||||
hook_registration->invoke_hook = NULL;
|
||||
|
||||
return EBPF_ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
net_ebpf_ext_register_providers()
|
||||
{
|
||||
ebpf_error_code_t return_value;
|
||||
return_value = ebpf_provider_load(
|
||||
&_ebpf_xdp_hook_provider_registration.provider,
|
||||
&EBPF_ATTACH_TYPE_XDP,
|
||||
&_ebpf_xdp_hook_provider_registration,
|
||||
_ebpf_xdp_hook_provider_registration.provider_data,
|
||||
NULL,
|
||||
&_ebpf_xdp_hook_provider_registration,
|
||||
_net_ebpf_ext_provider_client_attach_callback,
|
||||
_net_ebpf_ext_provider_client_detach_callback);
|
||||
|
||||
if (return_value != EBPF_ERROR_SUCCESS) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
return_value = ebpf_provider_load(
|
||||
&_ebpf_bind_hook_provider_registration.provider,
|
||||
&EBPF_ATTACH_TYPE_BIND,
|
||||
&_ebpf_bind_hook_provider_registration,
|
||||
_ebpf_bind_hook_provider_registration.provider_data,
|
||||
NULL,
|
||||
&_ebpf_bind_hook_provider_registration,
|
||||
_net_ebpf_ext_provider_client_attach_callback,
|
||||
_net_ebpf_ext_provider_client_detach_callback);
|
||||
|
||||
Done:
|
||||
if (return_value != EBPF_ERROR_SUCCESS) {
|
||||
net_ebpf_ext_unregister_providers();
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
} else
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
net_ebpf_ext_unregister_providers()
|
||||
{
|
||||
ebpf_provider_unload(_ebpf_xdp_hook_provider_registration.provider);
|
||||
ebpf_provider_unload(_ebpf_bind_hook_provider_registration.provider);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
net_ebpf_ext_program_information_provider_register()
|
||||
{
|
||||
ebpf_error_code_t return_value;
|
||||
return_value = ebpf_provider_load(
|
||||
&_ebpf_xdp_program_information_provider,
|
||||
&EBPF_PROGRAM_TYPE_XDP,
|
||||
NULL,
|
||||
&_ebpf_xdp_program_information_provider_data,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (return_value != EBPF_ERROR_SUCCESS) {
|
||||
goto Done;
|
||||
}
|
||||
return_value = ebpf_provider_load(
|
||||
&_ebpf_bind_program_information_provider,
|
||||
&EBPF_PROGRAM_TYPE_BIND,
|
||||
NULL,
|
||||
&_ebpf_bind_program_information_provider_data,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (return_value != EBPF_ERROR_SUCCESS) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
Done:
|
||||
if (return_value != EBPF_ERROR_SUCCESS) {
|
||||
net_ebpf_ext_program_information_provider_unregister();
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
} else
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
net_ebpf_ext_program_information_provider_unregister()
|
||||
{
|
||||
ebpf_provider_unload(_ebpf_xdp_program_information_provider);
|
||||
ebpf_provider_unload(_ebpf_bind_program_information_provider);
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/*++
|
||||
|
||||
Abstract:
|
||||
|
||||
Header file for structures/prototypes of the driver.
|
||||
|
||||
|
||||
Environment:
|
||||
|
||||
Kernel mode
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ntddk.h>
|
||||
|
||||
//
|
||||
// Shared function prototypes
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Register for the WFP callouts used to power hooks.
|
||||
*
|
||||
* @param[in] device_object Device object used by this driver.
|
||||
* @retval STATUS_SUCCESS Operation succeeded.
|
||||
* @retval FWP_E_* A Windows Filtering Platform (WFP) specific error.
|
||||
*/
|
||||
NTSTATUS
|
||||
net_ebpf_ext_register_callouts(_Inout_ void* device_object);
|
||||
|
||||
/**
|
||||
* @brief Unregister the WFP callouts.
|
||||
*
|
||||
*/
|
||||
void
|
||||
net_ebpf_ext_unregister_callouts(void);
|
||||
|
||||
/**
|
||||
* @brief Register hook providers with eBPF core.
|
||||
*
|
||||
* @retval STATUS_SUCCESS Operation succeeded.
|
||||
* @retval STATUS_UNSUCCESSFUL Operation failed.
|
||||
*/
|
||||
NTSTATUS
|
||||
net_ebpf_ext_register_providers();
|
||||
|
||||
/**
|
||||
* @brief Unregister hook providers from eBPF core.
|
||||
*
|
||||
*/
|
||||
void
|
||||
net_ebpf_ext_unregister_providers();
|
||||
|
||||
/**
|
||||
* @brief Register program information providers with eBPF core.
|
||||
*
|
||||
* @retval STATUS_SUCCESS Operation succeeded.
|
||||
* @retval STATUS_UNSUCCESSFUL Operation failed.
|
||||
*/
|
||||
NTSTATUS
|
||||
net_ebpf_ext_program_information_provider_register();
|
||||
|
||||
/**
|
||||
* @brief Unregister program information providers from eBPF core.
|
||||
*
|
||||
*/
|
||||
void
|
||||
net_ebpf_ext_program_information_provider_unregister();
|
|
@ -87,7 +87,7 @@
|
|||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\kernel</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)include;$(SolutionDir)include\kernel</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\kernel</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SolutionDir)include;$(SolutionDir)include\kernel</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions);BINARY_COMPATIBLE=0;NT;UNICODE;_UNICODE;NDIS60;POOL_NX_OPTIN_AUTO</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
|
@ -135,11 +135,11 @@
|
|||
<ClInclude Include="net_ebpf_ext.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\libs\platform\kernel\platform_kernel.vcxproj">
|
||||
<ProjectReference Include="..\libs\platform\kernel\platform_kernel.vcxproj">
|
||||
<Project>{fc3f9998-4085-4767-8386-5453f07c3aad}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -23,12 +23,20 @@
|
|||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ebpf_drv.c">
|
||||
<ClCompile Include="net_ebpf_ext_drv.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="net_ebpf_ext.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Inf Include="EbpfCore.inf">
|
||||
<ClInclude Include="net_ebpf_ext.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Inf Include="NetEbpfExt.inf">
|
||||
<Filter>Driver Files</Filter>
|
||||
</Inf>
|
||||
</ItemGroup>
|
|
@ -4,7 +4,7 @@
|
|||
SPDX-License-Identifier: MIT
|
||||
-->
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props" Condition="Exists('..\..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props')" />
|
||||
<Import Project="..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props" Condition="Exists('..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props')" />
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src\ebpf\include;$(SolutionDir)src\ebpf\include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)include\user;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ebpf-verifier\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
|
@ -106,25 +106,25 @@
|
|||
<ClCompile Include="mock.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\external\ebpf-verifier\build\ebpfverifier.vcxproj">
|
||||
<ProjectReference Include="..\..\external\ebpf-verifier\build\ebpfverifier.vcxproj">
|
||||
<Project>{7d5b4e68-c0fa-3f86-9405-f6400219b440}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\api\api.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\api\api.vcxproj">
|
||||
<Project>{c8bf60c3-40a9-43ad-891a-8aa34f1c3a68}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\epoch\user\epoch_user.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\epoch\user\epoch_user.vcxproj">
|
||||
<Project>{a7e21439-b561-43f0-9ddd-237425f42bcd}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\execution_context\user\execution_context_user.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\execution_context\user\execution_context_user.vcxproj">
|
||||
<Project>{18127b0d-8381-4afe-9a3a-cf53241992d3}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\maps\user\maps_user.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\maps\user\maps_user.vcxproj">
|
||||
<Project>{ebc4b40c-2319-4f7e-9531-8232ef8b87f4}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\platform\user\platform_user.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\platform\user\platform_user.vcxproj">
|
||||
<Project>{c26cb6a9-158c-4a9e-a243-755ddd98e5fe}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\ebpf\libs\ubpf\user\ubpf_user.vcxproj">
|
||||
<ProjectReference Include="..\..\libs\ubpf\user\ubpf_user.vcxproj">
|
||||
<Project>{245f0ec7-1ebc-4d68-8b1f-f758ea9196ae}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\sample\sample.vcxproj">
|
||||
|
@ -143,6 +143,6 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CatchOrg.Catch.2.8.0\build\native\CatchOrg.Catch.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче