Expand description
Metrics Measurement Protocol (MMP) — link-layer instantiation.
Measures link quality between adjacent peers: RTT, loss, jitter, throughput, one-way delay trend, and ETX. Operates on the per-frame hooks (counter, timestamp, flags) introduced by the FMP wire format revision.
Three operating modes trade measurement fidelity for overhead:
- Full: sender + receiver reports at RTT-adaptive intervals
- Lightweight: receiver reports only (infer loss from counters)
- Minimal: spin bit + CE echo only, no reports
Re-exports§
pub use algorithms::DualEwma;pub use algorithms::JitterEstimator;pub use algorithms::OwdTrendDetector;pub use algorithms::SpinBitState;pub use algorithms::SrttEstimator;pub use algorithms::compute_etx;pub use metrics::MmpMetrics;pub use receiver::ReceiverState;pub use report::ReceiverReport;pub use report::SenderReport;pub use sender::SenderState;
Modules§
- algorithms
- MMP algorithmic building blocks.
- metrics
- MMP derived metrics.
- receiver
- MMP receiver state machine.
- report
- MMP report wire format: SenderReport and ReceiverReport.
- sender
- MMP sender state machine.
Structs§
- MmpConfig
- MMP configuration (
node.mmp.*). - MmpPeer
State - Combined MMP state for a single peer link.
- MmpSession
State - Combined MMP state for a single end-to-end session.
- Path
MtuState - Path MTU tracking for a single session.
Enums§
- MmpMode
- MMP operating mode.
Constants§
- COLD_
START_ SAMPLES - Number of SRTT samples before transitioning from cold-start to normal floor.
- DEFAULT_
COLD_ START_ INTERVAL_ MS - Default report interval before SRTT is available (cold start).
- DEFAULT_
LOG_ INTERVAL_ SECS - Default operator log interval in seconds.
- DEFAULT_
OWD_ WINDOW_ SIZE - Default OWD ring buffer capacity.
- EWMA_
LONG_ ALPHA - Dual EWMA long-term: α = 1/32.
- EWMA_
SHORT_ ALPHA - Dual EWMA short-term: α = 1/4.
- JITTER_
ALPHA_ SHIFT - Jitter EWMA: α = 1/16 (RFC 3550 §6.4.1).
- MAX_
REPORT_ INTERVAL_ MS - Maximum report interval (SRTT clamp ceiling).
- MAX_
SESSION_ REPORT_ INTERVAL_ MS - Session-layer maximum report interval.
- MIN_
REPORT_ INTERVAL_ MS - Minimum report interval (SRTT clamp floor).
- MIN_
SESSION_ REPORT_ INTERVAL_ MS - Session-layer minimum report interval.
- RECEIVER_
REPORT_ BODY_ SIZE - ReceiverReport body size (after msg_type byte): 3 reserved + 64 payload = 67.
- RECEIVER_
REPORT_ WIRE_ SIZE - ReceiverReport total wire size including inner header: 5 + 67 = 72.
- RTTVAR_
BETA_ SHIFT - RTTVAR: β = 1/4 (Jacobson, RFC 6298).
- SENDER_
REPORT_ BODY_ SIZE - SenderReport body size (after msg_type byte): 3 reserved + 44 payload = 47.
- SENDER_
REPORT_ WIRE_ SIZE - SenderReport total wire size including inner header: 5 + 47 = 52.
- SESSION_
COLD_ START_ INTERVAL_ MS - Session-layer cold-start report interval (before SRTT is available).
- SRTT_
ALPHA_ SHIFT - SRTT: α = 1/8 (Jacobson, RFC 6298).