diff --git a/Cargo.toml b/Cargo.toml index 9188ecd5be..c66bf3f00d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,13 @@ include = [ "/THIRD-PARTY-NOTICES", ] +[workspace] +members = [ + ".", + "crates/tools/api", + "crates/libs/msquic-rs" +] + [build-dependencies] cmake = "0.1" diff --git a/crates/.metadata/MsQuic.Win32.c b/crates/.metadata/MsQuic.Win32.c new file mode 100644 index 0000000000..017a9a2ed7 --- /dev/null +++ b/crates/.metadata/MsQuic.Win32.c @@ -0,0 +1 @@ +#include "MsQuic.Win32.h" \ No newline at end of file diff --git a/crates/.metadata/MsQuic.Win32.h b/crates/.metadata/MsQuic.Win32.h new file mode 100644 index 0000000000..3875d974ab --- /dev/null +++ b/crates/.metadata/MsQuic.Win32.h @@ -0,0 +1,42 @@ +#include "winerror.h" +#define QUIC_TLS_ALERT_HRESULT_PREFIX _HRESULT_TYPEDEF_(0x80410100L) + +typedef enum { + QUIC_STATUS_SUCCESS = 0x0, // S_OK + QUIC_STATUS_PENDING = 0x703e5, // SUCCESS_HRESULT_FROM_WIN32(ERROR_IO_PENDING) + QUIC_STATUS_CONTINUE = 0x704de, // SUCCESS_HRESULT_FROM_WIN32(ERROR_CONTINUE) + QUIC_STATUS_OUT_OF_MEMORY = 0x8007000e, // E_OUTOFMEMORY + QUIC_STATUS_INVALID_PARAMETER = 0x80070057, // E_INVALIDARG + QUIC_STATUS_INVALID_STATE = 0x8007139f, // E_NOT_VALID_STATE + QUIC_STATUS_NOT_SUPPORTED = 0x80004002, // E_NOINTERFACE + QUIC_STATUS_NOT_FOUND = 0x80070490, // HRESULT_FROM_WIN32(ERROR_NOT_FOUND) + QUIC_STATUS_BUFFER_TOO_SMALL = 0x8007007a, // E_NOT_SUFFICIENT_BUFFER + QUIC_STATUS_HANDSHAKE_FAILURE = 0x80410000, // ERROR_QUIC_HANDSHAKE_FAILURE + QUIC_STATUS_ABORTED = 0x80004004, // E_ABORT + QUIC_STATUS_ADDRESS_IN_USE = 0x80072740, // HRESULT_FROM_WIN32(WSAEADDRINUSE) + QUIC_STATUS_INVALID_ADDRESS = 0x80072741, // HRESULT_FROM_WIN32(WSAEADDRNOTAVAIL) + QUIC_STATUS_CONNECTION_TIMEOUT = 0x80410006, // ERROR_QUIC_CONNECTION_TIMEOUT + QUIC_STATUS_CONNECTION_IDLE = 0x80410005, // ERROR_QUIC_CONNECTION_IDLE + QUIC_STATUS_UNREACHABLE = 0x800704d0, // HRESULT_FROM_WIN32(ERROR_HOST_UNREACHABLE) + QUIC_STATUS_INTERNAL_ERROR = 0x80410003, // ERROR_QUIC_INTERNAL_ERROR + QUIC_STATUS_CONNECTION_REFUSED = 0x800704c9, // HRESULT_FROM_WIN32(ERROR_CONNECTION_REFUSED) + QUIC_STATUS_PROTOCOL_ERROR = 0x80410004, // ERROR_QUIC_PROTOCOL_VIOLATION + QUIC_STATUS_VER_NEG_ERROR = 0x80410001, // ERROR_QUIC_VER_NEG_FAILURE + QUIC_STATUS_TLS_ERROR = 0x80072b18, // HRESULT_FROM_WIN32(WSA_SECURE_HOST_NOT_FOUND) + QUIC_STATUS_USER_CANCELED = 0x80410002, // ERROR_QUIC_USER_CANCELED + QUIC_STATUS_ALPN_NEG_FAILURE = 0x80410007, // ERROR_QUIC_ALPN_NEG_FAILURE + QUIC_STATUS_STREAM_LIMIT_REACHED = 0x80410008, // ERROR_QUIC_STREAM_LIMIT_REACHED + QUIC_STATUS_ALPN_IN_USE = 0x80410009, // ERROR_QUIC_ALPN_IN_USE + + QUIC_STATUS_CLOSE_NOTIFY = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 0), // QUIC_STATUS_TLS_ALERT(0) - Close notify + QUIC_STATUS_BAD_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 42), // QUIC_STATUS_TLS_ALERT(42) - Bad Certificate + QUIC_STATUS_UNSUPPORTED_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 43), // QUIC_STATUS_TLS_ALERT(43) - Unsupported Certificate + QUIC_STATUS_REVOKED_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 44), // QUIC_STATUS_TLS_ALERT(44) - Revoked Certificate + QUIC_STATUS_EXPIRED_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 45), // QUIC_STATUS_TLS_ALERT(45) - Expired Certificate + QUIC_STATUS_UNKNOWN_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 46), // QUIC_STATUS_TLS_ALERT(46) - Unknown Certificate + QUIC_STATUS_REQUIRED_CERTIFICATE = QUIC_TLS_ALERT_HRESULT_PREFIX | (0xff & 116), // QUIC_STATUS_TLS_ALERT(116) - Required Certificate + + QUIC_STATUS_CERT_EXPIRED = 0xBEBC401, // CERT_E_EXPIRED + QUIC_STATUS_CERT_UNTRUSTED_ROOT = 0xBEBC402, // CERT_E_UNTRUSTEDROOT + QUIC_STATUS_CERT_NO_CERT = 0xBEBC403 // SEC_E_NO_CREDENTIALS +} QUIC_STATUS; diff --git a/crates/.metadata/MsQuic.c b/crates/.metadata/MsQuic.c new file mode 100644 index 0000000000..61ae1b5d2a --- /dev/null +++ b/crates/.metadata/MsQuic.c @@ -0,0 +1,7 @@ +// force the return type to be long (for linux to work as well) +#define _HRESULT_DEFINED +#define HRESULT long +// TODO: typedef does not work. maybe scraper has special case for hresult +// typedef long QSTATUS; +// typedef QSTATUS HRESULT; +#include "msquic.h" \ No newline at end of file diff --git a/crates/.metadata/autoTypes.json b/crates/.metadata/autoTypes.json new file mode 100644 index 0000000000..61f9eaa543 --- /dev/null +++ b/crates/.metadata/autoTypes.json @@ -0,0 +1,15 @@ +[ + { + "Namespace": "Microsoft.MsQuic", + "Name": "QUIC_HANDLE", + "ValueType": "typedef struct QUIC_HANDLE", + "NativeTypedef": true + }, + { + "Namespace": "Microsoft.MsQuic", + "Name": "HQUIC", + "ValueType": "typedef struct QUIC_HANDLE *", + "InvalidHandleValues": [ 0 ], + "NativeTypedef": true + } +] \ No newline at end of file diff --git a/crates/.metadata/generate.proj b/crates/.metadata/generate.proj new file mode 100644 index 0000000000..55c0c7da01 --- /dev/null +++ b/crates/.metadata/generate.proj @@ -0,0 +1,37 @@ + + + + ../.windows/winmd/Microsoft.MsQuic.winmd + 255.255.255.255 + true + x64 + + + + + + + + + ..\..\src\inc\msquic.h; + Microsoft.MsQuic + + + MsQuic.Win32.h + Microsoft.MsQuic.Win32 + + + ./linux/MsQuic.Linux.h + Microsoft.MsQuic.Linux + + + ./macos/MsQuic.MacOs.h + Microsoft.MsQuic.MacOs + + + + + + \ No newline at end of file diff --git a/crates/.metadata/linux/MsQuic.Linux.c b/crates/.metadata/linux/MsQuic.Linux.c new file mode 100644 index 0000000000..a0d5b4039e --- /dev/null +++ b/crates/.metadata/linux/MsQuic.Linux.c @@ -0,0 +1 @@ +#include "MsQuic.Linux.h" \ No newline at end of file diff --git a/crates/.metadata/linux/MsQuic.Linux.h b/crates/.metadata/linux/MsQuic.Linux.h new file mode 100644 index 0000000000..1bfe80601b --- /dev/null +++ b/crates/.metadata/linux/MsQuic.Linux.h @@ -0,0 +1,44 @@ +#define ERROR_BASE 200000000 // 0xBEBC200 +#define TLS_ERROR_BASE 256 + ERROR_BASE // 0xBEBC300 +#define CERT_ERROR_BASE 512 + ERROR_BASE // 0xBEBC400 + +typedef enum { + QUIC_STATUS_SUCCESS = 0, // 0 + QUIC_STATUS_PENDING = -2, // -2 + QUIC_STATUS_CONTINUE = -1, // -1 + QUIC_STATUS_OUT_OF_MEMORY = 12, // 12 + QUIC_STATUS_INVALID_PARAMETER = 22, // 22 + QUIC_STATUS_INVALID_STATE = 1, // 1 + QUIC_STATUS_NOT_SUPPORTED = 95, // 95 (102 on macOS) + QUIC_STATUS_NOT_FOUND = 2, // 2 + QUIC_STATUS_BUFFER_TOO_SMALL = 75, // 75 (84 on macOS) + QUIC_STATUS_HANDSHAKE_FAILURE = 103, // 103 (53 on macOS) + QUIC_STATUS_ABORTED = 125, // 125 (89 on macOS) + QUIC_STATUS_ADDRESS_IN_USE = 98, // 98 (48 on macOS) + QUIC_STATUS_INVALID_ADDRESS = 97, // 97 (47 on macOS) + QUIC_STATUS_CONNECTION_TIMEOUT = 110, // 110 (60 on macOS) + QUIC_STATUS_CONNECTION_IDLE = 62, // 62 (101 on macOS) + QUIC_STATUS_INTERNAL_ERROR = 5, // 5 + QUIC_STATUS_CONNECTION_REFUSED = 111, // 111 (61 on macOS) + QUIC_STATUS_PROTOCOL_ERROR = 71, // 71 (100 on macOS) + QUIC_STATUS_VER_NEG_ERROR = 93, // 93 (43 on macOS) + QUIC_STATUS_UNREACHABLE = 113, // 113 (65 on macOS) + QUIC_STATUS_TLS_ERROR = 126, // 126 + QUIC_STATUS_USER_CANCELED = 130, // 130 (105 on macOS) + QUIC_STATUS_ALPN_NEG_FAILURE = 92, // 92 (42 on macOS) + QUIC_STATUS_STREAM_LIMIT_REACHED = 86, // 86 + QUIC_STATUS_ALPN_IN_USE = 91, // 91 (41 on macOS) + QUIC_STATUS_ADDRESS_NOT_AVAILABLE = 99, // 99 (47 on macOS) + + QUIC_STATUS_CLOSE_NOTIFY = (0xff & 0) + TLS_ERROR_BASE, // 0xBEBC300 - Close notify + QUIC_STATUS_BAD_CERTIFICATE = (0xff & 42) + TLS_ERROR_BASE, // 0xBEBC32A - Bad Certificate + QUIC_STATUS_UNSUPPORTED_CERTIFICATE = (0xff & 43) + TLS_ERROR_BASE, // 0xBEBC32B - Unsupported Certificate + QUIC_STATUS_REVOKED_CERTIFICATE = (0xff & 44) + TLS_ERROR_BASE, // 0xBEBC32C - Revoked Certificate + QUIC_STATUS_EXPIRED_CERTIFICATE = (0xff & 45) + TLS_ERROR_BASE, // 0xBEBC32D - Expired Certificate + QUIC_STATUS_UNKNOWN_CERTIFICATE = (0xff & 46) + TLS_ERROR_BASE, // 0xBEBC32E - Unknown Certificate + QUIC_STATUS_REQUIRED_CERTIFICATE = (0xff & 116) + TLS_ERROR_BASE, // 0xBEBC374 - Required Certificate + + QUIC_STATUS_CERT_EXPIRED = 1 + CERT_ERROR_BASE, // 0xBEBC401 + QUIC_STATUS_CERT_UNTRUSTED_ROOT = 2 + CERT_ERROR_BASE, // 0xBEBC402 + QUIC_STATUS_CERT_NO_CERT = 3 + CERT_ERROR_BASE, // 0xBEBC403 +} QUIC_STATUS; diff --git a/crates/.metadata/macos/MsQuic.MacOs.c b/crates/.metadata/macos/MsQuic.MacOs.c new file mode 100644 index 0000000000..71469de58e --- /dev/null +++ b/crates/.metadata/macos/MsQuic.MacOs.c @@ -0,0 +1 @@ +#include "MsQuic.MacOs.h" \ No newline at end of file diff --git a/crates/.metadata/macos/MsQuic.MacOs.h b/crates/.metadata/macos/MsQuic.MacOs.h new file mode 100644 index 0000000000..5ad1a10db3 --- /dev/null +++ b/crates/.metadata/macos/MsQuic.MacOs.h @@ -0,0 +1,44 @@ +#define ERROR_BASE 200000000 // 0xBEBC200 +#define TLS_ERROR_BASE 256 + ERROR_BASE // 0xBEBC300 +#define CERT_ERROR_BASE 512 + ERROR_BASE // 0xBEBC400 + +typedef enum { + QUIC_STATUS_SUCCESS = 0, // 0 + QUIC_STATUS_PENDING = -2, // -2 + QUIC_STATUS_CONTINUE = -1, // -1 + QUIC_STATUS_OUT_OF_MEMORY = 12, // 12 + QUIC_STATUS_INVALID_PARAMETER = 22, // 22 + QUIC_STATUS_INVALID_STATE = 1, // 1 + QUIC_STATUS_NOT_SUPPORTED = 102, // 102 (95 on Linux) + QUIC_STATUS_NOT_FOUND = 2, // 2 + QUIC_STATUS_BUFFER_TOO_SMALL = 84, // 84 (75 on Linux) + QUIC_STATUS_HANDSHAKE_FAILURE = 53, // 53 (103 on Linux) + QUIC_STATUS_ABORTED = 89, // 89 (125 on Linux) + QUIC_STATUS_ADDRESS_IN_USE = 48, // 48 (98 on Linux) + QUIC_STATUS_INVALID_ADDRESS = 47, // 47 (97 on Linux) + QUIC_STATUS_CONNECTION_TIMEOUT = 60, // 60 (110 on Linux) + QUIC_STATUS_CONNECTION_IDLE = 101, // 101 (62 on Linux) + QUIC_STATUS_INTERNAL_ERROR = 5, // 5 + QUIC_STATUS_CONNECTION_REFUSED = 61, // 61 (111 on Linux) + QUIC_STATUS_PROTOCOL_ERROR = 100, // 100 (71 on Linux) + QUIC_STATUS_VER_NEG_ERROR = 43, // 43 (93 on Linux) + QUIC_STATUS_UNREACHABLE = 65, // 65 (113 on Linux) + QUIC_STATUS_TLS_ERROR = 126, // 126 + QUIC_STATUS_USER_CANCELED = 105, // 105 (130 on Linux) + QUIC_STATUS_ALPN_NEG_FAILURE = 42, // 42 (92 on Linux) + QUIC_STATUS_STREAM_LIMIT_REACHED = 86, // 86 + QUIC_STATUS_ALPN_IN_USE = 41, // 41 (91 on Linux) + QUIC_STATUS_ADDRESS_NOT_AVAILABLE = 47, // 47 (99 on Linux) + + QUIC_STATUS_CLOSE_NOTIFY = (0xff & 0) + TLS_ERROR_BASE, // 0xBEBC300 - Close notify + QUIC_STATUS_BAD_CERTIFICATE = (0xff & 42) + TLS_ERROR_BASE, // 0xBEBC32A - Bad Certificate + QUIC_STATUS_UNSUPPORTED_CERTIFICATE = (0xff & 43) + TLS_ERROR_BASE, // 0xBEBC32B - Unsupported Certificate + QUIC_STATUS_REVOKED_CERTIFICATE = (0xff & 44) + TLS_ERROR_BASE, // 0xBEBC32C - Revoked Certificate + QUIC_STATUS_EXPIRED_CERTIFICATE = (0xff & 45) + TLS_ERROR_BASE, // 0xBEBC32D - Expired Certificate + QUIC_STATUS_UNKNOWN_CERTIFICATE = (0xff & 46) + TLS_ERROR_BASE, // 0xBEBC32E - Unknown Certificate + QUIC_STATUS_REQUIRED_CERTIFICATE = (0xff & 116) + TLS_ERROR_BASE, // 0xBEBC374 - Required Certificate + + QUIC_STATUS_CERT_EXPIRED = 1 + CERT_ERROR_BASE, // 0xBEBC401 + QUIC_STATUS_CERT_UNTRUSTED_ROOT = 2 + CERT_ERROR_BASE, // 0xBEBC402 + QUIC_STATUS_CERT_NO_CERT = 3 + CERT_ERROR_BASE, // 0xBEBC403 +} QUIC_STATUS; diff --git a/crates/.windows/winmd/Microsoft.MsQuic.winmd b/crates/.windows/winmd/Microsoft.MsQuic.winmd new file mode 100644 index 0000000000..4e515d64e7 Binary files /dev/null and b/crates/.windows/winmd/Microsoft.MsQuic.winmd differ diff --git a/crates/.windows/winmd/Windows.Win32.winmd b/crates/.windows/winmd/Windows.Win32.winmd new file mode 100644 index 0000000000..22839d7c00 Binary files /dev/null and b/crates/.windows/winmd/Windows.Win32.winmd differ diff --git a/crates/Rust.md b/crates/Rust.md new file mode 100644 index 0000000000..d366ae4290 --- /dev/null +++ b/crates/Rust.md @@ -0,0 +1,15 @@ +# msquic Rust + +Rust binding for msquic is auto generated from c headers using win32metadata and windows-bindgen toolchain. +Generated bindings is cross platform with use use of [mssf-pal](https://github.com/Azure/service-fabric-rs/tree/main/crates/libs/pal). +The c functions that require linking are not included in the generated code for now, and the crate can be built without installing msquic shared libraries. Most likely these functions will be dynamically loaded in future.(This is subjected to change.) + +## Regenerate code +```ps1 +# generate winmd +dotnet build .\crates\.metadata\ +# generate rust code +cargo run -p tools_api +# build generated code +cargo build -p msquic-rs +``` \ No newline at end of file diff --git a/crates/libs/msquic-rs/Cargo.toml b/crates/libs/msquic-rs/Cargo.toml new file mode 100644 index 0000000000..623a1bd0a5 --- /dev/null +++ b/crates/libs/msquic-rs/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "msquic-rs" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +# need win foundataion because of BOOLEAN. +# need winsock due to addr def. +[dependencies] +windows-core = "0.57.0" +windows = { version = "0.57.0", features = [ "Win32_Foundation", "Win32_Networking_WinSock"]} +mssf-pal = "0" # for linux to work with windows crates + +[features] +Foundation = [] +# generated features +MsQuic = ["Foundation"] diff --git a/crates/libs/msquic-rs/README.md b/crates/libs/msquic-rs/README.md new file mode 100644 index 0000000000..745c412f1f --- /dev/null +++ b/crates/libs/msquic-rs/README.md @@ -0,0 +1,3 @@ +# msquic-rs + +Auto generated rust bindings for msquic. \ No newline at end of file diff --git a/crates/libs/msquic-rs/src/Microsoft.rs b/crates/libs/msquic-rs/src/Microsoft.rs new file mode 100644 index 0000000000..96a0ba0c00 --- /dev/null +++ b/crates/libs/msquic-rs/src/Microsoft.rs @@ -0,0 +1,2684 @@ +// Bindings generated by `windows-bindgen` 0.57.0 + +#![allow( + non_snake_case, + non_upper_case_globals, + non_camel_case_types, + dead_code, + clippy::all +)] +pub mod MsQuic { + pub mod Linux { + pub const ERROR_BASE: u32 = 200000000u32; + pub const QUIC_STATUS_ABORTED: QUIC_STATUS = QUIC_STATUS(125i32); + pub const QUIC_STATUS_ADDRESS_IN_USE: QUIC_STATUS = QUIC_STATUS(98i32); + pub const QUIC_STATUS_ADDRESS_NOT_AVAILABLE: QUIC_STATUS = QUIC_STATUS(99i32); + pub const QUIC_STATUS_ALPN_IN_USE: QUIC_STATUS = QUIC_STATUS(91i32); + pub const QUIC_STATUS_ALPN_NEG_FAILURE: QUIC_STATUS = QUIC_STATUS(92i32); + pub const QUIC_STATUS_BAD_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000298i32); + pub const QUIC_STATUS_BUFFER_TOO_SMALL: QUIC_STATUS = QUIC_STATUS(75i32); + pub const QUIC_STATUS_CERT_EXPIRED: QUIC_STATUS = QUIC_STATUS(200000513i32); + pub const QUIC_STATUS_CERT_NO_CERT: QUIC_STATUS = QUIC_STATUS(200000515i32); + pub const QUIC_STATUS_CERT_UNTRUSTED_ROOT: QUIC_STATUS = QUIC_STATUS(200000514i32); + pub const QUIC_STATUS_CLOSE_NOTIFY: QUIC_STATUS = QUIC_STATUS(200000256i32); + pub const QUIC_STATUS_CONNECTION_IDLE: QUIC_STATUS = QUIC_STATUS(62i32); + pub const QUIC_STATUS_CONNECTION_REFUSED: QUIC_STATUS = QUIC_STATUS(111i32); + pub const QUIC_STATUS_CONNECTION_TIMEOUT: QUIC_STATUS = QUIC_STATUS(110i32); + pub const QUIC_STATUS_CONTINUE: QUIC_STATUS = QUIC_STATUS(-1i32); + pub const QUIC_STATUS_EXPIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000301i32); + pub const QUIC_STATUS_HANDSHAKE_FAILURE: QUIC_STATUS = QUIC_STATUS(103i32); + pub const QUIC_STATUS_INTERNAL_ERROR: QUIC_STATUS = QUIC_STATUS(5i32); + pub const QUIC_STATUS_INVALID_ADDRESS: QUIC_STATUS = QUIC_STATUS(97i32); + pub const QUIC_STATUS_INVALID_PARAMETER: QUIC_STATUS = QUIC_STATUS(22i32); + pub const QUIC_STATUS_INVALID_STATE: QUIC_STATUS = QUIC_STATUS(1i32); + pub const QUIC_STATUS_NOT_FOUND: QUIC_STATUS = QUIC_STATUS(2i32); + pub const QUIC_STATUS_NOT_SUPPORTED: QUIC_STATUS = QUIC_STATUS(95i32); + pub const QUIC_STATUS_OUT_OF_MEMORY: QUIC_STATUS = QUIC_STATUS(12i32); + pub const QUIC_STATUS_PENDING: QUIC_STATUS = QUIC_STATUS(-2i32); + pub const QUIC_STATUS_PROTOCOL_ERROR: QUIC_STATUS = QUIC_STATUS(71i32); + pub const QUIC_STATUS_REQUIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000372i32); + pub const QUIC_STATUS_REVOKED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000300i32); + pub const QUIC_STATUS_STREAM_LIMIT_REACHED: QUIC_STATUS = QUIC_STATUS(86i32); + pub const QUIC_STATUS_SUCCESS: QUIC_STATUS = QUIC_STATUS(0i32); + pub const QUIC_STATUS_TLS_ERROR: QUIC_STATUS = QUIC_STATUS(126i32); + pub const QUIC_STATUS_UNKNOWN_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000302i32); + pub const QUIC_STATUS_UNREACHABLE: QUIC_STATUS = QUIC_STATUS(113i32); + pub const QUIC_STATUS_UNSUPPORTED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000299i32); + pub const QUIC_STATUS_USER_CANCELED: QUIC_STATUS = QUIC_STATUS(130i32); + pub const QUIC_STATUS_VER_NEG_ERROR: QUIC_STATUS = QUIC_STATUS(93i32); + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STATUS(pub i32); + impl windows_core::TypeKind for QUIC_STATUS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STATUS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STATUS").field(&self.0).finish() + } + } + } + pub mod MacOs { + pub const QUIC_STATUS_ABORTED: QUIC_STATUS = QUIC_STATUS(89i32); + pub const QUIC_STATUS_ADDRESS_IN_USE: QUIC_STATUS = QUIC_STATUS(48i32); + pub const QUIC_STATUS_ADDRESS_NOT_AVAILABLE: QUIC_STATUS = QUIC_STATUS(47i32); + pub const QUIC_STATUS_ALPN_IN_USE: QUIC_STATUS = QUIC_STATUS(41i32); + pub const QUIC_STATUS_ALPN_NEG_FAILURE: QUIC_STATUS = QUIC_STATUS(42i32); + pub const QUIC_STATUS_BAD_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000298i32); + pub const QUIC_STATUS_BUFFER_TOO_SMALL: QUIC_STATUS = QUIC_STATUS(84i32); + pub const QUIC_STATUS_CERT_EXPIRED: QUIC_STATUS = QUIC_STATUS(200000513i32); + pub const QUIC_STATUS_CERT_NO_CERT: QUIC_STATUS = QUIC_STATUS(200000515i32); + pub const QUIC_STATUS_CERT_UNTRUSTED_ROOT: QUIC_STATUS = QUIC_STATUS(200000514i32); + pub const QUIC_STATUS_CLOSE_NOTIFY: QUIC_STATUS = QUIC_STATUS(200000256i32); + pub const QUIC_STATUS_CONNECTION_IDLE: QUIC_STATUS = QUIC_STATUS(101i32); + pub const QUIC_STATUS_CONNECTION_REFUSED: QUIC_STATUS = QUIC_STATUS(61i32); + pub const QUIC_STATUS_CONNECTION_TIMEOUT: QUIC_STATUS = QUIC_STATUS(60i32); + pub const QUIC_STATUS_CONTINUE: QUIC_STATUS = QUIC_STATUS(-1i32); + pub const QUIC_STATUS_EXPIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000301i32); + pub const QUIC_STATUS_HANDSHAKE_FAILURE: QUIC_STATUS = QUIC_STATUS(53i32); + pub const QUIC_STATUS_INTERNAL_ERROR: QUIC_STATUS = QUIC_STATUS(5i32); + pub const QUIC_STATUS_INVALID_ADDRESS: QUIC_STATUS = QUIC_STATUS(47i32); + pub const QUIC_STATUS_INVALID_PARAMETER: QUIC_STATUS = QUIC_STATUS(22i32); + pub const QUIC_STATUS_INVALID_STATE: QUIC_STATUS = QUIC_STATUS(1i32); + pub const QUIC_STATUS_NOT_FOUND: QUIC_STATUS = QUIC_STATUS(2i32); + pub const QUIC_STATUS_NOT_SUPPORTED: QUIC_STATUS = QUIC_STATUS(102i32); + pub const QUIC_STATUS_OUT_OF_MEMORY: QUIC_STATUS = QUIC_STATUS(12i32); + pub const QUIC_STATUS_PENDING: QUIC_STATUS = QUIC_STATUS(-2i32); + pub const QUIC_STATUS_PROTOCOL_ERROR: QUIC_STATUS = QUIC_STATUS(100i32); + pub const QUIC_STATUS_REQUIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000372i32); + pub const QUIC_STATUS_REVOKED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000300i32); + pub const QUIC_STATUS_STREAM_LIMIT_REACHED: QUIC_STATUS = QUIC_STATUS(86i32); + pub const QUIC_STATUS_SUCCESS: QUIC_STATUS = QUIC_STATUS(0i32); + pub const QUIC_STATUS_TLS_ERROR: QUIC_STATUS = QUIC_STATUS(126i32); + pub const QUIC_STATUS_UNKNOWN_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000302i32); + pub const QUIC_STATUS_UNREACHABLE: QUIC_STATUS = QUIC_STATUS(65i32); + pub const QUIC_STATUS_UNSUPPORTED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(200000299i32); + pub const QUIC_STATUS_USER_CANCELED: QUIC_STATUS = QUIC_STATUS(105i32); + pub const QUIC_STATUS_VER_NEG_ERROR: QUIC_STATUS = QUIC_STATUS(43i32); + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STATUS(pub i32); + impl windows_core::TypeKind for QUIC_STATUS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STATUS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STATUS").field(&self.0).finish() + } + } + } + pub mod Win32 { + pub const QUIC_STATUS_ABORTED: QUIC_STATUS = QUIC_STATUS(-2147467260i32); + pub const QUIC_STATUS_ADDRESS_IN_USE: QUIC_STATUS = QUIC_STATUS(-2147014848i32); + pub const QUIC_STATUS_ALPN_IN_USE: QUIC_STATUS = QUIC_STATUS(-2143223799i32); + pub const QUIC_STATUS_ALPN_NEG_FAILURE: QUIC_STATUS = QUIC_STATUS(-2143223801i32); + pub const QUIC_STATUS_BAD_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223510i32); + pub const QUIC_STATUS_BUFFER_TOO_SMALL: QUIC_STATUS = QUIC_STATUS(-2147024774i32); + pub const QUIC_STATUS_CERT_EXPIRED: QUIC_STATUS = QUIC_STATUS(200000513i32); + pub const QUIC_STATUS_CERT_NO_CERT: QUIC_STATUS = QUIC_STATUS(200000515i32); + pub const QUIC_STATUS_CERT_UNTRUSTED_ROOT: QUIC_STATUS = QUIC_STATUS(200000514i32); + pub const QUIC_STATUS_CLOSE_NOTIFY: QUIC_STATUS = QUIC_STATUS(-2143223552i32); + pub const QUIC_STATUS_CONNECTION_IDLE: QUIC_STATUS = QUIC_STATUS(-2143223803i32); + pub const QUIC_STATUS_CONNECTION_REFUSED: QUIC_STATUS = QUIC_STATUS(-2147023671i32); + pub const QUIC_STATUS_CONNECTION_TIMEOUT: QUIC_STATUS = QUIC_STATUS(-2143223802i32); + pub const QUIC_STATUS_CONTINUE: QUIC_STATUS = QUIC_STATUS(459998i32); + pub const QUIC_STATUS_EXPIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223507i32); + pub const QUIC_STATUS_HANDSHAKE_FAILURE: QUIC_STATUS = QUIC_STATUS(-2143223808i32); + pub const QUIC_STATUS_INTERNAL_ERROR: QUIC_STATUS = QUIC_STATUS(-2143223805i32); + pub const QUIC_STATUS_INVALID_ADDRESS: QUIC_STATUS = QUIC_STATUS(-2147014847i32); + pub const QUIC_STATUS_INVALID_PARAMETER: QUIC_STATUS = QUIC_STATUS(-2147024809i32); + pub const QUIC_STATUS_INVALID_STATE: QUIC_STATUS = QUIC_STATUS(-2147019873i32); + pub const QUIC_STATUS_NOT_FOUND: QUIC_STATUS = QUIC_STATUS(-2147023728i32); + pub const QUIC_STATUS_NOT_SUPPORTED: QUIC_STATUS = QUIC_STATUS(-2147467262i32); + pub const QUIC_STATUS_OUT_OF_MEMORY: QUIC_STATUS = QUIC_STATUS(-2147024882i32); + pub const QUIC_STATUS_PENDING: QUIC_STATUS = QUIC_STATUS(459749i32); + pub const QUIC_STATUS_PROTOCOL_ERROR: QUIC_STATUS = QUIC_STATUS(-2143223804i32); + pub const QUIC_STATUS_REQUIRED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223436i32); + pub const QUIC_STATUS_REVOKED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223508i32); + pub const QUIC_STATUS_STREAM_LIMIT_REACHED: QUIC_STATUS = QUIC_STATUS(-2143223800i32); + pub const QUIC_STATUS_SUCCESS: QUIC_STATUS = QUIC_STATUS(0i32); + pub const QUIC_STATUS_TLS_ERROR: QUIC_STATUS = QUIC_STATUS(-2147013864i32); + pub const QUIC_STATUS_UNKNOWN_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223506i32); + pub const QUIC_STATUS_UNREACHABLE: QUIC_STATUS = QUIC_STATUS(-2147023664i32); + pub const QUIC_STATUS_UNSUPPORTED_CERTIFICATE: QUIC_STATUS = QUIC_STATUS(-2143223509i32); + pub const QUIC_STATUS_USER_CANCELED: QUIC_STATUS = QUIC_STATUS(-2143223806i32); + pub const QUIC_STATUS_VER_NEG_ERROR: QUIC_STATUS = QUIC_STATUS(-2143223807i32); + pub const QUIC_TLS_ALERT_HRESULT_PREFIX: windows_core::HRESULT = + windows_core::HRESULT(0x80410100_u32 as _); + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STATUS(pub i32); + impl windows_core::TypeKind for QUIC_STATUS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STATUS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STATUS").field(&self.0).finish() + } + } + } + pub const QUIC_ALLOWED_CIPHER_SUITE_AES_128_GCM_SHA256: QUIC_ALLOWED_CIPHER_SUITE_FLAGS = + QUIC_ALLOWED_CIPHER_SUITE_FLAGS(1i32); + pub const QUIC_ALLOWED_CIPHER_SUITE_AES_256_GCM_SHA384: QUIC_ALLOWED_CIPHER_SUITE_FLAGS = + QUIC_ALLOWED_CIPHER_SUITE_FLAGS(2i32); + pub const QUIC_ALLOWED_CIPHER_SUITE_CHACHA20_POLY1305_SHA256: QUIC_ALLOWED_CIPHER_SUITE_FLAGS = + QUIC_ALLOWED_CIPHER_SUITE_FLAGS(4i32); + pub const QUIC_ALLOWED_CIPHER_SUITE_NONE: QUIC_ALLOWED_CIPHER_SUITE_FLAGS = + QUIC_ALLOWED_CIPHER_SUITE_FLAGS(0i32); + pub const QUIC_API_VERSION_1: u32 = 1u32; + pub const QUIC_API_VERSION_2: u32 = 2u32; + pub const QUIC_CERTIFICATE_HASH_STORE_FLAG_MACHINE_STORE: QUIC_CERTIFICATE_HASH_STORE_FLAGS = + QUIC_CERTIFICATE_HASH_STORE_FLAGS(1i32); + pub const QUIC_CERTIFICATE_HASH_STORE_FLAG_NONE: QUIC_CERTIFICATE_HASH_STORE_FLAGS = + QUIC_CERTIFICATE_HASH_STORE_FLAGS(0i32); + pub const QUIC_CIPHER_ALGORITHM_AES_128: QUIC_CIPHER_ALGORITHM = + QUIC_CIPHER_ALGORITHM(26126i32); + pub const QUIC_CIPHER_ALGORITHM_AES_256: QUIC_CIPHER_ALGORITHM = + QUIC_CIPHER_ALGORITHM(26128i32); + pub const QUIC_CIPHER_ALGORITHM_CHACHA20: QUIC_CIPHER_ALGORITHM = + QUIC_CIPHER_ALGORITHM(26130i32); + pub const QUIC_CIPHER_ALGORITHM_NONE: QUIC_CIPHER_ALGORITHM = QUIC_CIPHER_ALGORITHM(0i32); + pub const QUIC_CIPHER_SUITE_TLS_AES_128_GCM_SHA256: QUIC_CIPHER_SUITE = + QUIC_CIPHER_SUITE(4865i32); + pub const QUIC_CIPHER_SUITE_TLS_AES_256_GCM_SHA384: QUIC_CIPHER_SUITE = + QUIC_CIPHER_SUITE(4866i32); + pub const QUIC_CIPHER_SUITE_TLS_CHACHA20_POLY1305_SHA256: QUIC_CIPHER_SUITE = + QUIC_CIPHER_SUITE(4867i32); + pub const QUIC_CONGESTION_CONTROL_ALGORITHM_CUBIC: QUIC_CONGESTION_CONTROL_ALGORITHM = + QUIC_CONGESTION_CONTROL_ALGORITHM(0i32); + pub const QUIC_CONGESTION_CONTROL_ALGORITHM_MAX: QUIC_CONGESTION_CONTROL_ALGORITHM = + QUIC_CONGESTION_CONTROL_ALGORITHM(1i32); + pub const QUIC_CONNECTION_EVENT_CONNECTED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(0i32); + pub const QUIC_CONNECTION_EVENT_DATAGRAM_RECEIVED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(11i32); + pub const QUIC_CONNECTION_EVENT_DATAGRAM_SEND_STATE_CHANGED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(12i32); + pub const QUIC_CONNECTION_EVENT_DATAGRAM_STATE_CHANGED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(10i32); + pub const QUIC_CONNECTION_EVENT_IDEAL_PROCESSOR_CHANGED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(9i32); + pub const QUIC_CONNECTION_EVENT_LOCAL_ADDRESS_CHANGED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(4i32); + pub const QUIC_CONNECTION_EVENT_PEER_ADDRESS_CHANGED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(5i32); + pub const QUIC_CONNECTION_EVENT_PEER_CERTIFICATE_RECEIVED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(15i32); + pub const QUIC_CONNECTION_EVENT_PEER_NEEDS_STREAMS: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(8i32); + pub const QUIC_CONNECTION_EVENT_PEER_STREAM_STARTED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(6i32); + pub const QUIC_CONNECTION_EVENT_RESUMED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(13i32); + pub const QUIC_CONNECTION_EVENT_RESUMPTION_TICKET_RECEIVED: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(14i32); + pub const QUIC_CONNECTION_EVENT_SHUTDOWN_COMPLETE: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(3i32); + pub const QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_PEER: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(2i32); + pub const QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_TRANSPORT: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(1i32); + pub const QUIC_CONNECTION_EVENT_STREAMS_AVAILABLE: QUIC_CONNECTION_EVENT_TYPE = + QUIC_CONNECTION_EVENT_TYPE(7i32); + pub const QUIC_CONNECTION_SHUTDOWN_FLAG_NONE: QUIC_CONNECTION_SHUTDOWN_FLAGS = + QUIC_CONNECTION_SHUTDOWN_FLAGS(0i32); + pub const QUIC_CONNECTION_SHUTDOWN_FLAG_SILENT: QUIC_CONNECTION_SHUTDOWN_FLAGS = + QUIC_CONNECTION_SHUTDOWN_FLAGS(1i32); + pub const QUIC_CREDENTIAL_FLAG_CACHE_ONLY_URL_RETRIEVAL: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(131072i32); + pub const QUIC_CREDENTIAL_FLAG_CLIENT: QUIC_CREDENTIAL_FLAGS = QUIC_CREDENTIAL_FLAGS(1i32); + pub const QUIC_CREDENTIAL_FLAG_DEFER_CERTIFICATE_VALIDATION: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(32i32); + pub const QUIC_CREDENTIAL_FLAG_DISABLE_AIA: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(2097152i32); + pub const QUIC_CREDENTIAL_FLAG_ENABLE_OCSP: QUIC_CREDENTIAL_FLAGS = QUIC_CREDENTIAL_FLAGS(8i32); + pub const QUIC_CREDENTIAL_FLAG_IGNORE_NO_REVOCATION_CHECK: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(2048i32); + pub const QUIC_CREDENTIAL_FLAG_IGNORE_REVOCATION_OFFLINE: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(4096i32); + pub const QUIC_CREDENTIAL_FLAG_INDICATE_CERTIFICATE_RECEIVED: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(16i32); + pub const QUIC_CREDENTIAL_FLAG_INPROC_PEER_CERTIFICATE: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(524288i32); + pub const QUIC_CREDENTIAL_FLAG_LOAD_ASYNCHRONOUS: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(2i32); + pub const QUIC_CREDENTIAL_FLAG_NONE: QUIC_CREDENTIAL_FLAGS = QUIC_CREDENTIAL_FLAGS(0i32); + pub const QUIC_CREDENTIAL_FLAG_NO_CERTIFICATE_VALIDATION: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(4i32); + pub const QUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(64i32); + pub const QUIC_CREDENTIAL_FLAG_REVOCATION_CHECK_CACHE_ONLY: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(262144i32); + pub const QUIC_CREDENTIAL_FLAG_REVOCATION_CHECK_CHAIN: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(512i32); + pub const QUIC_CREDENTIAL_FLAG_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(1024i32); + pub const QUIC_CREDENTIAL_FLAG_REVOCATION_CHECK_END_CERT: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(256i32); + pub const QUIC_CREDENTIAL_FLAG_SET_ALLOWED_CIPHER_SUITES: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(8192i32); + pub const QUIC_CREDENTIAL_FLAG_SET_CA_CERTIFICATE_FILE: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(1048576i32); + pub const QUIC_CREDENTIAL_FLAG_USE_PORTABLE_CERTIFICATES: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(16384i32); + pub const QUIC_CREDENTIAL_FLAG_USE_SUPPLIED_CREDENTIALS: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(32768i32); + pub const QUIC_CREDENTIAL_FLAG_USE_SYSTEM_MAPPER: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(65536i32); + pub const QUIC_CREDENTIAL_FLAG_USE_TLS_BUILTIN_CERTIFICATE_VALIDATION: QUIC_CREDENTIAL_FLAGS = + QUIC_CREDENTIAL_FLAGS(128i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_CONTEXT: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(3i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_FILE: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(4i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_FILE_PROTECTED: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(5i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_HASH: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(1i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_HASH_STORE: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(2i32); + pub const QUIC_CREDENTIAL_TYPE_CERTIFICATE_PKCS12: QUIC_CREDENTIAL_TYPE = + QUIC_CREDENTIAL_TYPE(6i32); + pub const QUIC_CREDENTIAL_TYPE_NONE: QUIC_CREDENTIAL_TYPE = QUIC_CREDENTIAL_TYPE(0i32); + pub const QUIC_DATAGRAM_SEND_ACKNOWLEDGED: QUIC_DATAGRAM_SEND_STATE = + QUIC_DATAGRAM_SEND_STATE(4i32); + pub const QUIC_DATAGRAM_SEND_ACKNOWLEDGED_SPURIOUS: QUIC_DATAGRAM_SEND_STATE = + QUIC_DATAGRAM_SEND_STATE(5i32); + pub const QUIC_DATAGRAM_SEND_CANCELED: QUIC_DATAGRAM_SEND_STATE = + QUIC_DATAGRAM_SEND_STATE(6i32); + pub const QUIC_DATAGRAM_SEND_LOST_DISCARDED: QUIC_DATAGRAM_SEND_STATE = + QUIC_DATAGRAM_SEND_STATE(3i32); + pub const QUIC_DATAGRAM_SEND_LOST_SUSPECT: QUIC_DATAGRAM_SEND_STATE = + QUIC_DATAGRAM_SEND_STATE(2i32); + pub const QUIC_DATAGRAM_SEND_SENT: QUIC_DATAGRAM_SEND_STATE = QUIC_DATAGRAM_SEND_STATE(1i32); + pub const QUIC_DATAGRAM_SEND_UNKNOWN: QUIC_DATAGRAM_SEND_STATE = QUIC_DATAGRAM_SEND_STATE(0i32); + pub const QUIC_EXECUTION_CONFIG_FLAG_NONE: QUIC_EXECUTION_CONFIG_FLAGS = + QUIC_EXECUTION_CONFIG_FLAGS(0i32); + pub const QUIC_EXECUTION_PROFILE_LOW_LATENCY: QUIC_EXECUTION_PROFILE = + QUIC_EXECUTION_PROFILE(0i32); + pub const QUIC_EXECUTION_PROFILE_TYPE_MAX_THROUGHPUT: QUIC_EXECUTION_PROFILE = + QUIC_EXECUTION_PROFILE(1i32); + pub const QUIC_EXECUTION_PROFILE_TYPE_REAL_TIME: QUIC_EXECUTION_PROFILE = + QUIC_EXECUTION_PROFILE(3i32); + pub const QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER: QUIC_EXECUTION_PROFILE = + QUIC_EXECUTION_PROFILE(2i32); + pub const QUIC_HASH_ALGORITHM_NONE: QUIC_HASH_ALGORITHM = QUIC_HASH_ALGORITHM(0i32); + pub const QUIC_HASH_ALGORITHM_SHA_256: QUIC_HASH_ALGORITHM = QUIC_HASH_ALGORITHM(32780i32); + pub const QUIC_HASH_ALGORITHM_SHA_384: QUIC_HASH_ALGORITHM = QUIC_HASH_ALGORITHM(32781i32); + pub const QUIC_KEY_EXCHANGE_ALGORITHM_NONE: QUIC_KEY_EXCHANGE_ALGORITHM = + QUIC_KEY_EXCHANGE_ALGORITHM(0i32); + pub const QUIC_LISTENER_EVENT_NEW_CONNECTION: QUIC_LISTENER_EVENT_TYPE = + QUIC_LISTENER_EVENT_TYPE(0i32); + pub const QUIC_LISTENER_EVENT_STOP_COMPLETE: QUIC_LISTENER_EVENT_TYPE = + QUIC_LISTENER_EVENT_TYPE(1i32); + pub const QUIC_LOAD_BALANCING_COUNT: QUIC_LOAD_BALANCING_MODE = QUIC_LOAD_BALANCING_MODE(3i32); + pub const QUIC_LOAD_BALANCING_DISABLED: QUIC_LOAD_BALANCING_MODE = + QUIC_LOAD_BALANCING_MODE(0i32); + pub const QUIC_LOAD_BALANCING_SERVER_ID_FIXED: QUIC_LOAD_BALANCING_MODE = + QUIC_LOAD_BALANCING_MODE(2i32); + pub const QUIC_LOAD_BALANCING_SERVER_ID_IP: QUIC_LOAD_BALANCING_MODE = + QUIC_LOAD_BALANCING_MODE(1i32); + pub const QUIC_MAX_ALPN_LENGTH: u32 = 255u32; + pub const QUIC_MAX_RESUMPTION_APP_DATA_LENGTH: u32 = 1000u32; + pub const QUIC_MAX_SNI_LENGTH: u32 = 65535u32; + pub const QUIC_MAX_TICKET_KEY_COUNT: u32 = 16u32; + pub const QUIC_PARAM_CONFIGURATION_SCHANNEL_CREDENTIAL_ATTRIBUTE_W: u32 = 50331651u32; + pub const QUIC_PARAM_CONFIGURATION_SETTINGS: u32 = 50331648u32; + pub const QUIC_PARAM_CONFIGURATION_TICKET_KEYS: u32 = 50331649u32; + pub const QUIC_PARAM_CONFIGURATION_VERSION_SETTINGS: u32 = 50331650u32; + pub const QUIC_PARAM_CONN_CIBIR_ID: u32 = 83886101u32; + pub const QUIC_PARAM_CONN_CLOSE_REASON_PHRASE: u32 = 83886091u32; + pub const QUIC_PARAM_CONN_DATAGRAM_RECEIVE_ENABLED: u32 = 83886093u32; + pub const QUIC_PARAM_CONN_DATAGRAM_SEND_ENABLED: u32 = 83886094u32; + pub const QUIC_PARAM_CONN_DISABLE_1RTT_ENCRYPTION: u32 = 83886095u32; + pub const QUIC_PARAM_CONN_IDEAL_PROCESSOR: u32 = 83886083u32; + pub const QUIC_PARAM_CONN_LOCAL_ADDRESS: u32 = 83886081u32; + pub const QUIC_PARAM_CONN_LOCAL_BIDI_STREAM_COUNT: u32 = 83886088u32; + pub const QUIC_PARAM_CONN_LOCAL_INTERFACE: u32 = 83886098u32; + pub const QUIC_PARAM_CONN_LOCAL_UNIDI_STREAM_COUNT: u32 = 83886089u32; + pub const QUIC_PARAM_CONN_MAX_STREAM_IDS: u32 = 83886090u32; + pub const QUIC_PARAM_CONN_ORIG_DEST_CID: u32 = 83886104u32; + pub const QUIC_PARAM_CONN_PEER_CERTIFICATE_VALID: u32 = 83886097u32; + pub const QUIC_PARAM_CONN_QUIC_VERSION: u32 = 83886080u32; + pub const QUIC_PARAM_CONN_REMOTE_ADDRESS: u32 = 83886082u32; + pub const QUIC_PARAM_CONN_RESUMPTION_TICKET: u32 = 83886096u32; + pub const QUIC_PARAM_CONN_SETTINGS: u32 = 83886084u32; + pub const QUIC_PARAM_CONN_SHARE_UDP_BINDING: u32 = 83886087u32; + pub const QUIC_PARAM_CONN_STATISTICS: u32 = 83886085u32; + pub const QUIC_PARAM_CONN_STATISTICS_PLAT: u32 = 83886086u32; + pub const QUIC_PARAM_CONN_STATISTICS_V2: u32 = 83886102u32; + pub const QUIC_PARAM_CONN_STATISTICS_V2_PLAT: u32 = 83886103u32; + pub const QUIC_PARAM_CONN_STREAM_SCHEDULING_SCHEME: u32 = 83886092u32; + pub const QUIC_PARAM_CONN_TLS_SECRETS: u32 = 83886099u32; + pub const QUIC_PARAM_CONN_VERSION_SETTINGS: u32 = 83886100u32; + pub const QUIC_PARAM_GLOBAL_EXECUTION_CONFIG: u32 = 16777225u32; + pub const QUIC_PARAM_GLOBAL_GLOBAL_SETTINGS: u32 = 16777222u32; + pub const QUIC_PARAM_GLOBAL_LIBRARY_GIT_HASH: u32 = 16777224u32; + pub const QUIC_PARAM_GLOBAL_LIBRARY_VERSION: u32 = 16777220u32; + pub const QUIC_PARAM_GLOBAL_LOAD_BALACING_MODE: u32 = 16777218u32; + pub const QUIC_PARAM_GLOBAL_PERF_COUNTERS: u32 = 16777219u32; + pub const QUIC_PARAM_GLOBAL_RETRY_MEMORY_PERCENT: u32 = 16777216u32; + pub const QUIC_PARAM_GLOBAL_SETTINGS: u32 = 16777221u32; + pub const QUIC_PARAM_GLOBAL_STATELESS_RESET_KEY: u32 = 16777227u32; + pub const QUIC_PARAM_GLOBAL_SUPPORTED_VERSIONS: u32 = 16777217u32; + pub const QUIC_PARAM_GLOBAL_TLS_PROVIDER: u32 = 16777226u32; + pub const QUIC_PARAM_GLOBAL_VERSION_SETTINGS: u32 = 16777223u32; + pub const QUIC_PARAM_HIGH_PRIORITY: u32 = 1073741824u32; + pub const QUIC_PARAM_LISTENER_CIBIR_ID: u32 = 67108866u32; + pub const QUIC_PARAM_LISTENER_LOCAL_ADDRESS: u32 = 67108864u32; + pub const QUIC_PARAM_LISTENER_STATS: u32 = 67108865u32; + pub const QUIC_PARAM_PREFIX_CONFIGURATION: u32 = 50331648u32; + pub const QUIC_PARAM_PREFIX_CONNECTION: u32 = 83886080u32; + pub const QUIC_PARAM_PREFIX_GLOBAL: u32 = 16777216u32; + pub const QUIC_PARAM_PREFIX_LISTENER: u32 = 67108864u32; + pub const QUIC_PARAM_PREFIX_REGISTRATION: u32 = 33554432u32; + pub const QUIC_PARAM_PREFIX_STREAM: u32 = 134217728u32; + pub const QUIC_PARAM_PREFIX_TLS: u32 = 100663296u32; + pub const QUIC_PARAM_PREFIX_TLS_SCHANNEL: u32 = 117440512u32; + pub const QUIC_PARAM_STREAM_0RTT_LENGTH: u32 = 134217729u32; + pub const QUIC_PARAM_STREAM_ID: u32 = 134217728u32; + pub const QUIC_PARAM_STREAM_IDEAL_SEND_BUFFER_SIZE: u32 = 134217730u32; + pub const QUIC_PARAM_STREAM_PRIORITY: u32 = 134217731u32; + pub const QUIC_PARAM_STREAM_RELIABLE_OFFSET: u32 = 134217733u32; + pub const QUIC_PARAM_STREAM_STATISTICS: u32 = 134217732u32; + pub const QUIC_PARAM_TLS_HANDSHAKE_INFO: u32 = 100663296u32; + pub const QUIC_PARAM_TLS_NEGOTIATED_ALPN: u32 = 100663297u32; + pub const QUIC_PARAM_TLS_SCHANNEL_CONTEXT_ATTRIBUTE_EX_W: u32 = 117440513u32; + pub const QUIC_PARAM_TLS_SCHANNEL_CONTEXT_ATTRIBUTE_W: u32 = 117440512u32; + pub const QUIC_PARAM_TLS_SCHANNEL_SECURITY_CONTEXT_TOKEN: u32 = 117440514u32; + pub const QUIC_PERF_COUNTER_APP_RECV_BYTES: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(19i32); + pub const QUIC_PERF_COUNTER_APP_SEND_BYTES: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(18i32); + pub const QUIC_PERF_COUNTER_CONN_ACTIVE: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(4i32); + pub const QUIC_PERF_COUNTER_CONN_APP_REJECT: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(2i32); + pub const QUIC_PERF_COUNTER_CONN_CONNECTED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(5i32); + pub const QUIC_PERF_COUNTER_CONN_CREATED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(0i32); + pub const QUIC_PERF_COUNTER_CONN_HANDSHAKE_FAIL: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(1i32); + pub const QUIC_PERF_COUNTER_CONN_LOAD_REJECT: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(31i32); + pub const QUIC_PERF_COUNTER_CONN_NO_ALPN: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(7i32); + pub const QUIC_PERF_COUNTER_CONN_OPER_COMPLETED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(23i32); + pub const QUIC_PERF_COUNTER_CONN_OPER_QUEUED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(22i32); + pub const QUIC_PERF_COUNTER_CONN_OPER_QUEUE_DEPTH: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(21i32); + pub const QUIC_PERF_COUNTER_CONN_PROTOCOL_ERRORS: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(6i32); + pub const QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(20i32); + pub const QUIC_PERF_COUNTER_CONN_RESUMED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(3i32); + pub const QUIC_PERF_COUNTER_MAX: QUIC_PERFORMANCE_COUNTERS = QUIC_PERFORMANCE_COUNTERS(32i32); + pub const QUIC_PERF_COUNTER_PATH_FAILURE: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(28i32); + pub const QUIC_PERF_COUNTER_PATH_VALIDATED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(27i32); + pub const QUIC_PERF_COUNTER_PKTS_DECRYPTION_FAIL: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(11i32); + pub const QUIC_PERF_COUNTER_PKTS_DROPPED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(10i32); + pub const QUIC_PERF_COUNTER_PKTS_SUSPECTED_LOST: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(9i32); + pub const QUIC_PERF_COUNTER_SEND_STATELESS_RESET: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(29i32); + pub const QUIC_PERF_COUNTER_SEND_STATELESS_RETRY: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(30i32); + pub const QUIC_PERF_COUNTER_STRM_ACTIVE: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(8i32); + pub const QUIC_PERF_COUNTER_UDP_RECV: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(12i32); + pub const QUIC_PERF_COUNTER_UDP_RECV_BYTES: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(14i32); + pub const QUIC_PERF_COUNTER_UDP_RECV_EVENTS: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(16i32); + pub const QUIC_PERF_COUNTER_UDP_SEND: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(13i32); + pub const QUIC_PERF_COUNTER_UDP_SEND_BYTES: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(15i32); + pub const QUIC_PERF_COUNTER_UDP_SEND_CALLS: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(17i32); + pub const QUIC_PERF_COUNTER_WORK_OPER_COMPLETED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(26i32); + pub const QUIC_PERF_COUNTER_WORK_OPER_QUEUED: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(25i32); + pub const QUIC_PERF_COUNTER_WORK_OPER_QUEUE_DEPTH: QUIC_PERFORMANCE_COUNTERS = + QUIC_PERFORMANCE_COUNTERS(24i32); + pub const QUIC_RECEIVE_FLAG_0_RTT: QUIC_RECEIVE_FLAGS = QUIC_RECEIVE_FLAGS(1i32); + pub const QUIC_RECEIVE_FLAG_FIN: QUIC_RECEIVE_FLAGS = QUIC_RECEIVE_FLAGS(2i32); + pub const QUIC_RECEIVE_FLAG_NONE: QUIC_RECEIVE_FLAGS = QUIC_RECEIVE_FLAGS(0i32); + pub const QUIC_SEND_FLAG_ALLOW_0_RTT: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(1i32); + pub const QUIC_SEND_FLAG_CANCEL_ON_LOSS: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(32i32); + pub const QUIC_SEND_FLAG_DELAY_SEND: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(16i32); + pub const QUIC_SEND_FLAG_DGRAM_PRIORITY: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(8i32); + pub const QUIC_SEND_FLAG_FIN: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(4i32); + pub const QUIC_SEND_FLAG_NONE: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(0i32); + pub const QUIC_SEND_FLAG_PRIORITY_WORK: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(64i32); + pub const QUIC_SEND_FLAG_START: QUIC_SEND_FLAGS = QUIC_SEND_FLAGS(2i32); + pub const QUIC_SEND_RESUMPTION_FLAG_FINAL: QUIC_SEND_RESUMPTION_FLAGS = + QUIC_SEND_RESUMPTION_FLAGS(1i32); + pub const QUIC_SEND_RESUMPTION_FLAG_NONE: QUIC_SEND_RESUMPTION_FLAGS = + QUIC_SEND_RESUMPTION_FLAGS(0i32); + pub const QUIC_SERVER_NO_RESUME: QUIC_SERVER_RESUMPTION_LEVEL = + QUIC_SERVER_RESUMPTION_LEVEL(0i32); + pub const QUIC_SERVER_RESUME_AND_ZERORTT: QUIC_SERVER_RESUMPTION_LEVEL = + QUIC_SERVER_RESUMPTION_LEVEL(2i32); + pub const QUIC_SERVER_RESUME_ONLY: QUIC_SERVER_RESUMPTION_LEVEL = + QUIC_SERVER_RESUMPTION_LEVEL(1i32); + pub const QUIC_STATELESS_RESET_KEY_LENGTH: u32 = 32u32; + pub const QUIC_STREAM_EVENT_CANCEL_ON_LOSS: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(10i32); + pub const QUIC_STREAM_EVENT_IDEAL_SEND_BUFFER_SIZE: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(8i32); + pub const QUIC_STREAM_EVENT_PEER_ACCEPTED: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(9i32); + pub const QUIC_STREAM_EVENT_PEER_RECEIVE_ABORTED: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(5i32); + pub const QUIC_STREAM_EVENT_PEER_SEND_ABORTED: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(4i32); + pub const QUIC_STREAM_EVENT_PEER_SEND_SHUTDOWN: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(3i32); + pub const QUIC_STREAM_EVENT_RECEIVE: QUIC_STREAM_EVENT_TYPE = QUIC_STREAM_EVENT_TYPE(1i32); + pub const QUIC_STREAM_EVENT_SEND_COMPLETE: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(2i32); + pub const QUIC_STREAM_EVENT_SEND_SHUTDOWN_COMPLETE: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(6i32); + pub const QUIC_STREAM_EVENT_SHUTDOWN_COMPLETE: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(7i32); + pub const QUIC_STREAM_EVENT_START_COMPLETE: QUIC_STREAM_EVENT_TYPE = + QUIC_STREAM_EVENT_TYPE(0i32); + pub const QUIC_STREAM_OPEN_FLAG_0_RTT: QUIC_STREAM_OPEN_FLAGS = QUIC_STREAM_OPEN_FLAGS(2i32); + pub const QUIC_STREAM_OPEN_FLAG_DELAY_ID_FC_UPDATES: QUIC_STREAM_OPEN_FLAGS = + QUIC_STREAM_OPEN_FLAGS(4i32); + pub const QUIC_STREAM_OPEN_FLAG_NONE: QUIC_STREAM_OPEN_FLAGS = QUIC_STREAM_OPEN_FLAGS(0i32); + pub const QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL: QUIC_STREAM_OPEN_FLAGS = + QUIC_STREAM_OPEN_FLAGS(1i32); + pub const QUIC_STREAM_SCHEDULING_SCHEME_COUNT: QUIC_STREAM_SCHEDULING_SCHEME = + QUIC_STREAM_SCHEDULING_SCHEME(2i32); + pub const QUIC_STREAM_SCHEDULING_SCHEME_FIFO: QUIC_STREAM_SCHEDULING_SCHEME = + QUIC_STREAM_SCHEDULING_SCHEME(0i32); + pub const QUIC_STREAM_SCHEDULING_SCHEME_ROUND_ROBIN: QUIC_STREAM_SCHEDULING_SCHEME = + QUIC_STREAM_SCHEDULING_SCHEME(1i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_ABORT: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(6i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_ABORT_RECEIVE: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(4i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_ABORT_SEND: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(2i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_GRACEFUL: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(1i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_IMMEDIATE: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(8i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_INLINE: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(16i32); + pub const QUIC_STREAM_SHUTDOWN_FLAG_NONE: QUIC_STREAM_SHUTDOWN_FLAGS = + QUIC_STREAM_SHUTDOWN_FLAGS(0i32); + pub const QUIC_STREAM_START_FLAG_FAIL_BLOCKED: QUIC_STREAM_START_FLAGS = + QUIC_STREAM_START_FLAGS(2i32); + pub const QUIC_STREAM_START_FLAG_IMMEDIATE: QUIC_STREAM_START_FLAGS = + QUIC_STREAM_START_FLAGS(1i32); + pub const QUIC_STREAM_START_FLAG_INDICATE_PEER_ACCEPT: QUIC_STREAM_START_FLAGS = + QUIC_STREAM_START_FLAGS(8i32); + pub const QUIC_STREAM_START_FLAG_NONE: QUIC_STREAM_START_FLAGS = QUIC_STREAM_START_FLAGS(0i32); + pub const QUIC_STREAM_START_FLAG_PRIORITY_WORK: QUIC_STREAM_START_FLAGS = + QUIC_STREAM_START_FLAGS(16i32); + pub const QUIC_STREAM_START_FLAG_SHUTDOWN_ON_FAIL: QUIC_STREAM_START_FLAGS = + QUIC_STREAM_START_FLAGS(4i32); + pub const QUIC_TLS_ALERT_CODE_ACCESS_DENIED: QUIC_TLS_ALERT_CODES = QUIC_TLS_ALERT_CODES(49i32); + pub const QUIC_TLS_ALERT_CODE_BAD_CERTIFICATE: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(42i32); + pub const QUIC_TLS_ALERT_CODE_CERTIFICATE_EXPIRED: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(45i32); + pub const QUIC_TLS_ALERT_CODE_CERTIFICATE_REQUIRED: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(116i32); + pub const QUIC_TLS_ALERT_CODE_CERTIFICATE_REVOKED: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(44i32); + pub const QUIC_TLS_ALERT_CODE_CERTIFICATE_UNKNOWN: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(46i32); + pub const QUIC_TLS_ALERT_CODE_ILLEGAL_PARAMETER: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(47i32); + pub const QUIC_TLS_ALERT_CODE_INSUFFICIENT_SECURITY: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(71i32); + pub const QUIC_TLS_ALERT_CODE_INTERNAL_ERROR: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(80i32); + pub const QUIC_TLS_ALERT_CODE_MAX: QUIC_TLS_ALERT_CODES = QUIC_TLS_ALERT_CODES(255i32); + pub const QUIC_TLS_ALERT_CODE_SUCCESS: QUIC_TLS_ALERT_CODES = QUIC_TLS_ALERT_CODES(65535i32); + pub const QUIC_TLS_ALERT_CODE_UNEXPECTED_MESSAGE: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(10i32); + pub const QUIC_TLS_ALERT_CODE_UNKNOWN_CA: QUIC_TLS_ALERT_CODES = QUIC_TLS_ALERT_CODES(48i32); + pub const QUIC_TLS_ALERT_CODE_UNSUPPORTED_CERTIFICATE: QUIC_TLS_ALERT_CODES = + QUIC_TLS_ALERT_CODES(43i32); + pub const QUIC_TLS_ALERT_CODE_USER_CANCELED: QUIC_TLS_ALERT_CODES = QUIC_TLS_ALERT_CODES(90i32); + pub const QUIC_TLS_PROTOCOL_1_3: QUIC_TLS_PROTOCOL_VERSION = + QUIC_TLS_PROTOCOL_VERSION(12288i32); + pub const QUIC_TLS_PROTOCOL_UNKNOWN: QUIC_TLS_PROTOCOL_VERSION = + QUIC_TLS_PROTOCOL_VERSION(0i32); + pub const QUIC_TLS_PROVIDER_OPENSSL: QUIC_TLS_PROVIDER = QUIC_TLS_PROVIDER(1i32); + pub const QUIC_TLS_PROVIDER_SCHANNEL: QUIC_TLS_PROVIDER = QUIC_TLS_PROVIDER(0i32); + pub const QUIC_TLS_SECRETS_MAX_SECRET_LEN: u32 = 64u32; + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_ALLOWED_CIPHER_SUITE_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_ALLOWED_CIPHER_SUITE_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_ALLOWED_CIPHER_SUITE_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CERTIFICATE_HASH_STORE_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CERTIFICATE_HASH_STORE_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_CERTIFICATE_HASH_STORE_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_CERTIFICATE_HASH_STORE_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CIPHER_ALGORITHM(pub i32); + impl windows_core::TypeKind for QUIC_CIPHER_ALGORITHM { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CIPHER_ALGORITHM { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CIPHER_ALGORITHM") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CIPHER_SUITE(pub i32); + impl windows_core::TypeKind for QUIC_CIPHER_SUITE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CIPHER_SUITE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CIPHER_SUITE").field(&self.0).finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CONGESTION_CONTROL_ALGORITHM(pub i32); + impl windows_core::TypeKind for QUIC_CONGESTION_CONTROL_ALGORITHM { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CONGESTION_CONTROL_ALGORITHM { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CONGESTION_CONTROL_ALGORITHM") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CONNECTION_EVENT_TYPE(pub i32); + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_TYPE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CONNECTION_EVENT_TYPE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CONNECTION_EVENT_TYPE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CONNECTION_SHUTDOWN_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_CONNECTION_SHUTDOWN_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CONNECTION_SHUTDOWN_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CONNECTION_SHUTDOWN_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_CONNECTION_SHUTDOWN_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_CONNECTION_SHUTDOWN_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_CONNECTION_SHUTDOWN_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_CONNECTION_SHUTDOWN_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_CONNECTION_SHUTDOWN_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_CONNECTION_SHUTDOWN_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CREDENTIAL_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_CREDENTIAL_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CREDENTIAL_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CREDENTIAL_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_CREDENTIAL_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_CREDENTIAL_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_CREDENTIAL_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_CREDENTIAL_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_CREDENTIAL_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_CREDENTIAL_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_CREDENTIAL_TYPE(pub i32); + impl windows_core::TypeKind for QUIC_CREDENTIAL_TYPE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_CREDENTIAL_TYPE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_CREDENTIAL_TYPE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_DATAGRAM_SEND_STATE(pub i32); + impl windows_core::TypeKind for QUIC_DATAGRAM_SEND_STATE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_DATAGRAM_SEND_STATE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_DATAGRAM_SEND_STATE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_EXECUTION_CONFIG_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_EXECUTION_CONFIG_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_EXECUTION_CONFIG_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_EXECUTION_CONFIG_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_EXECUTION_CONFIG_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_EXECUTION_CONFIG_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_EXECUTION_CONFIG_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_EXECUTION_CONFIG_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_EXECUTION_CONFIG_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_EXECUTION_CONFIG_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_EXECUTION_PROFILE(pub i32); + impl windows_core::TypeKind for QUIC_EXECUTION_PROFILE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_EXECUTION_PROFILE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_EXECUTION_PROFILE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_HASH_ALGORITHM(pub i32); + impl windows_core::TypeKind for QUIC_HASH_ALGORITHM { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_HASH_ALGORITHM { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_HASH_ALGORITHM").field(&self.0).finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_KEY_EXCHANGE_ALGORITHM(pub i32); + impl windows_core::TypeKind for QUIC_KEY_EXCHANGE_ALGORITHM { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_KEY_EXCHANGE_ALGORITHM { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_KEY_EXCHANGE_ALGORITHM") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_LISTENER_EVENT_TYPE(pub i32); + impl windows_core::TypeKind for QUIC_LISTENER_EVENT_TYPE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_LISTENER_EVENT_TYPE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_LISTENER_EVENT_TYPE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_LOAD_BALANCING_MODE(pub i32); + impl windows_core::TypeKind for QUIC_LOAD_BALANCING_MODE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_LOAD_BALANCING_MODE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_LOAD_BALANCING_MODE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_PERFORMANCE_COUNTERS(pub i32); + impl windows_core::TypeKind for QUIC_PERFORMANCE_COUNTERS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_PERFORMANCE_COUNTERS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_PERFORMANCE_COUNTERS") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_RECEIVE_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_RECEIVE_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_RECEIVE_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_RECEIVE_FLAGS").field(&self.0).finish() + } + } + impl QUIC_RECEIVE_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_RECEIVE_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_RECEIVE_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_RECEIVE_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_RECEIVE_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_RECEIVE_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_SEND_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_SEND_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_SEND_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_SEND_FLAGS").field(&self.0).finish() + } + } + impl QUIC_SEND_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_SEND_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_SEND_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_SEND_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_SEND_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_SEND_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_SEND_RESUMPTION_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_SEND_RESUMPTION_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_SEND_RESUMPTION_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_SEND_RESUMPTION_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_SEND_RESUMPTION_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_SEND_RESUMPTION_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_SEND_RESUMPTION_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_SEND_RESUMPTION_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_SEND_RESUMPTION_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_SEND_RESUMPTION_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_SERVER_RESUMPTION_LEVEL(pub i32); + impl windows_core::TypeKind for QUIC_SERVER_RESUMPTION_LEVEL { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_SERVER_RESUMPTION_LEVEL { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_SERVER_RESUMPTION_LEVEL") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STREAM_EVENT_TYPE(pub i32); + impl windows_core::TypeKind for QUIC_STREAM_EVENT_TYPE { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STREAM_EVENT_TYPE { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STREAM_EVENT_TYPE") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STREAM_OPEN_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_STREAM_OPEN_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STREAM_OPEN_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STREAM_OPEN_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_STREAM_OPEN_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_STREAM_OPEN_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_STREAM_OPEN_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_STREAM_OPEN_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_STREAM_OPEN_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_STREAM_OPEN_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STREAM_SCHEDULING_SCHEME(pub i32); + impl windows_core::TypeKind for QUIC_STREAM_SCHEDULING_SCHEME { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STREAM_SCHEDULING_SCHEME { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STREAM_SCHEDULING_SCHEME") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STREAM_SHUTDOWN_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_STREAM_SHUTDOWN_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STREAM_SHUTDOWN_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STREAM_SHUTDOWN_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_STREAM_SHUTDOWN_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_STREAM_SHUTDOWN_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_STREAM_SHUTDOWN_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_STREAM_SHUTDOWN_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_STREAM_SHUTDOWN_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_STREAM_SHUTDOWN_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_STREAM_START_FLAGS(pub i32); + impl windows_core::TypeKind for QUIC_STREAM_START_FLAGS { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_STREAM_START_FLAGS { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_STREAM_START_FLAGS") + .field(&self.0) + .finish() + } + } + impl QUIC_STREAM_START_FLAGS { + pub const fn contains(&self, other: Self) -> bool { + self.0 & other.0 == other.0 + } + } + impl core::ops::BitOr for QUIC_STREAM_START_FLAGS { + type Output = Self; + fn bitor(self, other: Self) -> Self { + Self(self.0 | other.0) + } + } + impl core::ops::BitAnd for QUIC_STREAM_START_FLAGS { + type Output = Self; + fn bitand(self, other: Self) -> Self { + Self(self.0 & other.0) + } + } + impl core::ops::BitOrAssign for QUIC_STREAM_START_FLAGS { + fn bitor_assign(&mut self, other: Self) { + self.0.bitor_assign(other.0) + } + } + impl core::ops::BitAndAssign for QUIC_STREAM_START_FLAGS { + fn bitand_assign(&mut self, other: Self) { + self.0.bitand_assign(other.0) + } + } + impl core::ops::Not for QUIC_STREAM_START_FLAGS { + type Output = Self; + fn not(self) -> Self { + Self(self.0.not()) + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_TLS_ALERT_CODES(pub i32); + impl windows_core::TypeKind for QUIC_TLS_ALERT_CODES { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_TLS_ALERT_CODES { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_TLS_ALERT_CODES") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_TLS_PROTOCOL_VERSION(pub i32); + impl windows_core::TypeKind for QUIC_TLS_PROTOCOL_VERSION { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_TLS_PROTOCOL_VERSION { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_TLS_PROTOCOL_VERSION") + .field(&self.0) + .finish() + } + } + #[repr(transparent)] + #[derive(PartialEq, Eq, Copy, Clone, Default)] + pub struct QUIC_TLS_PROVIDER(pub i32); + impl windows_core::TypeKind for QUIC_TLS_PROVIDER { + type TypeKind = windows_core::CopyType; + } + impl core::fmt::Debug for QUIC_TLS_PROVIDER { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_tuple("QUIC_TLS_PROVIDER").field(&self.0).finish() + } + } + #[repr(transparent)] + #[derive(Clone, Copy, Debug, PartialEq, Eq)] + pub struct HQUIC(pub isize); + impl HQUIC { + pub fn is_invalid(&self) -> bool { + self.0 == 0 + } + } + impl Default for HQUIC { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + impl windows_core::TypeKind for HQUIC { + type TypeKind = windows_core::CopyType; + } + #[repr(C)] + #[derive(Clone, Copy, Debug)] + pub struct QUIC_API_TABLE { + pub SetContext: QUIC_SET_CONTEXT_FN, + pub GetContext: QUIC_GET_CONTEXT_FN, + pub SetCallbackHandler: QUIC_SET_CALLBACK_HANDLER_FN, + pub SetParam: QUIC_SET_PARAM_FN, + pub GetParam: QUIC_GET_PARAM_FN, + pub RegistrationOpen: QUIC_REGISTRATION_OPEN_FN, + pub RegistrationClose: QUIC_REGISTRATION_CLOSE_FN, + pub RegistrationShutdown: QUIC_REGISTRATION_SHUTDOWN_FN, + pub ConfigurationOpen: QUIC_CONFIGURATION_OPEN_FN, + pub ConfigurationClose: QUIC_CONFIGURATION_CLOSE_FN, + pub ConfigurationLoadCredential: QUIC_CONFIGURATION_LOAD_CREDENTIAL_FN, + pub ListenerOpen: QUIC_LISTENER_OPEN_FN, + pub ListenerClose: QUIC_LISTENER_CLOSE_FN, + pub ListenerStart: QUIC_LISTENER_START_FN, + pub ListenerStop: QUIC_LISTENER_STOP_FN, + pub ConnectionOpen: QUIC_CONNECTION_OPEN_FN, + pub ConnectionClose: QUIC_CONNECTION_CLOSE_FN, + pub ConnectionShutdown: QUIC_CONNECTION_SHUTDOWN_FN, + pub ConnectionStart: QUIC_CONNECTION_START_FN, + pub ConnectionSetConfiguration: QUIC_CONNECTION_SET_CONFIGURATION_FN, + pub ConnectionSendResumptionTicket: QUIC_CONNECTION_SEND_RESUMPTION_FN, + pub StreamOpen: QUIC_STREAM_OPEN_FN, + pub StreamClose: QUIC_STREAM_CLOSE_FN, + pub StreamStart: QUIC_STREAM_START_FN, + pub StreamShutdown: QUIC_STREAM_SHUTDOWN_FN, + pub StreamSend: QUIC_STREAM_SEND_FN, + pub StreamReceiveComplete: QUIC_STREAM_RECEIVE_COMPLETE_FN, + pub StreamReceiveSetEnabled: QUIC_STREAM_RECEIVE_SET_ENABLED_FN, + pub DatagramSend: QUIC_DATAGRAM_SEND_FN, + pub ConnectionResumptionTicketValidationComplete: QUIC_CONNECTION_COMP_RESUMPTION_FN, + pub ConnectionCertificateValidationComplete: QUIC_CONNECTION_COMP_CERT_FN, + } + impl windows_core::TypeKind for QUIC_API_TABLE { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_API_TABLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_BUFFER { + pub Length: u32, + pub Buffer: *mut u8, + } + impl windows_core::TypeKind for QUIC_BUFFER { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_BUFFER { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CERTIFICATE_FILE { + pub PrivateKeyFile: windows_core::PCSTR, + pub CertificateFile: windows_core::PCSTR, + } + impl windows_core::TypeKind for QUIC_CERTIFICATE_FILE { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CERTIFICATE_FILE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CERTIFICATE_FILE_PROTECTED { + pub PrivateKeyFile: windows_core::PCSTR, + pub CertificateFile: windows_core::PCSTR, + pub PrivateKeyPassword: windows_core::PCSTR, + } + impl windows_core::TypeKind for QUIC_CERTIFICATE_FILE_PROTECTED { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CERTIFICATE_FILE_PROTECTED { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CERTIFICATE_HASH { + pub ShaHash: [u8; 20], + } + impl windows_core::TypeKind for QUIC_CERTIFICATE_HASH { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CERTIFICATE_HASH { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CERTIFICATE_HASH_STORE { + pub Flags: QUIC_CERTIFICATE_HASH_STORE_FLAGS, + pub ShaHash: [u8; 20], + pub StoreName: [i8; 128], + } + impl windows_core::TypeKind for QUIC_CERTIFICATE_HASH_STORE { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CERTIFICATE_HASH_STORE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CERTIFICATE_PKCS12 { + pub Asn1Blob: *const u8, + pub Asn1BlobLength: u32, + pub PrivateKeyPassword: windows_core::PCSTR, + } + impl windows_core::TypeKind for QUIC_CERTIFICATE_PKCS12 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CERTIFICATE_PKCS12 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_CONNECTION_EVENT { + pub Type: QUIC_CONNECTION_EVENT_TYPE, + pub Anonymous: QUIC_CONNECTION_EVENT_0, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_CONNECTION_EVENT_0 { + pub CONNECTED: QUIC_CONNECTION_EVENT_0_0, + pub SHUTDOWN_INITIATED_BY_TRANSPORT: QUIC_CONNECTION_EVENT_0_14, + pub SHUTDOWN_INITIATED_BY_PEER: QUIC_CONNECTION_EVENT_0_13, + pub SHUTDOWN_COMPLETE: QUIC_CONNECTION_EVENT_0_12, + pub LOCAL_ADDRESS_CHANGED: QUIC_CONNECTION_EVENT_0_5, + pub PEER_ADDRESS_CHANGED: QUIC_CONNECTION_EVENT_0_6, + pub PEER_STREAM_STARTED: QUIC_CONNECTION_EVENT_0_9, + pub STREAMS_AVAILABLE: QUIC_CONNECTION_EVENT_0_15, + pub PEER_NEEDS_STREAMS: QUIC_CONNECTION_EVENT_0_8, + pub IDEAL_PROCESSOR_CHANGED: QUIC_CONNECTION_EVENT_0_4, + pub DATAGRAM_STATE_CHANGED: QUIC_CONNECTION_EVENT_0_3, + pub DATAGRAM_RECEIVED: QUIC_CONNECTION_EVENT_0_1, + pub DATAGRAM_SEND_STATE_CHANGED: QUIC_CONNECTION_EVENT_0_2, + pub RESUMED: QUIC_CONNECTION_EVENT_0_10, + pub RESUMPTION_TICKET_RECEIVED: QUIC_CONNECTION_EVENT_0_11, + pub PEER_CERTIFICATE_RECEIVED: QUIC_CONNECTION_EVENT_0_7, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_0 { + pub SessionResumed: windows::Win32::Foundation::BOOLEAN, + pub NegotiatedAlpnLength: u8, + pub NegotiatedAlpn: *const u8, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_1 { + pub Buffer: *const QUIC_BUFFER, + pub Flags: QUIC_RECEIVE_FLAGS, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_1 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_2 { + pub ClientContext: *mut core::ffi::c_void, + pub State: QUIC_DATAGRAM_SEND_STATE, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_2 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_3 { + pub SendEnabled: windows::Win32::Foundation::BOOLEAN, + pub MaxSendLength: u16, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_3 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_4 { + pub IdealProcessor: u16, + pub PartitionIndex: u16, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_4 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_4 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_5 { + pub Address: *const windows::Win32::Networking::WinSock::SOCKADDR_INET, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_5 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_5 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_6 { + pub Address: *const windows::Win32::Networking::WinSock::SOCKADDR_INET, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_6 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_6 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_7 { + pub Certificate: *mut core::ffi::c_void, + pub DeferredErrorFlags: u32, + pub DeferredStatus: i32, + pub Chain: *mut core::ffi::c_void, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_7 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_7 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_8 { + pub Bidirectional: windows::Win32::Foundation::BOOLEAN, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_8 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_8 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_9 { + pub Stream: *mut QUIC_HANDLE, + pub Flags: QUIC_STREAM_OPEN_FLAGS, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_9 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_9 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_10 { + pub ResumptionStateLength: u16, + pub ResumptionState: *const u8, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_10 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_10 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_11 { + pub ResumptionTicketLength: u32, + pub ResumptionTicket: *const u8, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_11 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_11 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_12 { + pub _bitfield: u8, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_12 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_12 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_13 { + pub ErrorCode: u64, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_13 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_13 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_14 { + pub Status: i32, + pub ErrorCode: u64, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_14 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_14 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_CONNECTION_EVENT_0_15 { + pub BidirectionalCount: u16, + pub UnidirectionalCount: u16, + } + impl windows_core::TypeKind for QUIC_CONNECTION_EVENT_0_15 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CONNECTION_EVENT_0_15 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_CREDENTIAL_CONFIG { + pub Type: QUIC_CREDENTIAL_TYPE, + pub Flags: QUIC_CREDENTIAL_FLAGS, + pub Anonymous: QUIC_CREDENTIAL_CONFIG_0, + pub Principal: windows_core::PCSTR, + pub Reserved: *mut core::ffi::c_void, + pub AsyncHandler: QUIC_CREDENTIAL_LOAD_COMPLETE_HANDLER, + pub AllowedCipherSuites: QUIC_ALLOWED_CIPHER_SUITE_FLAGS, + pub CaCertificateFile: windows_core::PCSTR, + } + impl windows_core::TypeKind for QUIC_CREDENTIAL_CONFIG { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CREDENTIAL_CONFIG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_CREDENTIAL_CONFIG_0 { + pub CertificateHash: *mut QUIC_CERTIFICATE_HASH, + pub CertificateHashStore: *mut QUIC_CERTIFICATE_HASH_STORE, + pub CertificateContext: *mut core::ffi::c_void, + pub CertificateFile: *mut QUIC_CERTIFICATE_FILE, + pub CertificateFileProtected: *mut QUIC_CERTIFICATE_FILE_PROTECTED, + pub CertificatePkcs12: *mut QUIC_CERTIFICATE_PKCS12, + } + impl windows_core::TypeKind for QUIC_CREDENTIAL_CONFIG_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_CREDENTIAL_CONFIG_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_EXECUTION_CONFIG { + pub Flags: QUIC_EXECUTION_CONFIG_FLAGS, + pub PollingIdleTimeoutUs: u32, + pub ProcessorCount: u32, + pub ProcessorList: [u16; 1], + } + impl windows_core::TypeKind for QUIC_EXECUTION_CONFIG { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_EXECUTION_CONFIG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_GLOBAL_SETTINGS { + pub Anonymous: QUIC_GLOBAL_SETTINGS_0, + pub RetryMemoryLimit: u16, + pub LoadBalancingMode: u16, + pub FixedServerID: u32, + } + impl windows_core::TypeKind for QUIC_GLOBAL_SETTINGS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_GLOBAL_SETTINGS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_GLOBAL_SETTINGS_0 { + pub IsSetFlags: u64, + pub IsSet: QUIC_GLOBAL_SETTINGS_0_0, + } + impl windows_core::TypeKind for QUIC_GLOBAL_SETTINGS_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_GLOBAL_SETTINGS_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_GLOBAL_SETTINGS_0_0 { + pub _bitfield: u64, + } + impl windows_core::TypeKind for QUIC_GLOBAL_SETTINGS_0_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_GLOBAL_SETTINGS_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(transparent)] + #[derive(Clone, Copy, Debug, PartialEq, Eq)] + pub struct QUIC_HANDLE(pub isize); + impl Default for QUIC_HANDLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + impl windows_core::TypeKind for QUIC_HANDLE { + type TypeKind = windows_core::CopyType; + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_HANDSHAKE_INFO { + pub TlsProtocolVersion: QUIC_TLS_PROTOCOL_VERSION, + pub CipherAlgorithm: QUIC_CIPHER_ALGORITHM, + pub CipherStrength: i32, + pub Hash: QUIC_HASH_ALGORITHM, + pub HashStrength: i32, + pub KeyExchangeAlgorithm: QUIC_KEY_EXCHANGE_ALGORITHM, + pub KeyExchangeStrength: i32, + pub CipherSuite: QUIC_CIPHER_SUITE, + } + impl windows_core::TypeKind for QUIC_HANDSHAKE_INFO { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_HANDSHAKE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_LISTENER_EVENT { + pub Type: QUIC_LISTENER_EVENT_TYPE, + pub Anonymous: QUIC_LISTENER_EVENT_0, + } + impl windows_core::TypeKind for QUIC_LISTENER_EVENT { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_LISTENER_EVENT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_LISTENER_EVENT_0 { + pub NEW_CONNECTION: QUIC_LISTENER_EVENT_0_0, + pub STOP_COMPLETE: QUIC_LISTENER_EVENT_0_1, + } + impl windows_core::TypeKind for QUIC_LISTENER_EVENT_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_LISTENER_EVENT_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_LISTENER_EVENT_0_0 { + pub Info: *const QUIC_NEW_CONNECTION_INFO, + pub Connection: *mut QUIC_HANDLE, + } + impl windows_core::TypeKind for QUIC_LISTENER_EVENT_0_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_LISTENER_EVENT_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_LISTENER_EVENT_0_1 { + pub _bitfield: u8, + } + impl windows_core::TypeKind for QUIC_LISTENER_EVENT_0_1 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_LISTENER_EVENT_0_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_LISTENER_STATISTICS { + pub TotalAcceptedConnections: u64, + pub TotalRejectedConnections: u64, + pub BindingRecvDroppedPackets: u64, + } + impl windows_core::TypeKind for QUIC_LISTENER_STATISTICS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_LISTENER_STATISTICS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_NEW_CONNECTION_INFO { + pub QuicVersion: u32, + pub LocalAddress: *const windows::Win32::Networking::WinSock::SOCKADDR_INET, + pub RemoteAddress: *const windows::Win32::Networking::WinSock::SOCKADDR_INET, + pub CryptoBufferLength: u32, + pub ClientAlpnListLength: u16, + pub ServerNameLength: u16, + pub NegotiatedAlpnLength: u8, + pub CryptoBuffer: *const u8, + pub ClientAlpnList: *const u8, + pub NegotiatedAlpn: *const u8, + pub ServerName: windows_core::PCSTR, + } + impl windows_core::TypeKind for QUIC_NEW_CONNECTION_INFO { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_NEW_CONNECTION_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_REGISTRATION_CONFIG { + pub AppName: windows_core::PCSTR, + pub ExecutionProfile: QUIC_EXECUTION_PROFILE, + } + impl windows_core::TypeKind for QUIC_REGISTRATION_CONFIG { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_REGISTRATION_CONFIG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_EX_W { + pub Attribute: u32, + pub BufferLength: u32, + pub Buffer: *mut core::ffi::c_void, + } + impl windows_core::TypeKind for QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_EX_W { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_EX_W { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_W { + pub Attribute: u32, + pub Buffer: *mut core::ffi::c_void, + } + impl windows_core::TypeKind for QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_W { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SCHANNEL_CONTEXT_ATTRIBUTE_W { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W { + pub Attribute: u32, + pub BufferLength: u32, + pub Buffer: *mut core::ffi::c_void, + } + impl windows_core::TypeKind for QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_SETTINGS { + pub Anonymous1: QUIC_SETTINGS_0, + pub MaxBytesPerKey: u64, + pub HandshakeIdleTimeoutMs: u64, + pub IdleTimeoutMs: u64, + pub MtuDiscoverySearchCompleteTimeoutUs: u64, + pub TlsClientMaxSendBuffer: u32, + pub TlsServerMaxSendBuffer: u32, + pub StreamRecvWindowDefault: u32, + pub StreamRecvBufferDefault: u32, + pub ConnFlowControlWindow: u32, + pub MaxWorkerQueueDelayUs: u32, + pub MaxStatelessOperations: u32, + pub InitialWindowPackets: u32, + pub SendIdleTimeoutMs: u32, + pub InitialRttMs: u32, + pub MaxAckDelayMs: u32, + pub DisconnectTimeoutMs: u32, + pub KeepAliveIntervalMs: u32, + pub CongestionControlAlgorithm: u16, + pub PeerBidiStreamCount: u16, + pub PeerUnidiStreamCount: u16, + pub MaxBindingStatelessOperations: u16, + pub StatelessOperationExpirationMs: u16, + pub MinimumMtu: u16, + pub MaximumMtu: u16, + pub _bitfield: u8, + pub MaxOperationsPerDrain: u8, + pub MtuDiscoveryMissingProbeCount: u8, + pub DestCidUpdateIdleTimeoutMs: u32, + pub Anonymous2: QUIC_SETTINGS_1, + pub StreamRecvWindowBidiLocalDefault: u32, + pub StreamRecvWindowBidiRemoteDefault: u32, + pub StreamRecvWindowUnidiDefault: u32, + } + impl windows_core::TypeKind for QUIC_SETTINGS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SETTINGS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_SETTINGS_0 { + pub IsSetFlags: u64, + pub IsSet: QUIC_SETTINGS_0_0, + } + impl windows_core::TypeKind for QUIC_SETTINGS_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SETTINGS_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_SETTINGS_0_0 { + pub _bitfield: u64, + } + impl windows_core::TypeKind for QUIC_SETTINGS_0_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SETTINGS_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_SETTINGS_1 { + pub Flags: u64, + pub Anonymous: QUIC_SETTINGS_1_0, + } + impl windows_core::TypeKind for QUIC_SETTINGS_1 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SETTINGS_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_SETTINGS_1_0 { + pub _bitfield: u64, + } + impl windows_core::TypeKind for QUIC_SETTINGS_1_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_SETTINGS_1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS { + pub CorrelationId: u64, + pub _bitfield: u32, + pub Rtt: u32, + pub MinRtt: u32, + pub MaxRtt: u32, + pub Timing: QUIC_STATISTICS_4, + pub Handshake: QUIC_STATISTICS_0, + pub Send: QUIC_STATISTICS_3, + pub Recv: QUIC_STATISTICS_2, + pub Misc: QUIC_STATISTICS_1, + } + impl windows_core::TypeKind for QUIC_STATISTICS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_0 { + pub ClientFlight1Bytes: u32, + pub ServerFlight1Bytes: u32, + pub ClientFlight2Bytes: u32, + } + impl windows_core::TypeKind for QUIC_STATISTICS_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_1 { + pub KeyUpdateCount: u32, + } + impl windows_core::TypeKind for QUIC_STATISTICS_1 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_2 { + pub TotalPackets: u64, + pub ReorderedPackets: u64, + pub DroppedPackets: u64, + pub DuplicatePackets: u64, + pub TotalBytes: u64, + pub TotalStreamBytes: u64, + pub DecryptionFailures: u64, + pub ValidAckFrames: u64, + } + impl windows_core::TypeKind for QUIC_STATISTICS_2 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_3 { + pub PathMtu: u16, + pub TotalPackets: u64, + pub RetransmittablePackets: u64, + pub SuspectedLostPackets: u64, + pub SpuriousLostPackets: u64, + pub TotalBytes: u64, + pub TotalStreamBytes: u64, + pub CongestionCount: u32, + pub PersistentCongestionCount: u32, + } + impl windows_core::TypeKind for QUIC_STATISTICS_3 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_4 { + pub Start: u64, + pub InitialFlightEnd: u64, + pub HandshakeFlightEnd: u64, + } + impl windows_core::TypeKind for QUIC_STATISTICS_4 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_4 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STATISTICS_V2 { + pub CorrelationId: u64, + pub _bitfield: u32, + pub Rtt: u32, + pub MinRtt: u32, + pub MaxRtt: u32, + pub TimingStart: u64, + pub TimingInitialFlightEnd: u64, + pub TimingHandshakeFlightEnd: u64, + pub HandshakeClientFlight1Bytes: u32, + pub HandshakeServerFlight1Bytes: u32, + pub HandshakeClientFlight2Bytes: u32, + pub SendPathMtu: u16, + pub SendTotalPackets: u64, + pub SendRetransmittablePackets: u64, + pub SendSuspectedLostPackets: u64, + pub SendSpuriousLostPackets: u64, + pub SendTotalBytes: u64, + pub SendTotalStreamBytes: u64, + pub SendCongestionCount: u32, + pub SendPersistentCongestionCount: u32, + pub RecvTotalPackets: u64, + pub RecvReorderedPackets: u64, + pub RecvDroppedPackets: u64, + pub RecvDuplicatePackets: u64, + pub RecvTotalBytes: u64, + pub RecvTotalStreamBytes: u64, + pub RecvDecryptionFailures: u64, + pub RecvValidAckFrames: u64, + pub KeyUpdateCount: u32, + pub SendCongestionWindow: u32, + pub DestCidUpdateCount: u32, + pub SendEcnCongestionCount: u32, + pub HandshakeHopLimitTTL: u8, + } + impl windows_core::TypeKind for QUIC_STATISTICS_V2 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STATISTICS_V2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct QUIC_STREAM_EVENT { + pub Type: QUIC_STREAM_EVENT_TYPE, + pub Anonymous: QUIC_STREAM_EVENT_0, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union QUIC_STREAM_EVENT_0 { + pub START_COMPLETE: QUIC_STREAM_EVENT_0_8, + pub RECEIVE: QUIC_STREAM_EVENT_0_4, + pub SEND_COMPLETE: QUIC_STREAM_EVENT_0_5, + pub PEER_SEND_ABORTED: QUIC_STREAM_EVENT_0_3, + pub PEER_RECEIVE_ABORTED: QUIC_STREAM_EVENT_0_2, + pub SEND_SHUTDOWN_COMPLETE: QUIC_STREAM_EVENT_0_6, + pub SHUTDOWN_COMPLETE: QUIC_STREAM_EVENT_0_7, + pub IDEAL_SEND_BUFFER_SIZE: QUIC_STREAM_EVENT_0_1, + pub CANCEL_ON_LOSS: QUIC_STREAM_EVENT_0_0, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_0 { + pub ErrorCode: u64, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_1 { + pub ByteCount: u64, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_1 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_2 { + pub ErrorCode: u64, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_2 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_3 { + pub ErrorCode: u64, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_3 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_4 { + pub AbsoluteOffset: u64, + pub TotalBufferLength: u64, + pub Buffers: *const QUIC_BUFFER, + pub BufferCount: u32, + pub Flags: QUIC_RECEIVE_FLAGS, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_4 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_4 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_5 { + pub Canceled: windows::Win32::Foundation::BOOLEAN, + pub ClientContext: *mut core::ffi::c_void, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_5 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_5 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_6 { + pub Graceful: windows::Win32::Foundation::BOOLEAN, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_6 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_6 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_7 { + pub ConnectionShutdown: windows::Win32::Foundation::BOOLEAN, + pub _bitfield: u8, + pub ConnectionErrorCode: u64, + pub ConnectionCloseStatus: i32, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_7 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_7 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_EVENT_0_8 { + pub Status: i32, + pub ID: u64, + pub _bitfield: u8, + } + impl windows_core::TypeKind for QUIC_STREAM_EVENT_0_8 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_EVENT_0_8 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_STREAM_STATISTICS { + pub ConnBlockedBySchedulingUs: u64, + pub ConnBlockedByPacingUs: u64, + pub ConnBlockedByAmplificationProtUs: u64, + pub ConnBlockedByCongestionControlUs: u64, + pub ConnBlockedByFlowControlUs: u64, + pub StreamBlockedByIdFlowControlUs: u64, + pub StreamBlockedByFlowControlUs: u64, + pub StreamBlockedByAppUs: u64, + } + impl windows_core::TypeKind for QUIC_STREAM_STATISTICS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_STREAM_STATISTICS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_TICKET_KEY_CONFIG { + pub Id: [u8; 16], + pub Material: [u8; 64], + pub MaterialLength: u8, + } + impl windows_core::TypeKind for QUIC_TICKET_KEY_CONFIG { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_TICKET_KEY_CONFIG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_TLS_SECRETS { + pub SecretLength: u8, + pub IsSet: QUIC_TLS_SECRETS_0, + pub ClientRandom: [u8; 32], + pub ClientEarlyTrafficSecret: [u8; 64], + pub ClientHandshakeTrafficSecret: [u8; 64], + pub ServerHandshakeTrafficSecret: [u8; 64], + pub ClientTrafficSecret0: [u8; 64], + pub ServerTrafficSecret0: [u8; 64], + } + impl windows_core::TypeKind for QUIC_TLS_SECRETS { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_TLS_SECRETS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + #[repr(C)] + #[derive(Clone, Copy, Debug, Eq, PartialEq)] + pub struct QUIC_TLS_SECRETS_0 { + pub _bitfield: u8, + } + impl windows_core::TypeKind for QUIC_TLS_SECRETS_0 { + type TypeKind = windows_core::CopyType; + } + impl Default for QUIC_TLS_SECRETS_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } + } + pub type MsQuicCloseFn = Option; + pub type MsQuicOpenVersionFn = Option< + unsafe extern "system" fn(version: u32, quicapi: *mut *mut core::ffi::c_void) -> i32, + >; + pub type QUIC_CONFIGURATION_CLOSE_FN = + Option; + pub type QUIC_CONFIGURATION_LOAD_CREDENTIAL_FN = Option< + unsafe extern "system" fn( + configuration: *const QUIC_HANDLE, + credconfig: *const QUIC_CREDENTIAL_CONFIG, + ) -> i32, + >; + pub type QUIC_CONFIGURATION_OPEN_FN = Option< + unsafe extern "system" fn( + registration: *const QUIC_HANDLE, + alpnbuffers: *const QUIC_BUFFER, + alpnbuffercount: u32, + settings: *const QUIC_SETTINGS, + settingssize: u32, + context: *const core::ffi::c_void, + configuration: *mut *mut QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_CONNECTION_CALLBACK = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + context: *const core::ffi::c_void, + event: *mut QUIC_CONNECTION_EVENT, + ) -> i32, + >; + pub type QUIC_CONNECTION_CALLBACK_HANDLER = Option i32>; + pub type QUIC_CONNECTION_CLOSE_FN = + Option; + pub type QUIC_CONNECTION_COMP_CERT_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + result: windows::Win32::Foundation::BOOLEAN, + tlsalert: QUIC_TLS_ALERT_CODES, + ) -> i32, + >; + pub type QUIC_CONNECTION_COMP_RESUMPTION_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + result: windows::Win32::Foundation::BOOLEAN, + ) -> i32, + >; + pub type QUIC_CONNECTION_OPEN_FN = Option< + unsafe extern "system" fn( + registration: *const QUIC_HANDLE, + handler: QUIC_CONNECTION_CALLBACK_HANDLER, + context: *const core::ffi::c_void, + connection: *mut *mut QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_CONNECTION_SEND_RESUMPTION_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + flags: QUIC_SEND_RESUMPTION_FLAGS, + datalength: u16, + resumptiondata: *const u8, + ) -> i32, + >; + pub type QUIC_CONNECTION_SET_CONFIGURATION_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + configuration: *const QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_CONNECTION_SHUTDOWN_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + flags: QUIC_CONNECTION_SHUTDOWN_FLAGS, + errorcode: u64, + ), + >; + pub type QUIC_CONNECTION_START_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + configuration: *const QUIC_HANDLE, + family: u16, + servername: windows_core::PCSTR, + serverport: u16, + ) -> i32, + >; + pub type QUIC_CREDENTIAL_LOAD_COMPLETE = Option< + unsafe extern "system" fn( + configuration: *const QUIC_HANDLE, + context: *const core::ffi::c_void, + status: i32, + ), + >; + pub type QUIC_CREDENTIAL_LOAD_COMPLETE_HANDLER = Option; + pub type QUIC_DATAGRAM_SEND_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + buffers: *const QUIC_BUFFER, + buffercount: u32, + flags: QUIC_SEND_FLAGS, + clientsendcontext: *const core::ffi::c_void, + ) -> i32, + >; + pub type QUIC_GET_CONTEXT_FN = + Option *mut core::ffi::c_void>; + pub type QUIC_GET_PARAM_FN = Option< + unsafe extern "system" fn( + handle: *const QUIC_HANDLE, + param: u32, + bufferlength: *mut u32, + buffer: *mut core::ffi::c_void, + ) -> i32, + >; + pub type QUIC_LISTENER_CALLBACK = Option< + unsafe extern "system" fn( + listener: *const QUIC_HANDLE, + context: *const core::ffi::c_void, + event: *mut QUIC_LISTENER_EVENT, + ) -> i32, + >; + pub type QUIC_LISTENER_CALLBACK_HANDLER = Option i32>; + pub type QUIC_LISTENER_CLOSE_FN = + Option; + pub type QUIC_LISTENER_OPEN_FN = Option< + unsafe extern "system" fn( + registration: *const QUIC_HANDLE, + handler: QUIC_LISTENER_CALLBACK_HANDLER, + context: *const core::ffi::c_void, + listener: *mut *mut QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_LISTENER_START_FN = Option< + unsafe extern "system" fn( + listener: *const QUIC_HANDLE, + alpnbuffers: *const QUIC_BUFFER, + alpnbuffercount: u32, + localaddress: *const windows::Win32::Networking::WinSock::SOCKADDR_INET, + ) -> i32, + >; + pub type QUIC_LISTENER_STOP_FN = + Option; + pub type QUIC_REGISTRATION_CLOSE_FN = + Option; + pub type QUIC_REGISTRATION_OPEN_FN = Option< + unsafe extern "system" fn( + config: *const QUIC_REGISTRATION_CONFIG, + registration: *mut *mut QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_REGISTRATION_SHUTDOWN_FN = Option< + unsafe extern "system" fn( + registration: *const QUIC_HANDLE, + flags: QUIC_CONNECTION_SHUTDOWN_FLAGS, + errorcode: u64, + ), + >; + pub type QUIC_SET_CALLBACK_HANDLER_FN = Option< + unsafe extern "system" fn( + handle: *const QUIC_HANDLE, + handler: *const core::ffi::c_void, + context: *const core::ffi::c_void, + ), + >; + pub type QUIC_SET_CONTEXT_FN = Option< + unsafe extern "system" fn(handle: *const QUIC_HANDLE, context: *const core::ffi::c_void), + >; + pub type QUIC_SET_PARAM_FN = Option< + unsafe extern "system" fn( + handle: *const QUIC_HANDLE, + param: u32, + bufferlength: u32, + buffer: *const core::ffi::c_void, + ) -> i32, + >; + pub type QUIC_STREAM_CALLBACK = Option< + unsafe extern "system" fn( + stream: *const QUIC_HANDLE, + context: *const core::ffi::c_void, + event: *mut QUIC_STREAM_EVENT, + ) -> i32, + >; + pub type QUIC_STREAM_CALLBACK_HANDLER = Option i32>; + pub type QUIC_STREAM_CLOSE_FN = Option; + pub type QUIC_STREAM_OPEN_FN = Option< + unsafe extern "system" fn( + connection: *const QUIC_HANDLE, + flags: QUIC_STREAM_OPEN_FLAGS, + handler: QUIC_STREAM_CALLBACK_HANDLER, + context: *const core::ffi::c_void, + stream: *mut *mut QUIC_HANDLE, + ) -> i32, + >; + pub type QUIC_STREAM_RECEIVE_COMPLETE_FN = + Option; + pub type QUIC_STREAM_RECEIVE_SET_ENABLED_FN = Option< + unsafe extern "system" fn( + stream: *const QUIC_HANDLE, + isenabled: windows::Win32::Foundation::BOOLEAN, + ) -> i32, + >; + pub type QUIC_STREAM_SEND_FN = Option< + unsafe extern "system" fn( + stream: *const QUIC_HANDLE, + buffers: *const QUIC_BUFFER, + buffercount: u32, + flags: QUIC_SEND_FLAGS, + clientsendcontext: *const core::ffi::c_void, + ) -> i32, + >; + pub type QUIC_STREAM_SHUTDOWN_FN = Option< + unsafe extern "system" fn( + stream: *const QUIC_HANDLE, + flags: QUIC_STREAM_SHUTDOWN_FLAGS, + errorcode: u64, + ) -> i32, + >; + pub type QUIC_STREAM_START_FN = Option< + unsafe extern "system" fn( + stream: *const QUIC_HANDLE, + flags: QUIC_STREAM_START_FLAGS, + ) -> i32, + >; +} diff --git a/crates/libs/msquic-rs/src/lib.rs b/crates/libs/msquic-rs/src/lib.rs new file mode 100644 index 0000000000..6a3585a304 --- /dev/null +++ b/crates/libs/msquic-rs/src/lib.rs @@ -0,0 +1,11 @@ +#[allow( + non_camel_case_types, + non_snake_case, + non_upper_case_globals, + clippy::derivable_impls, + clippy::missing_safety_doc, + clippy::too_many_arguments, + clippy::extra_unused_lifetimes, + clippy::useless_transmute +)] +pub mod Microsoft; diff --git a/crates/tools/api/Cargo.toml b/crates/tools/api/Cargo.toml new file mode 100644 index 0000000000..8fcf4de32a --- /dev/null +++ b/crates/tools/api/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "tools_api" +version = "0.1.0" +edition = "2021" +publish = false + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +windows-bindgen = "0.57" \ No newline at end of file diff --git a/crates/tools/api/src/main.rs b/crates/tools/api/src/main.rs new file mode 100644 index 0000000000..d8f41056ec --- /dev/null +++ b/crates/tools/api/src/main.rs @@ -0,0 +1,24 @@ +// ------------------------------------------------------------ +// Copyright 2024 Youyuan Wu +// Licensed under the MIT License (MIT). See License in the repo root for +// license information. +// ------------------------------------------------------------ + +use windows_bindgen::{bindgen, Result}; + +fn main() -> Result<()> { + let log = bindgen([ + "--in", + "./crates/.windows/winmd/Microsoft.MsQuic.winmd", + "--out", + "crates/libs/msquic-rs/src/Microsoft.rs", + "--filter", + "Microsoft", + "!Microsoft.MsQuic.MsQuicOpenVersion", // Skip functions that needs linking + "!Microsoft.MsQuic.MsQuicClose", + "--config", + "implement", + ])?; + println!("{}", log); + Ok(()) +} diff --git a/scripts/build.rs b/scripts/build.rs index 2881cb0001..8de6e938d6 100644 --- a/scripts/build.rs +++ b/scripts/build.rs @@ -2,8 +2,8 @@ // Licensed under the MIT License. use cmake::Config; -use std::path::Path; use std::env; +use std::path::Path; fn main() { let path_extra = "lib"; @@ -32,7 +32,7 @@ fn main() { "aarch64-apple-darwin" => config .define("CMAKE_OSX_ARCHITECTURES", "arm64") .define("CMAKE_OSX_DEPLOYMENT_TARGET", "14.5"), - _ => &mut config + _ => &mut config, }; let dst = config.build(); diff --git a/src/lib.rs b/src/lib.rs index 70ed8e3001..a5180fc6b5 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -143,8 +143,10 @@ mod status { #[cfg(target_os = "linux")] mod status { pub const QUIC_STATUS_SUCCESS: u32 = 0; - pub const QUIC_STATUS_PENDING: u32 = 0xFFFFFFFE; /// -2 - pub const QUIC_STATUS_CONTINUE: u32 = 0xFFFFFFFF; /// -1 + pub const QUIC_STATUS_PENDING: u32 = 0xFFFFFFFE; + /// -2 + pub const QUIC_STATUS_CONTINUE: u32 = 0xFFFFFFFF; + /// -1 pub const QUIC_STATUS_OUT_OF_MEMORY: u32 = 12; pub const QUIC_STATUS_INVALID_PARAMETER: u32 = 22; pub const QUIC_STATUS_INVALID_STATE: u32 = 1; @@ -183,8 +185,10 @@ mod status { #[cfg(target_os = "macos")] mod status { pub const QUIC_STATUS_SUCCESS: u32 = 0; - pub const QUIC_STATUS_PENDING: u32 = 0xFFFFFFFE; /// -2 - pub const QUIC_STATUS_CONTINUE: u32 = 0xFFFFFFFF; /// -1 + pub const QUIC_STATUS_PENDING: u32 = 0xFFFFFFFE; + /// -2 + pub const QUIC_STATUS_CONTINUE: u32 = 0xFFFFFFFF; + /// -1 pub const QUIC_STATUS_OUT_OF_MEMORY: u32 = 12; pub const QUIC_STATUS_INVALID_PARAMETER: u32 = 22; pub const QUIC_STATUS_INVALID_STATE: u32 = 1; @@ -1216,15 +1220,10 @@ struct ApiTable { flags: SendFlags, client_send_context: *const c_void, ) -> u32, - resumption_ticket_validation_complete: extern "C" fn( - connection: Handle, - result: BOOLEAN, - ) -> u32, - certificate_validation_complete: extern "C" fn( - connection: Handle, - result: BOOLEAN, - tls_alert: TlsAlertCode - ) -> u32, + resumption_ticket_validation_complete: + extern "C" fn(connection: Handle, result: BOOLEAN) -> u32, + certificate_validation_complete: + extern "C" fn(connection: Handle, result: BOOLEAN, tls_alert: TlsAlertCode) -> u32, } #[link(name = "msquic")] @@ -1552,7 +1551,12 @@ impl Connection { Ok(()) } - pub fn start(&self, configuration: &Configuration, server_name: &str, server_port: u16) -> Result<(), u32> { + pub fn start( + &self, + configuration: &Configuration, + server_name: &str, + server_port: u16, + ) -> Result<(), u32> { let server_name_safe = std::ffi::CString::new(server_name).unwrap(); let status = unsafe { ((*self.table).connection_start)( @@ -1672,16 +1676,9 @@ impl Connection { Ok(()) } - pub fn resumption_ticket_validation_complete( - &self, - result: BOOLEAN, - ) -> Result<(), u32> { - let status = unsafe { - ((*self.table).resumption_ticket_validation_complete)( - self.handle, - result, - ) - }; + pub fn resumption_ticket_validation_complete(&self, result: BOOLEAN) -> Result<(), u32> { + let status = + unsafe { ((*self.table).resumption_ticket_validation_complete)(self.handle, result) }; if Status::failed(status) { return Err(status); } @@ -1694,11 +1691,7 @@ impl Connection { tls_alert: TlsAlertCode, ) -> Result<(), u32> { let status = unsafe { - ((*self.table).certificate_validation_complete)( - self.handle, - result, - tls_alert, - ) + ((*self.table).certificate_validation_complete)(self.handle, result, tls_alert) }; if Status::failed(status) { return Err(status); @@ -1915,11 +1908,19 @@ extern "C" fn test_stream_callback( #[test] fn test_module() { let res = Api::new(); - assert!(res.is_ok(), "Failed to open API: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to open API: 0x{:x}", + res.err().unwrap() + ); let api = res.unwrap(); let res = Registration::new(&api, ptr::null()); - assert!(res.is_ok(), "Failed to open registration: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to open registration: 0x{:x}", + res.err().unwrap() + ); let registration = res.unwrap(); let alpn = [Buffer::from("h3")]; @@ -1930,12 +1931,20 @@ fn test_module() { .set_peer_bidi_stream_count(100) .set_peer_unidi_stream_count(3), ); - assert!(res.is_ok(), "Failed to open configuration: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to open configuration: 0x{:x}", + res.err().unwrap() + ); let configuration = res.unwrap(); let cred_config = CredentialConfig::new_client(); let res = configuration.load_credential(&cred_config); - assert!(res.is_ok(), "Failed to load credential: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to load credential: 0x{:x}", + res.err().unwrap() + ); let connection = Connection::new(®istration); let res = connection.open( @@ -1943,10 +1952,18 @@ fn test_module() { test_conn_callback, &connection as *const Connection as *const c_void, ); - assert!(res.is_ok(), "Failed to open connection: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to open connection: 0x{:x}", + res.err().unwrap() + ); let res = connection.start(&configuration, "www.cloudflare.com", 443); - assert!(res.is_ok(), "Failed to start connection: 0x{:x}", res.err().unwrap()); + assert!( + res.is_ok(), + "Failed to start connection: 0x{:x}", + res.err().unwrap() + ); let duration = std::time::Duration::from_millis(1000); std::thread::sleep(duration);