Skip to content

Commit

Permalink
Update src/sys/socket/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Somers <asomers@gmail.com>
  • Loading branch information
fpagliughi and asomers committed Dec 10, 2022
1 parent c95b007 commit ca7e54b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,14 @@ pub enum SockProtocol {
CanRaw = libc::CAN_RAW,
}

/// The Controller Area Network broadcast manager protocol
/// ([ref](https://docs.kernel.org/networking/can.html#how-to-use-socketcan))
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(all())))]
#[allow(non_upper_case_globals)]
pub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock; // Matches libc::CAN_BCM

impl SockProtocol {
/// The Controller Area Network broadcast manager protocol
/// ([ref](https://docs.kernel.org/networking/can.html#how-to-use-socketcan))
#[cfg(target_os = "linux")]
#[cfg_attr(docsrs, doc(cfg(all())))]
#[allow(non_upper_case_globals)]
pub const CanBcm: SockProtocol = SockProtocol::NetlinkUserSock; // Matches libc::CAN_BCM
}
#[cfg(any(target_os = "linux"))]
libc_bitflags! {
/// Configuration flags for `SO_TIMESTAMPING` interface
Expand Down

0 comments on commit ca7e54b

Please sign in to comment.