Skip to main content

Module mmp

Module mmp 

Source
Expand description

Metrics Measurement Protocol compatibility exports.

Runtime-agnostic MMP logic lives under proto::mmp; this module keeps the existing public crate::mmp path stable.

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§

DualEwma
Dual EWMA for trend detection on a single metric.
JitterEstimator
Interarrival jitter estimator using RFC 3550 algorithm.
MmpConfig
MMP configuration (node.mmp.*).
MmpMetrics
Derived MMP metrics, updated from incoming ReceiverReports.
MmpPeerState
Combined MMP state for a single peer link.
MmpSessionState
Combined MMP state for a single end-to-end session.
OwdTrendDetector
OWD trend detector using linear regression over a ring buffer.
PathMtuState
Path MTU tracking for a single session.
ReceiverReport
ReceiverReport (msg_type 0x02, 68-byte body including type byte)
ReceiverState
Per-peer receiver-side MMP state.
SenderReport
Link-layer sender report.
SenderState
Per-peer sender-side MMP state.
SpinBitState
Spin bit state for passive RTT estimation.
SrttEstimator
Smoothed RTT estimator using Jacobson’s algorithm.

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).

Functions§

compute_etx
Compute Expected Transmission Count from bidirectional delivery ratios.