From 1040d970366100ce766eb8cb6af2c7453ffcdb6a Mon Sep 17 00:00:00 2001 From: valdaarhun Date: Sat, 23 Jul 2022 01:32:57 +0530 Subject: Add ETH_P_ALL protocol number to SockProtocol Add note to Changelog.md Make changes in comments Co-authored-by: Alan Somers Add Android as target os for ETH_P_ALL --- src/sys/socket/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index e789c116..e937e652 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -214,6 +214,13 @@ pub enum SockProtocol { #[cfg(any(target_os = "android", target_os = "linux"))] #[cfg_attr(docsrs, doc(cfg(all())))] NetlinkCrypto = libc::NETLINK_CRYPTO, + /// Non-DIX type protocol number defined for the Ethernet IEEE 802.3 interface that allows packets of all protocols + /// defined in the interface to be received. + /// ([ref](https://man7.org/linux/man-pages/man7/packet.7.html)) + // The protocol number is fed into the socket syscall in network byte order. + #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg_attr(docsrs, doc(cfg(all())))] + EthAll = libc::ETH_P_ALL.to_be(), } #[cfg(any(target_os = "linux"))] -- cgit v1.2.3