Skip to content

add pktinfo consts and structs for linux and apple #980

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

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

mcginty
Copy link
Contributor

@mcginty mcginty commented Apr 23, 2018

The constants and structs are from /usr/include/linux/in.h, /usr/include/linux/in6.h for Linux (+ Android) and /usr/include/netinet/in.h, /usr/include/netinet6/in6.h for Apple.

With Apple it's important to mention that I'm choosing the RFC 3542 versions of the constants in alignment with other critical pieces of software like nginx, and Linux also defaults to this RFC version.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 23, 2018

📌 Commit 0e3cf47 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 23, 2018

⌛ Testing commit 0e3cf47 with merge 297fc41...

bors added a commit that referenced this pull request Apr 23, 2018
add pktinfo consts and structs for linux and apple

The constants and structs are from `/usr/include/linux/in.h`, `/usr/include/linux/in6.h` for Linux (+ Android) and `/usr/include/netinet/in.h`, `/usr/include/netinet6/in6.h` for Apple.

With Apple it's important to mention that I'm choosing the RFC 3542 versions of the constants in alignment with other critical pieces of software like [nginx](http://hg.nginx.org/nginx/rev/9fb994513776), and Linux also defaults to this RFC version.
@bors
Copy link
Contributor

bors commented Apr 23, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 297fc41 to master...

@bors bors merged commit 0e3cf47 into rust-lang:master Apr 23, 2018
bors added a commit that referenced this pull request May 1, 2018
add remaining pktinfo consts/structs for the other BSDs

This continues the work from #980, adding a more complete set of supported platforms for the "I want to know what destination this UDP packet had" problem.
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.

4 participants