Skip to content

Investigate usability of uv_if_indextoname/uv_if_indextoiid bindings #801

@squeek502

Description

@squeek502

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions