diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-22 14:17:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-22 14:17:06 +0000 |
commit | 1203d6c07414eb32738d3a9b7a56a4369244d044 (patch) | |
tree | 370c269ddecb16751e280fbf1ee6c2272d885e63 /src/sys/statfs.rs | |
parent | 83db58c088a63b4f45891617fea4b32bf8db4737 (diff) | |
parent | 481424e58c2b5d75d52fdc69ff37b835cd172fa6 (diff) | |
download | nix-1203d6c07414eb32738d3a9b7a56a4369244d044.zip |
Merge #1289
1289: Add Netlink Protocol Families to SockProtocol enum r=asomers a=sinkingpoint
Currently the SockProtocol enum is rather scarce. This commit adds the Netlink protocols
defined in netlink(7) to the SockProtocol enum allowing us to use the Nix socket library for
more in-depth Netlink work.
Because of the way libc sockets work, this is a bit more annoying than it has any right to be - the Socket Family and the Socket protocol are intertwined in that a given c_int protocol can represent different things depending on the family. This means that as we add values to this enum we're going to get collisions (Indeed, I've left out a few values that collided with the existing TCP/UDP Protocols). I'm not sure how we would want to handle this going forward - maybe different Protocol enums for different Familys, with `Into<SockProtocol>` methods?
I followed the existing pattern in this file when adding these, but perhaps as this enum gets bigger, we should use the libc_enum macro for cleanliness?
Co-authored-by: sinkingpoint <colin@quirl.co.nz>
Diffstat (limited to 'src/sys/statfs.rs')
0 files changed, 0 insertions, 0 deletions