select_best_path

Function select_best_path 

Source
pub fn select_best_path(
    paths: &[PathCandidate],
    current: Option<&PathCandidate>,
) -> Option<PathCandidate>
Expand description

Select the best path from candidates

Algorithm:

  1. Prefer direct paths over relay paths
  2. Among same type, prefer lower RTT
  3. Apply IPv6 advantage (3ms)
  4. Apply hysteresis (5ms) when switching from current path