Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jan 12, 2025
1 parent 63a10d6 commit 5e91463
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,17 @@ impl SockProtocol {
pub const KextEvent: SockProtocol = SockProtocol::Icmp; // Matches libc::SYSPROTO_EVENT

/// Packet filter on IPv4 traffic
/// NOTE: placed here due to conflict (little endian arch) with SockProtocol::NetLinkISCI
// NOTE: placed here due to conflict (little endian arch) with SockProtocol::NetLinkISCI
#[cfg(linux_android)]
#[allow(non_upper_case_globals)]
#[cfg(target_endian = "little"])]
pub const EthIp: SockProtocol = unsafe { std::mem::transmute::<i32, SockProtocol>((libc::ETH_P_IP as u16).to_be() as i32) };

/// Packet filter on IPv4 traffic
#[cfg(linux_android)]
#[allow(non_upper_case_globals)]
#[cfg(target_endian = "big"])]
EthIp = (libc::ETH_P_IP as u16).to_be() as i32;
}
#[cfg(linux_android)]
libc_bitflags! {
Expand Down

0 comments on commit 5e91463

Please sign in to comment.