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

Add support for Packet MMAP #1013

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

Conversation

DBLouis
Copy link

@DBLouis DBLouis commented Feb 7, 2024

This is WIP

A bit of guidance would be greatly appreciated :)

sunfishcode/linux-raw-sys#103

@DBLouis
Copy link
Author

DBLouis commented Feb 7, 2024

What is the difference between #[cfg(linux_kernel)] and #[cfg(target_os = "linux"]? When should I use which?

@sunfishcode
Copy link
Member

#[cfg(linux_kernel)] includes Android, while #[cfg(target_os = "linux")] does not. linux_kernel etc. are defined in the build.rs file.

@DBLouis
Copy link
Author

DBLouis commented Feb 7, 2024

I wonder if it is worth it to backport my changes to linux-raw-sys to an earlier new release like 0.4.13 instead of 0.6.4

@sunfishcode
Copy link
Member

You can submit a PR for 0.4.x if you like, but if you just care about docs.rs, 0.6.x is sufficient.

@DBLouis
Copy link
Author

DBLouis commented Feb 8, 2024

You can submit a PR for 0.4.x if you like, but if you just care about docs.rs, 0.6.x is sufficient.

Sorry I meant the changes in this sunfishcode/linux-raw-sys@783bd07.
I need those here obviously, but maybe there is no need to require updating the dependency on linux-raw-sys all the way to 0.6.x.

@DBLouis
Copy link
Author

DBLouis commented Mar 25, 2024

I have added an example high-level safe "wrapper" in examples/packet/inner.rs. I'm thinking that is could be moved to it's own crate (e.g. rustix-packet-mmap)

@DBLouis DBLouis marked this pull request as ready for review March 25, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants