Skip to content

the socket module should include getifaddrs because it is necessary to translate the output of if_nameindex into addresses #126713

Open
@glyph

Description

@glyph

Feature or enhancement

Proposal:

socket.if_nameindex, socket.if_nametoindex and socket.if_indextoname all work in terms of interface names and indexes. But in order to do much of use with these values, you need to know what addresses they have, and as far as I can tell the socket module does not provide a means to do so.

This function exists in psutil, in netifaces, and there are various recipes lying around on Stack Overflow and elsewhere for accessing this function.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions