[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Steve Dower
Steve Dower added the comment: New changeset 8f96c9f8ed2a4795e34b333411451e24f28f74d2 by Steve Dower (Zackery Spytz) in branch 'master': bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and if_nameindex() on Windows (GH-13522) https://github.com/python/cpython/commit/8f96c9f8ed

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Zackery Spytz
Zackery Spytz added the comment: Thanks, Steve. I've addressed your comments on the PR. -- ___ Python tracker ___ ___ Python-bugs-l

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Steve Dower
Steve Dower added the comment: Great, thanks Zackery! (And thanks for the ping - I don't notice GitHub notifications.) Had a few comments about error handling, but it looks great. -- ___ Python tracker ___

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Zackery Spytz
Zackery Spytz added the comment: Well, it turns out that implementing if_nameindex() on Windows using GetIfTable2Ex() was also quite simple. I've updated the PR. -- ___ Python tracker __

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-24 Thread Dmitry Tantsur
Dmitry Tantsur added the comment: That would be fantastic, but I did not dare asking for it :) This is how the output of if_nameindex looks on my Fedora 29: [(1, 'lo'), (2, 'enp0s31f6'), (3, 'wlp4s0'), (4, 'virbr0'), (5, 'virbr0-nic'), (12, 'tun0')] It includes the loopback, two real adapte

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-23 Thread Steve Dower
Steve Dower added the comment: Is it worth also implementing if_nameindex() using (I assume) GetIfTable2Ex [1]? Or maybe just the simpler GetIfTable is sufficient - I'm not sure exactly what semantics Unix if_nameindex() has, whether it includes all logical adapters. [1]: https://docs.micr

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-23 Thread Zackery Spytz
Zackery Spytz added the comment: I've created a PR for this issue. Few changes are needed to implement these functions on Windows. -- nosy: +ZackerySpytz, eryksun ___ Python tracker

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-23 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +13437 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-23 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- components: +Windows -Library (Lib) nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ _

[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-22 Thread Dmitry Tantsur
New submission from Dmitry Tantsur : These two calls are currently Unix-only in the socket module. However, Windows supports them starting with Vista: https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-if_indextoname https://docs.microsoft.com/en-us/windows/desktop/api/ne