Closed SamuelYvon closed 1 year ago
AF_LINK is obsolete afaik I see, it's being used in BSD, MacOS.
Not sure what is best, I just switched to AF_PACKET as part of switching to netifaces2. Maybe it's best to just mention it in README next to the default-gateway differences.
~AF_LINK is obsolete afaik~ I see, it's being used in BSD, MacOS. Not sure what is best, I just switched to AF_PACKET as part of switching to netifaces2. Maybe it's best to just mention it in README next to the default-gateway differences.
I'd tend to agree and get a more "neutral" interface on the side. For users of netifaces2 this would be a breaking change otherwise.
Mentioned in the readme with commit 3e9367a7aa4313a5dd992a5a0d84555ddadbf470
On some OSes (BSD IIRC)
AF_LINK
is used for the link layer. On linux, this is exposed throughAF_PACKET
. The previous netifaces corrected the values based on OS. I am not sure whether to use the same approach of monkeypatching the values based on the platform here, or to create a new, more explicit interface.