pub struct CorrelationAnalyzer {
pub correlation_threshold: f64,
pub timing_tolerance_us: u64,
}Expand description
Analyzer for detecting traffic correlation patterns.
Fields§
§correlation_threshold: f64Threshold above which two flows are considered correlated.
timing_tolerance_us: u64Tolerance for timing offset (microseconds).
Implementations§
Source§impl CorrelationAnalyzer
impl CorrelationAnalyzer
pub fn new() -> Self
pub fn with_threshold(self, threshold: f64) -> Self
Sourcepub fn timing_correlation(&self, a: &FlowRecord, b: &FlowRecord) -> f64
pub fn timing_correlation(&self, a: &FlowRecord, b: &FlowRecord) -> f64
Analyze timing correlation between two flows.
Sourcepub fn size_correlation(&self, a: &FlowRecord, b: &FlowRecord) -> f64
pub fn size_correlation(&self, a: &FlowRecord, b: &FlowRecord) -> f64
Analyze size-pattern correlation between two flows.
Sourcepub fn correlate(&self, a: &FlowRecord, b: &FlowRecord) -> CorrelationResult
pub fn correlate(&self, a: &FlowRecord, b: &FlowRecord) -> CorrelationResult
Full correlation analysis between two flows.
Sourcepub fn analyze_all(&self, flows: &[FlowRecord]) -> Vec<CorrelationResult>
pub fn analyze_all(&self, flows: &[FlowRecord]) -> Vec<CorrelationResult>
Analyze all pairs from a set of flows.
Find flows correlated with a target flow.
Sourcepub fn resistance_score(
&self,
original: &FlowRecord,
shaped: &FlowRecord,
) -> f64
pub fn resistance_score( &self, original: &FlowRecord, shaped: &FlowRecord, ) -> f64
Evaluate how well traffic shaping resists correlation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CorrelationAnalyzer
impl RefUnwindSafe for CorrelationAnalyzer
impl Send for CorrelationAnalyzer
impl Sync for CorrelationAnalyzer
impl Unpin for CorrelationAnalyzer
impl UnsafeUnpin for CorrelationAnalyzer
impl UnwindSafe for CorrelationAnalyzer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more