@@ -573,6 +573,37 @@ impl RecvFlags {
573
573
pub const fn is_out_of_band ( self ) -> bool {
574
574
self . 0 & libc:: MSG_OOB != 0
575
575
}
576
+
577
+ /// Check if the confirm flag is set.
578
+ ///
579
+ /// This is used by SocketCAN to indicate a frame was sent via the
580
+ /// socket it is received on. This flag can be interpreted as a
581
+ /// 'transmission confirmation'.
582
+ ///
583
+ /// On Unix this corresponds to the `MSG_CONFIRM` flag.
584
+ #[ cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) ]
585
+ #[ cfg_attr(
586
+ docsrs,
587
+ doc( cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) )
588
+ ) ]
589
+ pub const fn is_confirm ( self ) -> bool {
590
+ self . 0 & libc:: MSG_CONFIRM != 0
591
+ }
592
+
593
+ /// Check if the don't route flag is set.
594
+ ///
595
+ /// This is used by SocketCAN to indicate a frame was created
596
+ /// on the local host.
597
+ ///
598
+ /// On Unix this corresponds to the `MSG_DONTROUTE` flag.
599
+ #[ cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) ]
600
+ #[ cfg_attr(
601
+ docsrs,
602
+ doc( cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) )
603
+ ) ]
604
+ pub const fn is_dontroute ( self ) -> bool {
605
+ self . 0 & libc:: MSG_DONTROUTE != 0
606
+ }
576
607
}
577
608
578
609
#[ cfg( not( target_os = "redox" ) ) ]
@@ -584,6 +615,10 @@ impl std::fmt::Debug for RecvFlags {
584
615
s. field ( "is_out_of_band" , & self . is_out_of_band ( ) ) ;
585
616
#[ cfg( not( target_os = "espidf" ) ) ]
586
617
s. field ( "is_truncated" , & self . is_truncated ( ) ) ;
618
+ #[ cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) ]
619
+ s. field ( "is_confirm" , & self . is_confirm ( ) ) ;
620
+ #[ cfg( all( feature = "all" , any( target_os = "android" , target_os = "linux" ) ) ) ]
621
+ s. field ( "is_dontroute" , & self . is_dontroute ( ) ) ;
587
622
s. finish ( )
588
623
}
589
624
}
0 commit comments