You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to compile libslirp but I got the error:
slirp.c: In function 'get_dns_addr_resolv_conf':
slirp.c:455:28: error: implicit declaration of function 'if_nametoindex' [-Wimplicit-function-declaration]
455 | if_index = if_nametoindex(c + 1);
Possible Implementation
If not easy to implement, at worst case it could fail and set an error.
The text was updated successfully, but these errors were encountered:
edubart
changed the title
Feature Request:
Feature Request: Provide if_nametoindex in <net/if.h>Sep 7, 2024
This one is a little tricky, SIOCGIFINDEX is only defined on Linux, FreeBSD, and NetBSD. The indices returned by it are inconsistent from the ordering returned by SIOCGIFCONF. I can't find a definition for these functions in Apple's XNU or Libc codebases. I'm also not entirely sure what this function even does or why it's useful. I would need help understanding it better in order to support it.
Feature Description
Provide
if_nametoindex
andif_indextoname
functions in<net/if.h>
, see https://man7.org/linux/man-pages/man3/if_nametoindex.3.htmlMotivation
I was trying to compile libslirp but I got the error:
Possible Implementation
If not easy to implement, at worst case it could fail and set an error.
The text was updated successfully, but these errors were encountered: