Fixes for Building Kernel Mode in OS (#129)

Fixes a number of build breaks in the OS repo from recent kernel mode code refactoring.
This commit is contained in:
Nick Banks 2020-02-12 12:25:43 -08:00 коммит произвёл GitHub
Родитель 51d021f092
Коммит 8160a29ae6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 47 добавлений и 30 удалений

Просмотреть файл

@ -9,13 +9,6 @@ Abstract:
--*/
#include <ntverp.h>
#include <ntosp.h>
#include <ntstrsafe.h>
#include <WppRecorder.h>
#include <wdf.h>
#include <netioapi.h>
#include "quic_platform.h"
#include "quic_trace.h"

Просмотреть файл

@ -1375,8 +1375,8 @@ QuicCryptoProcessData(
&BufferCount,
&Buffer);
QUIC_TEL_ASSERT(DataAvailable);
UNREFERENCED_PARAMETER(DataAvailable);
QUIC_TEL_ASSERT(DataAvailable);
QUIC_DBG_ASSERT(BufferCount == 1);
QUIC_CONNECTION* Connection = QuicCryptoGetConnection(Crypto);

Просмотреть файл

@ -35,20 +35,11 @@ typedef UINT16 uint16_t;
typedef UINT32 uint32_t;
typedef UINT64 uint64_t;
typedef INT_PTR intptr_t;
typedef UINT_PTR uintptr_t;
#define UINT8_MAX 0xffui8
#define UINT16_MAX 0xffffui16
#define UINT32_MAX 0xffffffffui32
#define UINT64_MAX 0xffffffffffffffffui64
#define UINTPTR_MAX MAXUINT_PTR
#define INTPTR_MAX MAXINT_PTR
#undef SIZE_MAX
#define SIZE_MAX UINTPTR_MAX
#ifndef STATUS_QUIC_HANDSHAKE_FAILURE
#define STATUS_QUIC_HANDSHAKE_FAILURE ((NTSTATUS)0xC0240000L)
#endif

Просмотреть файл

@ -29,6 +29,10 @@ Environment:
textual reference to the "WPP_INIT_TRACING();" macro.
*/
typedef enum _SYSTEM_INFORMATION_CLASS {
SystemBasicInformation = 0
} SYSTEM_INFORMATION_CLASS;
NTSYSAPI // Copied from zwapi.h.
NTSTATUS
NTAPI
@ -39,6 +43,30 @@ ZwQuerySystemInformation (
__out_opt PULONG ReturnLength
);
typedef struct _SYSTEM_BASIC_INFORMATION {
ULONG Reserved;
ULONG TimerResolution;
ULONG PageSize;
//
// WARNING: The following fields are 32-bit and may get
// capped to MAXULONG on systems with a lot of RAM!
//
// Use SYSTEM_PHYSICAL_MEMORY_INFORMATION instead.
//
ULONG NumberOfPhysicalPages; // Deprecated, do not use.
ULONG LowestPhysicalPageNumber; // Deprecated, do not use.
ULONG HighestPhysicalPageNumber; // Deprecated, do not use.
ULONG AllocationGranularity;
ULONG_PTR MinimumUserModeAddress;
ULONG_PTR MaximumUserModeAddress;
ULONG_PTR ActiveProcessorsAffinityMask;
CCHAR NumberOfProcessors;
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
uint64_t QuicPlatformPerfFreq;
uint64_t QuicTotalMemory;
QUIC_PLATFORM QuicPlatform = { NULL, NULL };

Просмотреть файл

@ -47,6 +47,24 @@ Environment:
#include <wbasek.h>
#include <secint.h>
#include <winerror.h>
typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS
{
SecApplicationProtocolNegotiationStatus_None,
SecApplicationProtocolNegotiationStatus_Success,
SecApplicationProtocolNegotiationStatus_SelectedClientOnly
} SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS, *PSEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS;
#define MAX_PROTOCOL_ID_SIZE 0xff
typedef struct _SecPkgContext_ApplicationProtocol
{
SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS ProtoNegoStatus; // Application protocol negotiation status
SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT ProtoNegoExt; // Protocol negotiation extension type corresponding to this protocol ID
unsigned char ProtocolIdSize; // Size in bytes of the application protocol ID
unsigned char ProtocolId[MAX_PROTOCOL_ID_SIZE]; // Byte string representing the negotiated application protocol ID
} SecPkgContext_ApplicationProtocol, *PSecPkgContext_ApplicationProtocol;
#endif
#define SCHANNEL_USE_BLACKLISTS

Просмотреть файл

@ -9,13 +9,6 @@ Abstract:
--*/
#include <ntverp.h>
#include <ntosp.h>
#include <ntstrsafe.h>
#include <WppRecorder.h>
#include <wdf.h>
#include <netioapi.h>
#include <msquic.h>
#include <quic_platform.h>
#include <MsQuicTests.h>

Просмотреть файл

@ -9,12 +9,6 @@ Abstract:
--*/
#include <ntverp.h>
#include <ntosp.h>
#include <ntstrsafe.h>
#include <WppRecorder.h>
#include <wdf.h>
#include <netioapi.h>
#include <quic_platform.h>
#include "quic_trace.h"