pub fn span_record_warnings(
warnings: &[BgpValidationWarning],
tree: &DissectionNode,
) -> Vec<SpannedWarning>Expand description
Anchor validation warnings to the byte ranges they concern.
The parser does not track offsets on its hot path, so spans are
correlated here against the dissection tree: attribute-keyed warnings
point at the matching bgp.attr.{code} node (the Nth occurrence for
duplicate attributes), NLRI warnings at the NLRI section, and everything
else falls back to the enclosing section or the whole record.