зеркало из https://github.com/microsoft/msquic.git
Integrate clog in a no-op way, in order to prepare for taking the tool in the near future (#569)
This commit is contained in:
Родитель
247dbe97b3
Коммит
af64e17763
|
@ -17,6 +17,12 @@ jobs:
|
|||
- checkout: self
|
||||
submodules: recursive
|
||||
|
||||
- task: ShellScript@2
|
||||
displayName: Install Powershell
|
||||
condition: eq('${{ parameters.platform }}', 'linux')
|
||||
inputs:
|
||||
scriptPath: scripts/install-powershell.sh
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Prepare Build Machine
|
||||
inputs:
|
||||
|
|
|
@ -13,6 +13,13 @@ steps:
|
|||
itemPattern: drop/${{ parameters.platform }}/${{ parameters.arch }}_*_${{ parameters.tls }}/**
|
||||
downloadPath: $(Build.TempDirectory)
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download CLOG Artifacts
|
||||
inputs:
|
||||
artifactName: drop
|
||||
itemPattern: drop/clog/**
|
||||
downloadPath: $(Build.TempDirectory)
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Move Build Artifacts
|
||||
inputs:
|
||||
|
|
|
@ -12,3 +12,6 @@
|
|||
[submodule "submodules/wil"]
|
||||
path = submodules/wil
|
||||
url = https://github.com/microsoft/wil
|
||||
[submodule "submodules/clog"]
|
||||
path = submodules/clog
|
||||
url = https://github.com/microsoft/CLOG.git
|
||||
|
|
|
@ -118,6 +118,19 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${QUIC_OUTPUT_DIR})
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QUIC_OUTPUT_DIR})
|
||||
|
||||
set(CMAKE_CLOG_OUTPUT_DIRECTORY ${QUIC_BUILD_DIR}/inc)
|
||||
set(CMAKE_CLOG_BINS_DIRECTORY ${QUIC_BUILD_DIR}/submodules/clog)
|
||||
set(CMAKE_CLOG_SIDECAR_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/manifest)
|
||||
set(CLOG_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/clog)
|
||||
set(CLOG_INCLUDE_DIRECTORY ${CLOG_SOURCE_DIRECTORY}/inc)
|
||||
set(CMAKE_CLOG_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/manifest/msquic.clog_config)
|
||||
|
||||
set(MANIFESTED_HEADER_FILENAME ${QUIC_BUILD_DIR}/inc/MsQuicEtw.h)
|
||||
|
||||
add_custom_target(CLOG_GENERATED_FILES
|
||||
COMMENT "CREATED CMAKE Target for CLOG generated files"
|
||||
)
|
||||
|
||||
set(CLANG_GCC_WARNING_FLAGS -Werror -Wall -Wextra -Wformat=2 -Wno-type-limits -Wno-unknown-pragmas -Wno-unused-value CACHE INTERNAL "")
|
||||
set(MSVC_WARNING_FLAGS /WX /W4 /sdl CACHE INTERNAL "")
|
||||
|
||||
|
@ -145,10 +158,12 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||
endif()
|
||||
|
||||
if(QUIC_ENABLE_LOGGING)
|
||||
message(STATUS "Configuring for manifested ETW events and logging")
|
||||
message(STATUS "Configuring for manifested ETW tracing")
|
||||
set(CMAKE_CLOG_CONFIG_PROFILE windows)
|
||||
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_MANIFEST_ETW -DQUIC_LOGS_MANIFEST_ETW")
|
||||
else()
|
||||
message(STATUS "Disabling events and logging")
|
||||
message(STATUS "Disabling tracing")
|
||||
set(CMAKE_CLOG_CONFIG_PROFILE stubs)
|
||||
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB")
|
||||
endif()
|
||||
|
||||
|
@ -217,11 +232,13 @@ else()
|
|||
endif()
|
||||
|
||||
if(QUIC_ENABLE_LOGGING)
|
||||
message(STATUS "Configuring for LTTng tracing")
|
||||
set(CMAKE_CLOG_CONFIG_PROFILE linux)
|
||||
include(FindLTTngUST)
|
||||
message(STATUS "Configuring for LTTng events and disabling logging")
|
||||
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_LTTNG -DQUIC_LOGS_STUB")
|
||||
else()
|
||||
message(STATUS "Disabling events and logging")
|
||||
message(STATUS "Disabling tracing")
|
||||
set(CMAKE_CLOG_CONFIG_PROFILE stubs)
|
||||
set(QUIC_COMMON_FLAGS "${QUIC_COMMON_FLAGS} -DQUIC_EVENTS_STUB -DQUIC_LOGS_STUB")
|
||||
list(APPEND CLANG_GCC_WARNING_FLAGS -Wno-unused-parameter -Wno-unused-variable)
|
||||
endif()
|
||||
|
@ -248,7 +265,10 @@ else()
|
|||
set(QUIC_CXX_FLAGS "${QUIC_COMMON_FLAGS} -std=c++17 -g -Wno-reorder -Wno-sign-compare -Wno-format")
|
||||
endif()
|
||||
|
||||
include_directories(${QUIC_BUILD_DIR}/inc)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/inc)
|
||||
include_directories(${CLOG_INCLUDE_DIRECTORY})
|
||||
include_directories(${CMAKE_CLOG_OUTPUT_DIRECTORY})
|
||||
|
||||
if(QUIC_TLS STREQUAL "openssl")
|
||||
# Configure and build OpenSSL.
|
||||
|
|
|
@ -16,6 +16,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msquic.kernel", "src\bin\wi
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msquictest.kernel", "src\test\bin\winkernel\msquictest.kernel.vcxproj", "{49E98DF4-7BC5-4E0B-8F13-295380652F94}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "manifest.kernel", "src\manifest\manifest.kernel.vcxproj", "{C1ADB76F-7005-4516-BADB-2A60797EF912}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
|
@ -148,6 +150,30 @@ Global
|
|||
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.ActiveCfg = Release|Win32
|
||||
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.Build.0 = Release|Win32
|
||||
{49E98DF4-7BC5-4E0B-8F13-295380652F94}.Release|x86.Deploy.0 = Release|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.Build.0 = Debug|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Debug|x86.Deploy.0 = Debug|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.Build.0 = Release|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.ActiveCfg = Release|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.Build.0 = Release|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x64.Deploy.0 = Release|x64
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.Build.0 = Release|Win32
|
||||
{C1ADB76F-7005-4516-BADB-2A60797EF912}.Release|x86.Deploy.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -234,6 +234,12 @@ function CMake-Build {
|
|||
|
||||
CMake-Execute $Arguments
|
||||
|
||||
# Copy clog to a common location.
|
||||
$ClogPath = $ArtifactsDir = Join-Path $BaseArtifactsDir "clog"
|
||||
if (!(Test-Path $ClogPath)) {
|
||||
Copy-Item (Join-Path $BuildDir "submodules/clog") -Destination $ClogPath -Recurse
|
||||
}
|
||||
|
||||
if ($IsWindows) {
|
||||
Copy-Item (Join-Path $BuildDir "obj" $Config "msquic.lib") $ArtifactsDir
|
||||
if (!$DisableTools) {
|
||||
|
@ -265,6 +271,13 @@ function CMake-Build {
|
|||
# Main Execution #
|
||||
##############################################################
|
||||
|
||||
if (!$IsWindows) {
|
||||
# Set Linux env variables to include dotnet.
|
||||
$env:PATH+=":$HOME/.dotnet"
|
||||
$env:PATH+=":$HOME/.dotnet/tools"
|
||||
$env:DOTNET_ROOT="$HOME/.dotnet/"
|
||||
}
|
||||
|
||||
# Generate the build files.
|
||||
Log "Generating files..."
|
||||
CMake-Generate
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
@echo off
|
||||
|
||||
set QUIC_BUILD_DIR=%1
|
||||
set CMAKE_SOURCE_DIR=%2
|
||||
set CMAKE_PROJECTDIR=%3
|
||||
set SCOPE_PREFIX=%4
|
||||
|
||||
echo QUIC_BUILD_DIR=%QUIC_BUILD_DIR%
|
||||
echo CMAKE_SOURCE_DIR=%CMAKE_SOURCE_DIR%
|
||||
echo CMAKE_PROJECTDIR=%CMAKE_PROJECTDIR%
|
||||
echo SCOPE_PREFIX=%SCOPE_PREFIX%
|
||||
|
||||
set CMAKE_CLOG_OUTPUT_DIRECTORY=%QUIC_BUILD_DIR%\inc
|
||||
set CMAKE_CLOG_BINS_DIRECTORY=%QUIC_BUILD_DIR%\submodules\clog
|
||||
set CMAKE_CLOG_SIDECAR_DIRECTORY=%CMAKE_SOURCE_DIR%\src\manifest
|
||||
set CLOG_SOURCE_DIRECTORY=%CMAKE_SOURCE_DIR%\submodules\clog
|
||||
set CLOG_INCLUDE_DIRECTORY=%CMAKE_SOURCE_DIR%\inc
|
||||
set CMAKE_CLOG_CONFIG_FILE=%CMAKE_SOURCE_DIR%\src\manifest\msquic.clog_config
|
||||
|
||||
echo EnvVars] --------------------------------------------------------------
|
||||
set
|
||||
echo -----------------------------------------------------------------------
|
||||
|
||||
echo %CMAKE_SOURCE_DIR%
|
||||
|
||||
echo Clearing the LIB environment varaible to avoid conflicting with the needs of dotnet
|
||||
set LIB=
|
||||
|
||||
if NOT EXIST %CMAKE_CLOG_BINS_DIRECTORY%\clog.exe (
|
||||
echo Building CLOG
|
||||
echo dotnet build %CLOG_SOURCE_DIRECTORY%\clog.sln\clog_coreclr.sln -o %CMAKE_CLOG_BINS_DIRECTORY%
|
||||
dotnet build %CLOG_SOURCE_DIRECTORY%\clog.sln\clog_coreclr.sln -o %CMAKE_CLOG_BINS_DIRECTORY% > %CMAKE_CLOG_BINS_DIRECTORY%.kernel.build.log
|
||||
)
|
||||
|
||||
pushd %CMAKE_PROJECTDIR%
|
||||
echo CLOG Processing Directory %CMAKE_PROJECTDIR%
|
||||
for %%i in (*.c* *.c operation.h stream.h connection.h TestHelpers.h) do (
|
||||
echo CLOG Processing %%i
|
||||
if EXIST %%i (
|
||||
if NOT EXIST %CMAKE_CLOG_OUTPUT_DIRECTORY%\%%i.clog.h (
|
||||
%CMAKE_CLOG_BINS_DIRECTORY%\clog.exe -p windows_kernel --scopePrefix %SCOPE_PREFIX% -c %CMAKE_CLOG_CONFIG_FILE% -s %CMAKE_CLOG_SIDECAR_DIRECTORY%\clog.sidecar -i %%i -o %CMAKE_CLOG_OUTPUT_DIRECTORY%\%%i.clog.h
|
||||
echo %%i
|
||||
)
|
||||
)
|
||||
)
|
||||
popd
|
|
@ -1,5 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
|
||||
chmod +x ./dotnet-install.sh
|
||||
./dotnet-install.sh -c Current
|
||||
|
||||
export PATH="$PATH:$HOME/.dotnet"
|
||||
export PATH="$PATH:$HOME/.dotnet/tools"
|
||||
export DOTNET_ROOT="$HOME/.dotnet/"
|
||||
|
||||
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
|
||||
sudo dpkg -i packages-microsoft-prod.deb
|
||||
sudo apt-get update
|
||||
|
|
|
@ -19,7 +19,7 @@ target_compile_options(msquic PRIVATE
|
|||
$<$<CXX_COMPILER_ID:MSVC>:
|
||||
${MSVC_WARNING_FLAGS}>)
|
||||
|
||||
target_link_libraries(msquic PRIVATE core platform)
|
||||
target_link_libraries(msquic PRIVATE core platform PLATFORM_CLOG_LIB CORE_CLOG_LIB)
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
target_link_libraries(msquic PUBLIC
|
||||
|
|
|
@ -11,6 +11,9 @@ Abstract:
|
|||
|
||||
#include "quic_platform.h"
|
||||
#include "quic_trace.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "driver.c.clog.h"
|
||||
#endif
|
||||
|
||||
INITCODE
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "quic_platform.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "quic_trace.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
MsQuicLibraryLoad(
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
set(SOURCES
|
||||
ack_tracker.c
|
||||
api.c
|
||||
|
@ -34,12 +37,18 @@ set(SOURCES
|
|||
stream_set.c
|
||||
timer_wheel.c
|
||||
worker.c
|
||||
operation.h
|
||||
stream.h
|
||||
connection.h
|
||||
)
|
||||
|
||||
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
set(SOURCES ${SOURCES} inline.c)
|
||||
endif()
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(CORE_CLOG_LIB ${SOURCES})
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${QUIC_C_FLAGS}")
|
||||
|
||||
add_library(core STATIC ${SOURCES})
|
||||
|
|
|
@ -38,6 +38,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "ack_tracker.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "api.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define IS_SESSION_HANDLE(Handle) \
|
||||
( \
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "binding.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Make sure we will always have enough room to fit our Version Negotiation packet,
|
||||
|
|
|
@ -19,6 +19,9 @@ Future work:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "congestion_control.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// BETA and C from RFC8312. 10x multiples for integer arithmetic.
|
||||
|
|
|
@ -32,6 +32,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "connection.c.clog.h"
|
||||
#endif
|
||||
|
||||
typedef struct QUIC_RECEIVE_PROCESSING_STATE {
|
||||
BOOLEAN ResetIdleTimeout;
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
Licensed under the MIT License.
|
||||
|
||||
--*/
|
||||
#ifdef QUIC_CLOG
|
||||
#include "connection.h.clog.h"
|
||||
#endif
|
||||
|
||||
typedef struct QUIC_LISTENER QUIC_LISTENER;
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "crypto.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_TLS_PROCESS_COMPLETE_CALLBACK QuicTlsProcessDataCompleteCallback;
|
||||
QUIC_TLS_RECEIVE_TP_CALLBACK QuicConnReceiveTP;
|
||||
|
|
|
@ -13,6 +13,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "crypto_tls.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define TLS1_PROTOCOL_VERSION 0x0301
|
||||
#define TLS_MESSAGE_HEADER_LENGTH 4
|
||||
|
|
|
@ -10,9 +10,8 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#ifdef QUIC_LOGS_WPP
|
||||
#include "datagram.tmh"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "datagram.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define DATAGRAM_FRAME_HEADER_LENGTH 3
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "frame.c.clog.h"
|
||||
#endif
|
||||
|
||||
_Post_equal_to_(Buffer + sizeof(uint8_t))
|
||||
uint8_t*
|
||||
|
|
|
@ -15,6 +15,9 @@ Abstract:
|
|||
#include "precomp.h"
|
||||
|
||||
#include <msquic_fuzz.h>
|
||||
#ifdef QUIC_CLOG
|
||||
#include "injection.c.clog.h"
|
||||
#endif
|
||||
|
||||
__declspec(noinline)
|
||||
void
|
||||
|
|
|
@ -16,6 +16,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "inline.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_CID_QUIC_LIST_ENTRY*
|
||||
QuicCidNewDestination(
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "library.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_LIBRARY MsQuicLib = { 0 };
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "listener.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "lookup.c.clog.h"
|
||||
#endif
|
||||
|
||||
typedef struct QUIC_CACHEALIGN QUIC_PARTITIONED_HASHTABLE {
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "loss_detection.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
BOOLEAN
|
||||
|
|
|
@ -23,6 +23,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "operation.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
void
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
--*/
|
||||
|
||||
#ifdef QUIC_CLOG
|
||||
#include "operation.h.clog.h"
|
||||
#endif
|
||||
|
||||
typedef struct QUIC_SEND_REQUEST QUIC_SEND_REQUEST;
|
||||
|
||||
//
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "packet.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// The list of supported QUIC version numbers and associated salts/secrets.
|
||||
|
|
|
@ -13,6 +13,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "packet_builder.c.clog.h"
|
||||
#endif
|
||||
|
||||
#ifdef QUIC_FUZZER
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "packet_space.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -14,6 +14,9 @@ TODO:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "path.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
void
|
||||
|
|
|
@ -11,6 +11,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "range.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define INITIAL_SUBRANGE_COUNT 8
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "recv_buffer.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -20,6 +20,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "registration.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -21,6 +21,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "send.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
void
|
||||
|
|
|
@ -55,6 +55,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "send_buffer.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
void
|
||||
|
|
|
@ -17,6 +17,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "sent_packet_metadata.c.clog.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
QuicSentPacketMetadataReleaseFrames(
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "session.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "settings.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
void
|
||||
|
|
|
@ -11,6 +11,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "stream.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
QUIC_STATUS
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
--*/
|
||||
|
||||
#ifdef QUIC_CLOG
|
||||
#include "stream.h.clog.h"
|
||||
#endif
|
||||
|
||||
typedef struct QUIC_CONNECTION QUIC_CONNECTION;
|
||||
|
||||
//
|
||||
|
|
|
@ -11,6 +11,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "stream_recv.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
BOOLEAN
|
||||
|
|
|
@ -34,6 +34,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "stream_send.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
void
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "stream_set.c.clog.h"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
|
|
|
@ -46,6 +46,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "timer_wheel.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// The initial count of slots in the timer wheel.
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/core)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
|
||||
|
||||
|
@ -16,10 +19,13 @@ set(SOURCES
|
|||
VarIntTest.cpp
|
||||
)
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(MSQUIC_CORETEST ${SOURCES})
|
||||
|
||||
add_executable(msquiccoretest ${SOURCES})
|
||||
|
||||
set_property(TARGET msquiccoretest PROPERTY FOLDER "tests")
|
||||
|
||||
target_link_libraries(msquiccoretest msquic core platform gtest)
|
||||
target_link_libraries(msquiccoretest msquic core platform gtest PLATFORM_CLOG_LIB CORE_CLOG_LIB MSQUIC_CORETEST)
|
||||
|
||||
add_test(msquiccoretest msquiccoretest)
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "FrameTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
struct AckFrameTest : ::testing::TestWithParam<QUIC_FRAME_TYPE> {
|
||||
};
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "PacketNumberTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
struct DecompressEntry {
|
||||
uint64_t HighestReceived;
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "RangeTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
struct SmartRange {
|
||||
QUIC_RANGE range;
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "SpinFrame.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
union QuicV1Frames {
|
||||
QUIC_ACK_EX AckFrame;
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "TransportParamTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
static QUIC_CONNECTION JunkConnection;
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "VarIntTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
uint64_t Encode(uint64_t Value)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "main.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
class QuicCoreTestEnvironment : public ::testing::Environment {
|
||||
public:
|
||||
|
|
|
@ -20,6 +20,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "worker.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Thread callback for processing the work queued for the worker.
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
#include <evntprov.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
_IRQL_requires_same_
|
||||
void
|
||||
NTAPI
|
||||
QuicEtwCallback(
|
||||
_In_ LPCGUID SourceId,
|
||||
_In_ ULONG ControlCode,
|
||||
_In_ UCHAR Level,
|
||||
_In_ ULONGLONG MatchAnyKeyword,
|
||||
_In_ ULONGLONG MatchAllKeyword,
|
||||
_In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData,
|
||||
_Inout_opt_ PVOID CallbackContext
|
||||
);
|
||||
|
||||
//
|
||||
// Defining MCGEN_PRIVATE_ENABLE_CALLBACK_V2, makes McGenControlCallbackV2
|
||||
// call our user-defined callback routine. See MsQuicEvents.h.
|
||||
//
|
||||
#define MCGEN_PRIVATE_ENABLE_CALLBACK_V2 QuicEtwCallback
|
||||
|
||||
#pragma warning(push) // Don't care about warnings from generated files
|
||||
#pragma warning(disable:6001)
|
||||
#pragma warning(disable:26451)
|
||||
#include "MsQuicEtw.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
#define QuicTraceEventEnabled(Name) TRUE //EventEnabledQuic##Name()
|
||||
|
||||
#define LOG_ADDR_LEN(Addr) \
|
||||
(uint8_t)((Addr).si_family == AF_INET6 ? sizeof(SOCKADDR_IN6) : sizeof(SOCKADDR_IN))
|
|
@ -0,0 +1,13 @@
|
|||
set SOLUTION_DIR=%1
|
||||
set PLATFORM_ARG=%2
|
||||
set CONFIGURATION_ARG=%3
|
||||
set QUIC_BUILD_DIR=%SOLUTION_DIR%\build\winkernel\%PLATFORM_ARG%_%CONFIGURATION_ARG%_schannel
|
||||
|
||||
mkdir %QUIC_BUILD_DIR%\inc
|
||||
mc.exe -um -h %QUIC_BUILD_DIR%\inc -r %QUIC_BUILD_DIR%\inc %SOLUTION_DIR%\src\manifest\MsQuicEtw.man
|
||||
|
||||
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\core CORE
|
||||
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\platform PLATFORM
|
||||
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\bin\winkernel BIN
|
||||
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\test\bin\winkernel TEST_BIN
|
||||
cmd /c %SOLUTION_DIR%\scripts\generate_kernel_clog.bat %QUIC_BUILD_DIR% %SOLUTION_DIR% %SOLUTION_DIR%\src\test\lib TEST_LIB
|
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{c1adb76f-7005-4516-badb-2a60797ef912}</ProjectGuid>
|
||||
<TemplateGuid>{0a049372-4c4d-4ea0-a64e-dc6ad88ceca1}</TemplateGuid>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<DriverType>KMDF</DriverType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<TargetVersion>Windows10</TargetVersion>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<DriverTargetPlatform>Universal</DriverTargetPlatform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetName>core</TargetName>
|
||||
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\obj\$(ProjectName)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\lib\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)_schannel\inc;..\..\submodules\clog\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<PreBuildEvent>
|
||||
<Command>cmd /C $(SolutionDir)\src\manifest\create_kernel_clog_dependencies.bat $(SolutionDir) $(Platform) $(Configuration)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>QUIC_EVENTS_MANIFEST_ETW;SECURITY_KERNEL;SECURITY_WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>QUIC_EVENTS_MANIFEST_ETW;SECURITY_KERNEL;SECURITY_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
|
@ -0,0 +1,80 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
Licensed under the MIT License.
|
||||
|
||||
--*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace msquic.clog_config
|
||||
{
|
||||
public class Types
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct SocketAddress
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public ushort si_family;
|
||||
|
||||
[FieldOffset(2)]
|
||||
public ushort sin_port;
|
||||
|
||||
// IPv4
|
||||
[FieldOffset(4)]
|
||||
public ulong S_addr;
|
||||
|
||||
|
||||
// IPv6
|
||||
[FieldOffset(4)]
|
||||
public ulong sin6_flowinfo;
|
||||
|
||||
[FieldOffset(8)]
|
||||
public ulong S_v6Addr1;
|
||||
|
||||
[FieldOffset(16)]
|
||||
public ulong S_v6Addr2;
|
||||
};
|
||||
|
||||
public static string QUIC_FLAGS(uint value)
|
||||
{
|
||||
return "QUIC_FLAGS (good!) " + value;
|
||||
}
|
||||
|
||||
public static string QUIC_IP_ADDR(byte[] value)
|
||||
{
|
||||
int len = value.Length;
|
||||
IntPtr i = System.Runtime.InteropServices.Marshal.AllocHGlobal(len);
|
||||
System.Runtime.InteropServices.Marshal.Copy(value, 0, i, len);
|
||||
string msg = "";
|
||||
SocketAddress sa2 = (SocketAddress)System.Runtime.InteropServices.Marshal.PtrToStructure(i, typeof(SocketAddress));
|
||||
|
||||
switch (sa2.si_family)
|
||||
{
|
||||
case 0: //<--unspecified
|
||||
msg += "Unspecified";
|
||||
break;
|
||||
case 23: //<--v6
|
||||
msg += "IPV6: sin6_flowinfo=" + sa2.sin6_flowinfo + " port=" + sa2.sin_port + "part1=" + sa2.S_v6Addr1 + ", part2=" + sa2.S_v6Addr2;
|
||||
break;
|
||||
case 10: //<--v6 (linux)
|
||||
msg += "IPV6: sin6_flowinfo=" + sa2.sin6_flowinfo + " port=" + sa2.sin_port + "part1=" + sa2.S_v6Addr1 + ", part2=" + sa2.S_v6Addr2;
|
||||
break;
|
||||
case 2: //< --v4
|
||||
msg += "IPV4:" + sa2.S_addr + ":" + sa2.sin_port;
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid SI_FAMILY : " + sa2.si_family);
|
||||
}
|
||||
|
||||
System.Runtime.InteropServices.Marshal.FreeHGlobal(i);
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static string DecodeCID(byte [] value)
|
||||
{
|
||||
return "CID!";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"MacroConfigurations": {
|
||||
"lttng_plus": {
|
||||
"Modules": [
|
||||
{
|
||||
"ExportModule": "LTTNG",
|
||||
"CustomSettings": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"empty": {
|
||||
"Modules": []
|
||||
},
|
||||
"etw_only": {
|
||||
"Modules": [
|
||||
{
|
||||
"ExportModule": "MANIFESTED_ETW",
|
||||
"CustomSettings": {
|
||||
"ETWManifestFile": "MsQuicEtw.man",
|
||||
"ETW_Provider": "ff15e657-4f26-570e-88ab-0796b258d11c",
|
||||
"Level": "win:Informational",
|
||||
"Keywords": "ut:Connection ut:LowVolume"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"etw_plus": {
|
||||
"Modules": [
|
||||
{
|
||||
"ExportModule": "MANIFESTED_ETW",
|
||||
"CustomSettings": {
|
||||
"ETWManifestFile": "MsQuicEtw.man",
|
||||
"ETW_Provider": "ff15e657-4f26-570e-88ab-0796b258d11c",
|
||||
"Level": "win:Informational",
|
||||
"Keywords": "ut:Connection ut:LowVolume"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Version": 1,
|
||||
"CustomTypeClogCSharpFile": "msquic.clog.cs",
|
||||
"TypeEncoders": {
|
||||
"Version": 0,
|
||||
"TypeEncoder": [
|
||||
{
|
||||
"EncodingType": "ByteArray",
|
||||
"CType": "CLOG_PTR",
|
||||
"DefinationEncoding": "!SOCKADDR!",
|
||||
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
|
||||
},
|
||||
{
|
||||
"EncodingType": "ByteArray",
|
||||
"CType": "CLOG_PTR",
|
||||
"DefinationEncoding": "!IPV4ADDR!",
|
||||
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
|
||||
},
|
||||
{
|
||||
"EncodingType": "ByteArray",
|
||||
"CType": "CLOG_PTR",
|
||||
"DefinationEncoding": "!IPV6ADDR!",
|
||||
"CustomDecoder": "msquic.clog_config.Types.QUIC_IP_ADDR"
|
||||
},
|
||||
{
|
||||
"EncodingType": "ByteArray",
|
||||
"CType": "CLOG_PTR",
|
||||
"DefinationEncoding": "!CID!",
|
||||
"CustomDecoder": "msquic.clog_config.Types.DecodeCID"
|
||||
},
|
||||
{
|
||||
"EncodingType": "UInt32",
|
||||
"CType": "CLOG_UINT32",
|
||||
"DefinationEncoding": "03u"
|
||||
}
|
||||
]
|
||||
},
|
||||
"SourceCodeMacros": [
|
||||
],
|
||||
"ChainedConfigFiles": [
|
||||
"../../submodules/clog/inc/defaults.clog_config"
|
||||
]
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
set(SOURCES
|
||||
datapath_winuser.c
|
||||
|
@ -49,6 +52,9 @@ endif()
|
|||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${QUIC_C_FLAGS}")
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(PLATFORM_CLOG_LIB ${SOURCES})
|
||||
|
||||
add_library(platform STATIC ${SOURCES})
|
||||
|
||||
set_property(TARGET platform PROPERTY FOLDER "libraries")
|
||||
|
|
|
@ -15,6 +15,9 @@ Environment:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "cert_capi.c.clog.h"
|
||||
#endif
|
||||
|
||||
#include <wincrypt.h>
|
||||
#include <msquic.h>
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "cert_openssl.c.clog.h"
|
||||
#endif
|
||||
|
||||
#include <mitlsffi.h>
|
||||
#include <mipki.h>
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "cert_stub.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_STATUS
|
||||
QuicCertCreate(
|
||||
|
|
|
@ -21,6 +21,9 @@ Environment:
|
|||
#include <linux/in6.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "quic_platform_dispatch.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "datapath_linux.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_STATIC_ASSERT((SIZEOF_STRUCT_MEMBER(QUIC_BUFFER, Length) <= sizeof(size_t)), "(sizeof(QUIC_BUFFER.Length) == sizeof(size_t) must be TRUE.");
|
||||
QUIC_STATIC_ASSERT((SIZEOF_STRUCT_MEMBER(QUIC_BUFFER, Buffer) == sizeof(void*)), "(sizeof(QUIC_BUFFER.Buffer) == sizeof(void*) must be TRUE.");
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "datapath_winkernel.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Not yet available in the WDK. When available this code can be removed.
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "datapath_winuser.c.clog.h"
|
||||
#endif
|
||||
|
||||
#ifdef QUIC_FUZZER
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ Notes:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "hashtable.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define QUIC_HASH_RESERVED_SIGNATURE 0
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "inline.c.clog.h"
|
||||
#endif
|
||||
|
||||
uint16_t
|
||||
MaxUdpPayloadSizeFromMTU(
|
||||
|
|
|
@ -23,6 +23,9 @@ Environment:
|
|||
#include <syslog.h>
|
||||
#include "quic_trace.h"
|
||||
#include "quic_platform_dispatch.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "platform_linux.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define QUIC_MAX_LOG_MSG_LEN 1024 // Bytes
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@ Environment:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "platform_winkernel.c.clog.h"
|
||||
#endif
|
||||
|
||||
typedef enum _SYSTEM_INFORMATION_CLASS {
|
||||
SystemBasicInformation = 0
|
||||
|
|
|
@ -14,6 +14,9 @@ Environment:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "platform_winuser.c.clog.h"
|
||||
#endif
|
||||
|
||||
uint64_t QuicPlatformPerfFreq;
|
||||
uint64_t QuicTotalMemory;
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
#define QUIC_TEST_APIS 1
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "selfsign_capi.c.clog.h"
|
||||
#endif
|
||||
|
||||
#include <wincrypt.h>
|
||||
#include <msquic.h>
|
||||
|
|
|
@ -18,6 +18,9 @@ Abstract:
|
|||
#include "openssl/rsa.h"
|
||||
#include "openssl/x509.h"
|
||||
#include "openssl/pem.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "selfsign_openssl.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Generates a self signed cert using low level OpenSSL APIs.
|
||||
|
|
|
@ -12,6 +12,9 @@ Abstract:
|
|||
#define QUIC_TEST_APIS 1
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "selfsign_stub.c.clog.h"
|
||||
#endif
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
QUIC_SEC_CONFIG_PARAMS*
|
||||
|
|
|
@ -15,6 +15,9 @@ Environment:
|
|||
|
||||
#define _GNU_SOURCE
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "storage_linux.c.clog.h"
|
||||
#endif
|
||||
|
||||
QUIC_STATUS
|
||||
QuicStorageOpen(
|
||||
|
|
|
@ -16,6 +16,9 @@ Environment:
|
|||
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "storage_winkernel.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Copied from wdm.h
|
||||
|
|
|
@ -16,6 +16,9 @@ Environment:
|
|||
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "storage_winuser.c.clog.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
NTAPI
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "tls_mitls.c.clog.h"
|
||||
#endif
|
||||
|
||||
#define IS_WINDOWS 1
|
||||
#pragma warning(disable:4996) // Deprecated APIs
|
||||
|
|
|
@ -16,6 +16,9 @@ Abstract:
|
|||
#include "openssl/rsa.h"
|
||||
#include "openssl/x509.h"
|
||||
#include "openssl/pem.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "tls_openssl.c.clog.h"
|
||||
#endif
|
||||
|
||||
uint16_t QuicTlsTPHeaderSize = 0;
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@ Environment:
|
|||
|
||||
#include "platform_internal.h"
|
||||
#include <security.h>
|
||||
#ifdef QUIC_CLOG
|
||||
#include "tls_schannel.c.clog.h"
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL_MODE
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "tls_stub.c.clog.h"
|
||||
#endif
|
||||
|
||||
uint16_t QuicTlsTPHeaderSize = 0;
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@ Notes:
|
|||
--*/
|
||||
|
||||
#include "platform_internal.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "toeplitz.c.clog.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Initializes the state required for a Toeplitz hash computation. We
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/platform)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
|
||||
|
||||
|
@ -14,6 +17,9 @@ set(SOURCES
|
|||
TlsTest.cpp
|
||||
)
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(MSQUIC_PLATFORMTEST ${SOURCES})
|
||||
|
||||
add_executable(msquicplatformtest ${SOURCES})
|
||||
|
||||
set_property(TARGET msquicplatformtest PROPERTY FOLDER "tests")
|
||||
|
@ -33,6 +39,6 @@ elseif(QUIC_TLS STREQUAL "mitls")
|
|||
target_link_libraries(msquicplatformtest kremlib evercrypt mitls quiccrypto ncrypt crypt32)
|
||||
endif()
|
||||
|
||||
target_link_libraries(msquicplatformtest msquic platform gtest)
|
||||
target_link_libraries(msquicplatformtest msquic platform gtest MSQUIC_PLATFORMTEST PLATFORM_CLOG_LIB CORE_CLOG_LIB)
|
||||
|
||||
add_test(msquicplatformtest msquicplatformtest)
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
#include "quic_tls.h"
|
||||
|
||||
#include "msquichelper.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "CryptTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
#ifndef QUIC_TLS_STUB
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ Abstract:
|
|||
#include "quic_datapath.h"
|
||||
|
||||
#include "msquic.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "DataPathTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
const uint32_t ExpectedDataSize = 1 * 1024;
|
||||
char* ExpectedData;
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
#include <logcontroller.h>
|
||||
|
||||
#include "quic_trace.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "StorageTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
using namespace WEX::Common;
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
#include "main.h"
|
||||
#include "msquic.h"
|
||||
#include "quic_tls.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "TlsTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
const uint32_t CertValidationIgnoreFlags =
|
||||
QUIC_CERTIFICATE_FLAG_IGNORE_UNKNOWN_CA |
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
--*/
|
||||
|
||||
#include "main.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "main.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
extern "C" _IRQL_requires_max_(PASSIVE_LEVEL) void QuicTraceRundown(void) { }
|
||||
|
||||
|
|
|
@ -1,15 +1,26 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/test)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/submodules/googletest/googletest/include)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")
|
||||
|
||||
add_executable(msquictest quic_gtest.cpp)
|
||||
set(SOURCES
|
||||
quic_gtest.cpp
|
||||
quic_gtest.h
|
||||
)
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(MSQUICTEST_CLOG_LIB ${SOURCES})
|
||||
|
||||
add_executable(msquictest ${SOURCES})
|
||||
|
||||
set_property(TARGET msquictest PROPERTY FOLDER "tests")
|
||||
|
||||
target_link_libraries(msquictest msquic testlib platform gtest)
|
||||
target_link_libraries(msquictest msquic testlib platform gtest PLATFORM_CLOG_LIB MSQUICTEST_CLOG_LIB)
|
||||
|
||||
add_test(msquictest msquictest)
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
--*/
|
||||
|
||||
#include "quic_gtest.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "quic_gtest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
bool TestingKernelMode = false;
|
||||
const QUIC_API_TABLE* MsQuic;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#undef min // gtest headers conflict with previous definitions of min/max.
|
||||
#undef max
|
||||
#include "gtest/gtest.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "quic_gtest.h.clog.h"
|
||||
#endif
|
||||
|
||||
class WithBool : public testing::Test,
|
||||
public testing::WithParamInterface<bool> {
|
||||
|
|
|
@ -13,6 +13,9 @@ Abstract:
|
|||
#include <MsQuicTests.h>
|
||||
|
||||
#include "quic_trace.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "control.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
const QUIC_API_TABLE* MsQuic;
|
||||
HQUIC Registration;
|
||||
|
|
|
@ -13,6 +13,9 @@ Abstract:
|
|||
#include <MsQuicTests.h>
|
||||
|
||||
#include "quic_trace.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "driver.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
#define QUIC_TEST_TAG 'tsTQ' // QTst
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "ApiTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
#pragma warning(disable:6387) // '_Param_(1)' could be '0': this does not adhere to the specification for the function
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "BasicTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
_Function_class_(NEW_CONNECTION_CALLBACK)
|
||||
static
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Include for CLOG processing
|
||||
include("${CLOG_INCLUDE_DIRECTORY}/CLog.make")
|
||||
|
||||
set(SOURCES
|
||||
ApiTest.cpp
|
||||
BasicTest.cpp
|
||||
|
@ -13,12 +16,16 @@ set(SOURCES
|
|||
TestConnection.cpp
|
||||
TestListener.cpp
|
||||
TestStream.cpp
|
||||
TestHelpers.h
|
||||
)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src/test)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QUIC_CXX_FLAGS}")
|
||||
|
||||
# Allow CLOG to preprocess all the source files.
|
||||
CLOG_ADD_SOURCEFILE(TESTLIB_CLOG_LIB ${SOURCES})
|
||||
|
||||
add_library(testlib ${SOURCES})
|
||||
|
||||
set_property(TARGET testlib PROPERTY FOLDER "tests")
|
||||
|
|
|
@ -10,6 +10,9 @@ Abstract:
|
|||
--*/
|
||||
|
||||
#include "precomp.h"
|
||||
#ifdef QUIC_CLOG
|
||||
#include "DataTest.cpp.clog.h"
|
||||
#endif
|
||||
|
||||
struct ServerAcceptContext {
|
||||
QUIC_EVENT NewConnectionReady;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче