Open sgued opened 5 months ago
@sgued Seeing this issue as I was about to fork your natpmp-ng
.
For my usecase I don't need get_default_gateway
, so if you made it optional in your fork I could use it.
I'm just going to remove it for now.
Feel free to open a PR on natpmp-ng that makes this optional. I will merge it. https://gitlab.com/sgued/natpmp-ng/-/merge_requests
I'm not sure how complicated it would be to make optional, though. I'll have to look into it.
https://crates.io/crates/netdev is a crate that can allow you to get the default gateway and is widely used (it was previously named default-net with almost 70k downloads/montth
It has a bit of unsafe but does not link against C code. I find it preferable to using the embeded C code that never got updated.
If compile adding dependencies are an issue, i could also be possible to make the C implementation of
get_default_gateway
optional.That would allow my project to get rid of the unupdated c dependency I don't like.