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

IPV6_RECVPKTINFO and IP_PKTINFO support #890

Closed
mcginty opened this issue Apr 22, 2018 · 4 comments
Closed

IPV6_RECVPKTINFO and IP_PKTINFO support #890

mcginty opened this issue Apr 22, 2018 · 4 comments

Comments

@mcginty
Copy link
Contributor

mcginty commented Apr 22, 2018

This feature would include both new SockOpts and new ControlMessages to be used with sendmsg and recvmsg.

I have an unclean patch here: master...mcginty:ipv6-pktinfo, and will be happy to turn this into a nicer PR if the devs think it could get merged.

The only really gross part is that libc doesn't have the constants for IPV6_RECVPKTINFO or IP_PKTINFO, so I had to grab them out of the header files for macOS and Linux (the two platforms I tested on).

@asomers
Copy link
Member

asomers commented Apr 22, 2018

You really shouldn't be afraid to update libc. It's quite easy to get patches accepted there. Once you do that and fix portability issues, I think this would be a fine feature to add.

@mcginty
Copy link
Contributor Author

mcginty commented Apr 22, 2018

@asomers sounds good. I'll keep this issue open since it's still a feature request for nix, and will work on a libc PR.

@mcginty
Copy link
Contributor Author

mcginty commented Apr 23, 2018

pending merge of rust-lang/libc#980

mcginty added a commit to mcginty/nix that referenced this issue Apr 25, 2018
mcginty added a commit to mcginty/nix that referenced this issue Apr 25, 2018
mcginty added a commit to mcginty/nix that referenced this issue Apr 25, 2018
mcginty added a commit to mcginty/nix that referenced this issue Apr 25, 2018
@pusateri
Copy link
Contributor

Merged in #990. Can be closed.

@mcginty mcginty closed this as completed Dec 25, 2018
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

No branches or pull requests

3 participants