Skip to content

add pktinfo consts and structs for linux and apple - #980

Merged
bors merged 1 commit into
rust-lang:masterfrom
mcginty:pktinfo
Apr 23, 2018
Merged

bors merged 1 commit into
rust-lang:masterfrom
mcginty:pktinfo

Conversation

@mcginty

@mcginty mcginty commented Apr 23, 2018 •

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
Member

@bors: r+

@bors

bors commented Apr 23, 2018

Copy link
Copy Markdown
Contributor

📌 Commit 0e3cf47 has been approved by alexcrichton

@bors

bors commented Apr 23, 2018

Copy link
Copy Markdown
Contributor

⌛ 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

bors commented Apr 23, 2018

Copy link
Copy Markdown
Contributor

☀️ 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