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 IPPROTO_IP variant to SockProtocol #2184

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evanrittenhouse
Copy link

@evanrittenhouse evanrittenhouse commented Nov 12, 2023

What does this PR do

Adds the new IPPROTO_IP variant to SockProtocol as described in #1953

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@evanrittenhouse
Copy link
Author

I'm not quite sure how to handle the conflict between libc::NETLINK_ROUTE and libc::IPPROTO_IP, both of which are defined as 0.

@asomers, I've seen you around in quite a few issues. Do you have any preference? Sorry if this is a basic question, this is my first PR to the project. Excited to learn more

@asomers
Copy link
Member

asomers commented Nov 19, 2023

To define two enum values that have the same representation, create a constant instead. See SockProtocol::CanRaw for an example.

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.

None yet

2 participants