diff options
author | valdaarhun <icegambit91@gmail.com> | 2022-07-23 01:32:57 +0530 |
---|---|---|
committer | valdaarhun <icegambit91@gmail.com> | 2022-07-24 21:25:01 +0530 |
commit | 1040d970366100ce766eb8cb6af2c7453ffcdb6a (patch) | |
tree | 6a437cac41680f5258f9edaeb7c6fa6871977d13 /src/sys/socket | |
parent | 7cc33c15fe547dacebe7da154ffc9c1c5b595d6e (diff) | |
download | nix-1040d970366100ce766eb8cb6af2c7453ffcdb6a.zip |
Add ETH_P_ALL protocol number to SockProtocol
Add note to Changelog.md
Make changes in comments
Co-authored-by: Alan Somers <asomers@gmail.com>
Add Android as target os for ETH_P_ALL
Diffstat (limited to 'src/sys/socket')
-rw-r--r-- | src/sys/socket/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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"))] |