Skip to main content

Module mmp

Module mmp 

Source
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.*).
MmpPeerState
Combined MMP state for a single peer link.
MmpSessionState
Combined MMP state for a single end-to-end session.
PathMtuState
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).