Skip to content

Commit

Permalink
Add VersionSettings and PathStatus structures for preview API support
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-koz committed Jan 4, 2025
1 parent c1dd089 commit 8f9acca
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,28 @@ pub const PERF_COUNTER_WORK_OPER_QUEUED: PerformanceCounter = 25;
pub const PERF_COUNTER_WORK_OPER_COMPLETED: PerformanceCounter = 26;
pub const PERF_COUNTER_MAX: PerformanceCounter = 27;

#[cfg(feature = "preview-api")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VersionSettings {
acceptable_versions: *const u32,
offered_versions: *const u32,
fully_deployed_versions: *const u32,
acceptable_versions_length: u32,
offered_versions_length: u32,
fully_deployed_versions_length: u32,
}

#[cfg(feature = "preview-api")]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PathStatus {
peer_address: Addr,
local_address: Addr,
path_id: u32,
active: BOOLEAN,
}

pub const QUIC_TLS_SECRETS_MAX_SECRET_LEN: usize = 64;

#[repr(C)]
Expand Down Expand Up @@ -893,6 +915,13 @@ pub const PARAM_CONN_VERSION_SETTINGS: u32 = 0x05000014;
pub const PARAM_CONN_INITIAL_DCID_PREFIX: u32 = 0x05000015;
pub const PARAM_CONN_STATISTICS_V2: u32 = 0x05000016;
pub const PARAM_CONN_STATISTICS_V2_PLAT: u32 = 0x05000017;
pub const PARAM_CONN_ORIG_DEST_CID: u32 = 0x05000018;
#[cfg(feature = "preview-api")]
pub const PARAM_CONN_ADD_LOCAL_ADDRESS: u32 = 0x05000019;
#[cfg(feature = "preview-api")]
pub const PARAM_CONN_REMOVE_LOCAL_ADDRESS: u32 = 0x0500001A;
#[cfg(feature = "preview-api")]
pub const PARAM_CONN_PATH_STATUS: u32 = 0x0500001B;

pub const PARAM_TLS_HANDSHAKE_INFO: u32 = 0x06000000;
pub const PARAM_TLS_NEGOTIATED_ALPN: u32 = 0x06000001;
Expand Down

0 comments on commit 8f9acca

Please sign in to comment.