Commit e9cf9c7 1 parent 337269e commit e9cf9c7 Copy full SHA for e9cf9c7
File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,14 @@ impl<Octs: Octets> OpenMessage<Octs> {
235
235
} )
236
236
}
237
237
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
+ }
238
246
}
239
247
240
248
@@ -488,6 +496,10 @@ impl<Octs: Octets> Capability<Octs> {
488
496
let domain_len = parser. parse_u8 ( ) ? as usize ;
489
497
parser. advance ( domain_len) ?;
490
498
} ,
499
+ CapabilityType :: SoftwareVersion => {
500
+ let len = parser. parse_u8 ( ) ? as usize ;
501
+ parser. advance ( len) ?;
502
+ } ,
491
503
CapabilityType :: PrestandardRouteRefresh => {
492
504
if len > 0 {
493
505
warn ! ( "PrestandardRouteRefresh with len > 0, capture me for testing purposes!" ) ;
@@ -700,6 +712,7 @@ typeenum!(
700
712
70 => EnhancedRouteRefresh ,
701
713
71 => LongLivedGracefulRestart ,
702
714
73 => FQDN ,
715
+ 75 => SoftwareVersion ,
703
716
128 => PrestandardRouteRefresh ,
704
717
130 => PrestandardOutboundRouteFiltering ,
705
718
131 => PrestandardMultisession ,
You can’t perform that action at this time.
0 commit comments