nix
nix copied to clipboard
Add IPPROTO_IP variant to SockProtocol
trafficstars
What does this PR do
Adds the new IPPROTO_IP variant to SockProtocol as described in #1953
Checklist:
- [x] I have read
CONTRIBUTING.md - [x] I have written necessary tests and rustdoc comments
- [x] A change log has been added if this PR modifies nix's API
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
To define two enum values that have the same representation, create a constant instead. See SockProtocol::CanRaw for an example.