Struct bgp_models::bgp::attributes::AsPath [−][src]
pub struct AsPath {
pub segments: Vec<AsPathSegment>,
}Fields
segments: Vec<AsPathSegment>Implementations
Construct AsPath from AS_PATH and AS4_PATH
https://datatracker.ietf.org/doc/html/rfc6793#section-4.2.3 If the number of AS numbers in the AS_PATH attribute is less than the number of AS numbers in the AS4_PATH attribute, then the AS4_PATH attribute SHALL be ignored, and the AS_PATH attribute SHALL be taken as the AS path information.
If the number of AS numbers in the AS_PATH attribute is larger than or equal to the number of AS numbers in the AS4_PATH attribute, then the AS path information SHALL be constructed by taking as many AS numbers and path segments as necessary from the leading part of the AS_PATH attribute, and then prepending them to the AS4_PATH attribute so that the AS path information has a number of AS numbers identical to that of the AS_PATH attribute. Note that a valid AS_CONFED_SEQUENCE or AS_CONFED_SET path segment SHALL be prepended if it is either the leading path segment or is adjacent to a path segment that is prepended.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AsPath
impl UnwindSafe for AsPath
Blanket Implementations
Mutably borrows from an owned value. Read more