This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,14 @@ impl<Octs: Octets> OpenMessage<Octs> {
235235 } )
236236 }
237237
238+ /// Returns the Software Version capability string.
239+ pub fn get_software_version ( & self ) -> Option < String > {
240+ self . capabilities ( ) . find ( |c|
241+ c. typ ( ) == CapabilityType :: SoftwareVersion
242+ ) . map ( |cap|
243+ String :: from_utf8_lossy ( cap. value ( ) ) . to_string ( )
244+ )
245+ }
238246}
239247
240248
@@ -488,6 +496,10 @@ impl<Octs: Octets> Capability<Octs> {
488496 let domain_len = parser. parse_u8 ( ) ? as usize ;
489497 parser. advance ( domain_len) ?;
490498 } ,
499+ CapabilityType :: SoftwareVersion => {
500+ let len = parser. parse_u8 ( ) ? as usize ;
501+ parser. advance ( len) ?;
502+ } ,
491503 CapabilityType :: PrestandardRouteRefresh => {
492504 if len > 0 {
493505 warn ! ( "PrestandardRouteRefresh with len > 0, capture me for testing purposes!" ) ;
@@ -700,6 +712,7 @@ typeenum!(
700712 70 => EnhancedRouteRefresh ,
701713 71 => LongLivedGracefulRestart ,
702714 73 => FQDN ,
715+ 75 => SoftwareVersion ,
703716 128 => PrestandardRouteRefresh ,
704717 130 => PrestandardOutboundRouteFiltering ,
705718 131 => PrestandardMultisession ,
You can’t perform that action at this time.
0 commit comments