nix icon indicating copy to clipboard operation
nix copied to clipboard

Add IPPROTO_IP variant to SockProtocol

Open evanrittenhouse opened this issue 2 years ago • 2 comments
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

evanrittenhouse avatar Nov 12 '23 04:11 evanrittenhouse

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

evanrittenhouse avatar Nov 12 '23 04:11 evanrittenhouse

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

asomers avatar Nov 19 '23 15:11 asomers