Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freebsd add basic ethernet frames support #4252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devnexen
Copy link
Contributor

@rustbot
Copy link
Collaborator

rustbot commented Jan 24, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit but this looks good to me. @asomers could you take a look?

src/unix/bsd/freebsdlike/freebsd/mod.rs Show resolved Hide resolved
@@ -2541,6 +2553,55 @@ cfg_if! {
.finish()
}
}

// FIXME(msrv): `derive` on packed structs cannot be used below 1.67
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds to me like a compelling reason to raise the main branch's MSRV. Why is it currently set to 1.63?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.63 is what Debian stable currently ships so it is a pretty common baseline in the ecosystem. In a few months Trixie will be released 1.83 (or higher) so we will probably be able to do another bump (not that high, but at least above 1.63).

@@ -4957,6 +5028,24 @@ f! {
pub fn PROT_MAX_EXTRACT(x: c_int) -> c_int {
(x >> 16) & (crate::PROT_READ | crate::PROT_WRITE | crate::PROT_EXEC)
}

pub {const} fn ETHER_IS_MULTICAST(addr: *mut u_char) -> bool {
(*addr.wrapping_add(0)) & 0x01 != 0x00
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that Clippy doesn't complain about the uselessness of wrapping_add(0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants