Is the user expected to just know a priori which integer they should pass, or is the integer expected to come from somewhere that Luv does/does not provide?
It seems like the POSIX APIs have if_nameindex/if_nametoindex, but libuv doesn't expose those, and from what I can tell from the Libuv and Node code:
uv_if_indextoname/uv_if_indextoiid is called using the value from sockaddr_in6.sin6_scope_id in the Libuv test case test-ip6-addr.c
uv_if_indextoname is not used at all within Node
uv_if_indextoiid is used exactly once within Node, and is also called with sockaddr_in6.sin6_scope_id
As far as I can tell, we don't ever expose the value of sin6_scope_id to the user, so it seems like exposing that information might be necessary for this function to be usable in practice.
Originally posted by @squeek502 in #799 (comment)
Is the user expected to just know a priori which integer they should pass, or is the integer expected to come from somewhere that Luv does/does not provide?
It seems like the POSIX APIs have
if_nameindex/if_nametoindex, but libuv doesn't expose those, and from what I can tell from the Libuv and Node code:uv_if_indextoname/uv_if_indextoiidis called using the value fromsockaddr_in6.sin6_scope_idin the Libuv test casetest-ip6-addr.cuv_if_indextonameis not used at all within Nodeuv_if_indextoiidis used exactly once within Node, and is also called withsockaddr_in6.sin6_scope_idAs far as I can tell, we don't ever expose the value of
sin6_scope_idto the user, so it seems like exposing that information might be necessary for this function to be usable in practice.Originally posted by @squeek502 in #799 (comment)